Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Suppress/Hide Special Declarations

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
MichaelC Posted - Sep 26 2010 : 2:29:26 PM
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.
2   L A T E S T    R E P L I E S    (Newest First)
MichaelC Posted - Sep 27 2010 : 11:38:25 AM
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!
accord Posted - Sep 27 2010 : 03:35:06 AM
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.

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