Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Access to VS 'macros' in Autotext script

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
FlintZA Posted - Oct 04 2007 : 02:41:49 AM
Hi, as discussed in this thread it would be really useful to be able to access the macros available in the Visual Sudio project properties through autotext scripts.

For example I would like to be able to write a script like the following that could generate the contents of a header file:

/*! 	
	\\file $FILE_BASE$.h
	\\author %USERNAME%
	\\brief $end$

	An optional more detailed description.

	Copyright (C) My Company $YEAR$ - All Rights Reserved
*/
#ifndef $(ProjectName)_$FILE_BASE$_h__
#define $(ProjectName)_$FILE_BASE$_h__

// Includes

// Forward declares

$selected$

#endif // $FILE_BASE$_h__



Where $(ProjectName) is the VS macro describing the name of the current project.

There are some really useful macros available in this way and many of them would be a huge help in autotext :)
4   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Sep 19 2014 : 12:35:43 AM
case=969 is implemented in build 2047
FlintZA Posted - Oct 05 2007 : 02:40:16 AM
quote:

How are you using these VS macro's? I have seen them used inside IDE dialogs, but never in the source code.


I'm not currently using them in code, I was hoping to use them in the above autotext situation due to the suggestion mentioned in the thread I linked to.

The configuration problem is an interesting one, and I see how it could be a problem. This suggestion is obviously based on the situation I hit, but it would be interesting to see how others could use such a feature.
sean Posted - Oct 04 2007 : 2:07:27 PM
We're unlikely to implement general support for $(ProjectVars) since the evaluation of many of the possible symbols are configuration dependent (debug vs release for example), not just project dependent and will result in unsatisfactory evaluations in probably half the cases.

If there are requests for particular $(ProjectVars) that are not configuration dependent, then we could take a look at them at some point and possibly add new $reservedStrings$.
feline Posted - Oct 04 2007 : 11:47:15 AM
An interesting idea.

One complication is that VA its self does not know the current project, it does not try to track this information.

I wonder how the IDE defines the current project. You can add a single code file to more than one project at the same time in VS2005, and when you do this, and tell the IDE to track the item in solution explorer it tends to pick a project at random, from the list of projects the file is part of.

That is really an IDE question, and not something VA needs to worry about, but it is still an interesting point.

How are you using these VS macro's? I have seen them used inside IDE dialogs, but never in the source code.

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