Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Different background color for inactive code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

martin
New Member

Germany
2 Posts

Posted - Sep 25 2009 :  10:21:58 AM  Show Profile  Reply with Quote
Hey, I've a lot of #ifdef/#else/#endif statements in my code and would like to have inactive code colored normally but with a different background color.
Something like http://www.xcomserver.de/VAXsugg.JPG

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Sep 25 2009 :  10:50:13 AM  Show Profile  Reply with Quote
Depending on the IDE you are using, something like this may already exist. Look for the option:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> Colorize inactive code blocks in a different color

zen is the art of being at one with the two'ness
Go to Top of Page

martin
New Member

Germany
2 Posts

Posted - Sep 25 2009 :  10:56:11 AM  Show Profile  Reply with Quote
Well, it's just a check box which disables graying out inactive code. But then I have no more hints which code is active or inactive. It would be nice if nothing but the background color would change for inactive code.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Sep 25 2009 :  11:21:31 AM  Show Profile  Reply with Quote
If this checkbox / feature is turned on then the IDE makes the inactive code grey, which is quite obvious, so you can see at a glance which code the IDE thinks is inactive.

Are you saying this never turns code grey for you? What about:

#if 0
// some code
#endif


zen is the art of being at one with the two'ness
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 25 2009 :  11:31:29 AM  Show Profile  Reply with Quote
He wants normal VA symbol coloring with a special background color.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18751 Posts

Posted - Oct 01 2009 :  08:55:06 AM  Show Profile  Reply with Quote
martin how are you marking your inactive code? Is it simply wrapped in #if 0, #endif, or does it require a more complex method to work out if it is inactive?

In general VA is unable to work out if a given block of code is active or inactive, since it depends on so many things. Is the code being compiled in debug or release mode? Other environment variables, project settings, etc.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000