Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » "Highlight inactive code" editor option not working?
"Highlight inactive code" editor option not working? [message #207167] Thu, 27 December 2007 02:12 Go to next message
Shaun Pinney is currently offline Shaun PinneyFriend
Messages: 14
Registered: July 2009
Junior Member
Hello,

It looks like the C/C++ Editor doesn't pay attention to macros in #included
files when determining when and when not to highlight conditionally compiled
code. Does anyone know how I can fix this? I've been fiddling with the
indexer options and searching the newsgroup archives but so far haven't
found a solution.

I've checked the "Highlight inactive code" option in the C/C++ Editor
Preferences panel and found that it doesn't highlight everything correctly
and may incorrectly highlight some code. It highlights when #if 0 is
encountered but doesn't highlight when #ifndef TEST1 is encountered if TEST1
is defined in an included file. Similarly, it correctly doesn't highlight
when #if 1 is encountered but mistakenly highlights if #ifdef TEST2 is
encountered and TEST2 is defined in an included file.

Thanks,
Shaun
Re: "Highlight inactive code" editor option not working? [message #207300 is a reply to message #207167] Fri, 28 December 2007 23:08 Go to previous message
Shaun Pinney is currently offline Shaun PinneyFriend
Messages: 14
Registered: July 2009
Junior Member
I've resolved this problem by reindexing my project. Thanks

"Shaun" <shaun.pinney@bil.konicaminolta.us> wrote in message
news:fkv1m6$imu$1@build.eclipse.org...
> Hello,
>
> It looks like the C/C++ Editor doesn't pay attention to macros in
> #included files when determining when and when not to highlight
> conditionally compiled code. Does anyone know how I can fix this? I've
> been fiddling with the indexer options and searching the newsgroup
> archives but so far haven't found a solution.
>
> I've checked the "Highlight inactive code" option in the C/C++ Editor
> Preferences panel and found that it doesn't highlight everything correctly
> and may incorrectly highlight some code. It highlights when #if 0 is
> encountered but doesn't highlight when #ifndef TEST1 is encountered if
> TEST1 is defined in an included file. Similarly, it correctly doesn't
> highlight when #if 1 is encountered but mistakenly highlights if #ifdef
> TEST2 is encountered and TEST2 is defined in an included file.
>
> Thanks,
> Shaun
>
Previous Topic:New Eclipse Tutorial
Next Topic:precompiled header?
Goto Forum:
  


Current Time: Thu Nov 07 05:01:25 GMT 2024

Powered by FUDForum. Page generated in 0.04039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top