Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How do I change highlighting of C++ preprocessor directives?
icon5.gif  How do I change highlighting of C++ preprocessor directives? [message #758631] Thu, 24 November 2011 00:31 Go to next message
Arman  is currently offline Arman Friend
Messages: 15
Registered: November 2011
Junior Member
Ok so suppose I have this:

#define MYDIRECTIVE

#ifdef MYDIRECTIVE
bool myswitch = 1;
#else
bool myswitch = 0;


Eclipse will go ahead and white out the bottom half of that if statement (because MYDIRECTIVE is defined), which is fine, but I'd like to change the color of that highlighting. I initially thought to look here: Windows->Preferences->C/C++->Editor->Syntax Coloring->Preprocessor

However, all I find there is how to change the coloring of the preprocessor text, not the highlighting. Any ideas? I'm using Eclipse 3.7.0 with the eclipse color theme plugin v0.11.0, running on ubuntu.

[Updated on: Fri, 25 November 2011 04:37]

Report message to a moderator

Re: How do I change highlighting of C++ preprocessor directives? [message #764817 is a reply to message #758631] Mon, 12 December 2011 22:37 Go to previous messageGo to next message
Michael  is currently offline Michael Friend
Messages: 1
Registered: December 2011
Location: Portland, OR
Junior Member
For CDT, I've found this in Windows > Preferences > C/C++ > Editor. In the list of "Appearance Color Options" you'll find the "Inactive Code Highlight" sets the value for disabled code. In the example you presented above, the last 2 lines would be highlighted by this color.
Re: How do I change highlighting of C++ preprocessor directives? [message #767873 is a reply to message #764817] Mon, 19 December 2011 05:45 Go to previous message
Arman  is currently offline Arman Friend
Messages: 15
Registered: November 2011
Junior Member
Great, thanks for this Smile
Previous Topic:Which Eclipse for Android development?
Next Topic:How to redirect the output to the designer?
Goto Forum:
  


Current Time: Fri Nov 28 00:44:16 GMT 2014

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

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