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 210815 - used macros is not highlighted in editor
Summary: used macros is not highlighted in editor
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-06 11:38 UTC by Vladimir Voskresensky
Modified: 2012-05-11 13:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (194.00 KB, application/x-tar)
2012-04-06 11:38 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2012-04-06 11:38:00 UTC
Created attachment 117938 [details]
sample project

- extract attached SubProject_5
- run IDE with -J-Dcnd.modelimpl.parser.threads=1

all header files are included twice from main.cc and from hello*.cc
=> both macros EMPTY_MACRO* are visible in included hello*.h files
but only one of them is highlighted and navigatable in header files
Comment 1 Vladimir Voskresensky 2012-04-06 11:42:26 UTC
the reason is impl of FileInfoQueryImpl.getMacroUsages
it walks using start preprocessor states associated with header file
But in this case such state is only one, because both inclusions were "equal" if consider amount of activated active preprocessor blocks => only one of them was kept

Right approach is to keep used macros in FileComponentReferences during walk/parse of file
In this case walk though includes will be not needed as well and it will speed up initial open of files after IDE restart
Comment 2 Vladimir Voskresensky 2012-04-09 10:03:17 UTC
added MacroUsagesTestCase.DISABLED_testMacroUsages210815
http://hg.netbeans.org/cnd-main/rev/3cf4755d7e55
Comment 3 Quality Engineering 2012-04-10 10:03:48 UTC
Integrated into 'main-golden', will be available in build *201204100400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3cf4755d7e55
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: added macro usages test (for #210815)