Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Find References and #if

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mvolkar Posted - Jan 28 2008 : 3:44:42 PM
We have several different builds of our C code that are conditionally built using preprocessor directives (e.g., #if, #ifdef, etc.). I frequently use the Find References command from Visual Assist and I've found that this apparently does not take into account the preprocessor directives. So, even though Find References will return results for a symbol, I often find that once I navigate there the code is "inactive" in Visual Studio due to being inside an #if block.

I was wondering if there was any consideration for trying to make Visual Assist handle this by not returning references that are in inactive blocks of code.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 29 2008 : 09:21:39 AM
You might be able to "fool" VA, but off hand I am not quite sure how to get this to compile.

You can use VA's "StdAfx.h" file as explained in this FAQ entry:

http://docs.wholetomato.com?W302

and add something like:

#define START_IGNORE_BLOCK /*
#define END_IGNORE_BLOCK */

at the bottom. This file is used to help VA's parser with difficult code, and can be used to work around odd effects. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

You would need to have these resolve into something suitable while compiling, but I am not quite sure what. Simply using:

#define START_IGNORE_BLOCK #if 0

is unlikely to work.
mvolkar Posted - Jan 29 2008 : 09:06:44 AM
Thanks for the reply. This is pretty much what I expected, but it never hurts to ask.
feline Posted - Jan 29 2008 : 09:04:34 AM
Unfortunately no. VA is designed to help you with code inside these blocks, so it does not try to ignore them. Also VA does not always have access to all of the information required to work out which blocks are active and which are inactive.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000