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.
Test case: 1) Let's have 2 files - a header and a source file, for example, class1.h and class1.cc. 2) In the class1.h header put the following: #ifndef _CLASS1_H #define _CLASS1_H /* <... put any class here, even dummy; just any valid code with valid highlighting in the editor...> */ #endif // _CLASS1_H 3) Put class implementation into the class1.cc: #include "class1.h" /* <...here goes the implementation, just any valid code...> */ 4) Switch back to the class1.h in the IDE, observe that the source code highlighting is correct. 5) Switch back to the class1.cc in the IDE and add one more include preproc, like this: #include "class1.h" #include "class1.h" /* <...previous content goes here...> */ 6) Switch back to the class1.h in the IDE and see that all the text inside the macro-guard becomes grey (like 'disabled'); I mean in between #ifndef _CLASS1_H and #endif // _CLASS1_H My comments. Supposing that inside the compilation unit the macroses are kept alive to preserve consistency in the editor. This would not be a problem. But, I guess, the header file is shown not as a single file but as a part of .cpp, so double include enables that macro and text inside macro-guard becomes grey.
I can not reproduce this bug on my Solaris. This issue duplicates IZ 120938 - ifndef/define macro in header renders its whole scope as grey (as in comment). http://www.netbeans.org/issues/show_bug.cgi?id=120938
Not repeatable. It seems bug was fixed when IZ#120938 was fixed.