Finding list of header files in editor

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Finding list of header files in editor

4,628件の閲覧回数
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 返答(返信)

633件の閲覧回数
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 件の賞賛

633件の閲覧回数
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 件の賞賛

633件の閲覧回数
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 件の賞賛