This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Identifiers declared in a header file within the "Header Files" logical folder will be resolved in a source file open in the editor when there is no include directive. Only when the project fails to compile will the identifiers become unresolved. In this case, if an include directive is added for the header file, the identifiers may remain unresolved, even if "Reparse Project" is invoked. The file must be closed and reopened or the project compiled to resolve the identifiers in the editor. Product Version: NetBeans IDE Dev (Build 201512050002) Java: 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM 25.66-b17 Runtime: Java(TM) SE Runtime Environment 1.8.0_66-b17 System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)
1. For example, open up the attached project. 2. Open Containers.cpp 3. Comment out line 18 "#include "Vector.h" and save file. 4. Nothing changes in editor. 5. Reparse Project and notice nothing changes in editor. 6. Clean & Build project and notice that it fails and now Vector identifiers are unrecognized in editor. 7. Add line 18 back and save file. 8. Nothing changes in editor. 9. Reparse Project and notice nothing changes, the identifiers are still unrecognized. 10. Close file and reopen it. Now the identifiers are recognized. (Alternatively, Build project again and the identifiers are recognized.)
Created attachment 157687 [details] Sample Project
IDE marks lines with compile errors. It is expected behavior. Errors go away after recompile project. Code model resolves 'Vector without '#include "Vector.h"' because it is a code model feature: -Change line 23 to: Vecto v; -Invoke completion after 'o' -Select "Vector" -See IDE adds '#include "Vector.h"'