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 115707 - Macros not defined in file
Summary: Macros not defined in file
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-17 13:53 UTC by avp
Modified: 2007-10-05 15:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description avp 2007-09-17 13:53:49 UTC
When macros was defined in project "Code Assistance->C++ Compiler->Preprocessor Definitions->..." then in code editor 
code which is placed in #ifdef  ... #endif is gray. I suppose this is when this macros is not defined but he is 
defined.
Comment 1 avp 2007-09-17 14:11:34 UTC
Clarification. Code in clause #ifdef/#endif has strange behavior. He sometimes show normal and sometimes not. In
"Welcome project" I set macros in project options and in .cc file #ifdef/#endif-code shows ok, but in header not.
Comment 2 Alexander Ioffe 2007-09-18 17:06:31 UTC
Really the situation is as described below.

Create project
Create C++ header
create code

#ifdef AAA
int a;
#endif

=> Highlighting is ok. codemodel (class view, navigator, codecompletion are ok)

Go to project propeties | C/C++ | C++ compiler | general
and define AAA = 1
OK

=>
highlighting is bad. Code model (class view, navigator, codecompletion are ok)
"int a;" highlighted with grey, but "a" is present in model

Go to editor. type space and delete it. Save file

=> Codemodel corrupted. "a" disappeared from model
Comment 3 Vladimir Voskresensky 2007-09-24 18:18:14 UTC
fixed:
 - introduced isValid state of preproc state
 - invalidate states on property changes

cvs log:
Checking in apt/src/org/netbeans/modules/cnd/apt/impl/support/APTHandlersSupportImpl.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/impl/support/APTHandlersSupportImpl.java,v  <-- 
APTHandlersSupportImpl.java
new revision: 1.8; previous revision: 1.7
done
Checking in apt/src/org/netbeans/modules/cnd/apt/impl/support/APTPreprocHandlerImpl.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/impl/support/APTPreprocHandlerImpl.java,v  <-- 
APTPreprocHandlerImpl.java
new revision: 1.8; previous revision: 1.7
done
Checking in modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ProjectBase.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ProjectBase.java,v  <-- 
ProjectBase.java
new revision: 1.39; previous revision: 1.38
done
Checking in modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/FileImpl.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/FileImpl.java,v  <-- 
FileImpl.java
new revision: 1.35; previous revision: 1.34
done
Checking in modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/FileContainer.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/FileContainer.java,v  <-- 
FileContainer.java
new revision: 1.13; previous revision: 1.12
done
Checking in modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ParserQueue.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ParserQueue.java,v  <-- 
ParserQueue.java
new revision: 1.19; previous revision: 1.18
done
Checking in apt/src/org/netbeans/modules/cnd/apt/support/APTPreprocHandler.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/support/APTPreprocHandler.java,v  <-- 
APTPreprocHandler.java
new revision: 1.5; previous revision: 1.4
done
Checking in apt/src/org/netbeans/modules/cnd/apt/support/APTHandlersSupport.java;
/shared/data/ccvs/repository/cnd/apt/src/org/netbeans/modules/cnd/apt/support/APTHandlersSupport.java,v  <-- 
APTHandlersSupport.java
new revision: 1.7; previous revision: 1.6
done
Comment 4 soldatov 2007-10-05 15:04:39 UTC
verified in 200710050000 build