Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Macro expanding & reserved string customizing

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
kennyl Posted - Oct 30 2009 : 02:01:04 AM
Hi dear,

I have the following two ideas:

1. Display expanded macro result when mouse move hover a reference of macro.
Maybe can have a button on the tooltip and expanded(enlarge) the tooltip to show the result when clicked.

Example:
Suppose we have this macro defined.
#define DECLARE_MY_FUNC(funcname, TYPE) TYPE funcname()

And then when this following reference is hovered by mouse:

DECLARE_MY_FUNC(Foobar, BOOL);

Display the expanded result in the tooltip, that is:

BOOL Foobar();

By the way, it seems that VA can't display the prototype when Foobar is under the cursor, and unfortunately this same issue happen to any other symbol that declared with macro.

2. How can I add my own "reserved strings" so that I can use them in the Snippets Editor?
The reason for this is I need to share that kind of "self-defined reserved strings" in different snippets.
7   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 11 2010 : 10:38:22 AM
This is what I would expect. I am not an expert on environment variables, but I believe they are read / picked up when a process starts, but not while a process is running.
kennyl Posted - Mar 10 2010 : 10:14:03 PM
Thanks, I have just known that Environment Variables is supported in VA Snippets and it did works, but I modified the environment variables from the System Properties dialog while Visual Studio is still runing, the snippet just won't get updated at all, I have to restart the Visual Studio to "refresh" the variables, or am I doing anything wrong?
feline Posted - Mar 10 2010 : 1:57:39 PM
You can use Environment Variables in VA Snippets. From this page:

http://www.wholetomato.com/products/features/vasnippets.asp

quote:
You can include environment variables in your VA Snippets entries. Visual Assist X expands them as expected. Enclose environment variable names in percent signs when defining the snippet.


and then just update the Environment variable value when you want to change it.
kennyl Posted - Mar 09 2010 : 02:35:49 AM
For 2, I'm using Visual Studio 6.0, so the custom variable for snippets would still be helpful.
accord Posted - Nov 05 2009 : 4:30:18 PM
1. I have put in a feature request for this to see what the developers make of it:

case=35229

2. One way implementing this may be using project macro variables as requested in this recent topic:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=9110

What do you think?
kennyl Posted - Oct 31 2009 : 01:51:13 AM
1. Yes you are right for most simple macro like DECLARE_MY_FUNC, but what about this?


#define COMPLICATED_ROUTINE(_wnd, _type, _oldvalue, _newvalue, _funget, _funset, _prop)	\	_type _oldvalue = _wnd._funget();\	if ( _wnd._funset(_newvalue) )\	{\		_wnd.ShowResult( m_node##_prop );\	}
	
#define IMPLEMENT_MY_FUNC(_func, _type)	\	_type _func()\	{\		MyWnd& _wnd = GetMyWnd();\		COMPLICATED_ROUTINE(_wnd, _type, nOldCount, nNewCount, GetCount, SetCount, Count)\		return nOldCount;
	}



IMPLEMENT_MY_FUNC(Foobar, int)


And since the macro IMPLEMENT_MY_FUNC is nested by another macro COMPLICATED_ROUTINE, once I need to figure out what the COMPLICATED_ROUTINE will do, I have to navigate to IMPLEMENT_MY_FUNC first and then point to that COMPLICATED_ROUTINE.

2. I mean I would like to defined my own "reserved string" for example $MY_CODE_MARK$, which could be done by manually edit a ini file or registry entry or use the snippets editor, then I can insert it to any one of the snippets just like it's a built-in reserved string, and when I want to change the content of $MY_CODE_MARK$, I just need to update that one entry only and that's all.
accord Posted - Oct 30 2009 : 7:44:17 PM
Interesting request, but I think that knowing the macro definition (which is showed in the tooltip) helps understanding what will a macro do with specific parameters. I mean, would it really help interpreting the code easier?

Regarding prototype displaying: I am seeing the same effect here:

case=34854

If you close the definition with ; it'll work:

#define DECLARE_MY_FUNC(funcname, TYPE) TYPE funcname();

Another solution is to turn off

VA Options -> Advanced -> Display -> Display comments from source files when available

and

VA Options -> Advanced -> Display -> Enable automatic Quick Info ToolTips

since it will make Visual Studio (default intellisense) display the tooltips (if you did not turned off intellisense for example by renaming feacp.dll)

2. What would you like to do exactly? Can you give me an example? You may also want to see our snippet description:

http://www.wholetomato.com/products/features/vasnippets.asp

if you didn't do it yet.

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