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.

Bug 257009 - Identifiers resolved in editor when they should be unresolved
Summary: Identifiers resolved in editor when they should be unresolved
Status: RESOLVED INVALID
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-06 15:02 UTC by MackSix
Modified: 2015-12-07 10:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample Project (13.97 KB, application/x-zip-compressed)
2015-12-06 15:20 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2015-12-06 15:02:35 UTC
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)
Comment 1 MackSix 2015-12-06 15:19:34 UTC
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.)
Comment 2 MackSix 2015-12-06 15:20:08 UTC
Created attachment 157687 [details]
Sample Project
Comment 3 Alexander Simon 2015-12-07 10:39:37 UTC
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"'