T O P I C R E V I E W |
sconde |
Posted - Apr 15 2015 : 09:47:52 AM Hello,
I suspect this may be covered elsewhere but I wasn't able to turn up any information in my search. I'm running Microsoft Visual Studio Professional 2012 (Version 11.0.61030.00 Update 4) on Windows 7 64-bit with Visual Assist X (Version 10.7.1918.0 built 2012.10.26).
I've disabled the database and intellisense entirely (Options->Text Editor->C/C++->Advanced->Browsing/Navigation->Disable Database: True) which has in turn stopped the separate coloring (graying out) of logic disabled by the preprocessor.
In the following example all of the text between the '#if OFF' and '#else' lines would have been grayed out:
#define OFF 0 #if OFF class A { A(); }; #else class B { B(); }; #endif
Is there any way to have VAX color that section of code differently? I read elsewhere that this may not be possible because 'VA is designed to parse inactive code, so that it can help you when writing / editing such code'. I appreciate that VAX still parses this inactive logic but in addition to the parsing it would be great to be able to highlight these sections to know at a glance if they are active or not!
Does a VAX option exist to somehow distinguish between inactive and active logic (a different background, muted text colors, grayed out text, etc.) or is it possible to write some kind of script/plugin to VAX (not sure if that kind of thing even exists) to do this?
This is something that has bothered me for some time since I always disable intellisense in lieu of the much superior (except in this one instance :)) VAX. Thanks in advance for your time and help!
Stephane |
3 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Apr 16 2015 : 11:42:45 PM We are considering doing this, but its unlikely to happen just yet. So for now you might want to consider turning the IDE intellisense parser back on, and either set the "Rescan Solution Interval" to its maximum value of 5000, or if the code in question does not change very often, set "Disable Database Updates" to True, and only turn on an IDE recan every few weeks, when you have the time to allow it to run in the background without it getting in the way.
Worth suggesting in case this might help. |
sconde |
Posted - Apr 16 2015 : 10:00:53 AM Thank you for the quick and detailed reply. Turning intellisense off was indeed for performance reasons so I'd prefer to leave that disabled. Will look forward to a future version of VA that allows colouring inactive code. |
feline |
Posted - Apr 15 2015 : 12:38:06 PM Unfortunately no, we don't currently have the ability to work out which code is active and which is inactive. This is by design, since we want to be active all of the time.
One option would be to turn the IDE intellisense back on, and to turn Off the setting:
VA Options -> Listboxes -> Get content from default Intellisense
so that you will get VA intellisense in the list boxes, but the IDE intellisense will be available for the IDE to work out which blocks are inactive, and colour them accordingly.
It depends on why you turned off the IDE intellisense. If it was simply less reliable then this should be fine. But if it was slowing the IDE down, or causing some other problems, then this might not work so well.
We are considering working out which code is active and inactive, and I have put a note onto this case about colouring the inactive code:
case=42316 |
|
|