Finding list of header files in editor

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Finding list of header files in editor

4,629 次查看
AndersJ
Contributor IV
In the upper left corner of the editor form there is a "h" button.
It will pull down a list of header files included in the particular source file.
It is a convenient way to locate and open a .h file.
 
Now for some reason all I get when I click the "h" is
a message: "Not a project file"
 
Why does this happen, and how do I fix it?
 
Thanks,
Anders J
 
 
 
标签 (1)
0 项奖励
3 回复数

634 次查看
blooy
Contributor I
I was having the same problem and I found that after adding files to the project I needed to shutdown and restart CW for the ".h" button to work.
0 项奖励

634 次查看
CompilerGuru
NXP Employee
NXP Employee
In the default setup, those entries are filed by the compiler, hence you have to compile it once. Restarting is not necessary.
0 项奖励

634 次查看
CompilerGuru
NXP Employee
NXP Employee
This lookup works by asking the project for the list.
If you open a C file which CW cannot accociate with a project, you get this "Not a project file".
Maybe it should read "this file is not part of any currently open project", but this may be a bit long.

So
- open your project
- add it to your project
- you can also jump to header files by selecting the filename in the #include line, and press Ctrl-D (or the "Find and Open File..." context menu))
- there is a special shortcut to jump between header and implementation file, look it up in Edit->Command and Keybindings ->Miscellaneous->Go to header/source file. (the default keybinding for it does work fine on US keyboards, but not on my local one here. So I do usually change it locally)

Daniel
0 项奖励