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
 Suppress/Hide Special Declarations
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MichaelC
New Member

3 Posts

Posted - Sep 26 2010 :  2:29:26 PM  Show Profile  Reply with Quote
Many C++ applications create infrastructure in classes that can be ignored during most usage of the class. Usually this is accomplished by a macro that injects declarations (for example, many classes written for Qt require a Q_OBJECT macro in their declaration.) When working with such classes, the listing of infrastructure members distracts from the 'real' members of the class, and make learning/understanding the code harder.

If Visual Assist parsed all code with a special symbol defined (say, _VISUAL_ASSIST_ or something more generic like _PARSING_FOR_NAVIGATION_) then code could be written in such a way that uninteresting infrastructure could be hidden. For example, it would be nice to be able to write code as follows so the 'ugly guts' of the class don't pollute Visual Assist:


#ifdef _VISUAL_ASSIST_
#define UGLY_GUTS( CLASSNAME ) // Hide this from Visual Assist
#else
#define UGLY_GUTS( CLASSNAME ) private: static CGuts<CLASSNAME> CLASSNAME_Guts;
#endif

class CMyClass
{
UGLY_GUTS( CMyClass );
public:
	int GetValue();
private:
	int m_nValue;
};


This would need to be a toggleable feature, since sometimes you do care about the guts. (Ideally the Visual Assist popup could have a subtle indicator that there are hidden members that you could click to show them.)

It might also make more sense to use a special comment string like //%%IGNORE_FOR_VISUAL_ASSIST%% rather than a special #define symbol.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 27 2010 :  03:35:06 AM  Show Profile  Reply with Quote
Your reasoning makes sense.
You can already do such a thing, without touching any #define codes in real projects (modifying a library code may be hard and time consuming)

There is a special file where you can override macros:
http://docs.wholetomato.com?W302

so putting

#define UGLY_GUTS( CLASSNAME )

style code in this file will hide the members in it.
Usually, this file is used to simplify or ignore complex macro code that VA may not parse correctly but you can use also for this purpose you had mentioned.
Go to Top of Page

MichaelC
New Member

3 Posts

Posted - Sep 27 2010 :  11:38:25 AM  Show Profile  Reply with Quote
That's helpful - I thought I remembered there being a feature like that, but I couldn't seem to locate any documentation about it.

The big disadvantage with this approach is that it doesn't scale well to large groups of programmers, who would all have to manually keep their local file in sync with a changing codebase... Still, it's better than nothing!

Thanks!
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