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
 Access to VS 'macros' in Autotext script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

FlintZA
New Member

South Africa
8 Posts

Posted - Oct 04 2007 :  02:41:49 AM  Show Profile  Reply with Quote
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 :)

feline
Whole Tomato Software

United Kingdom
19023 Posts

Posted - Oct 04 2007 :  11:47:15 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Oct 04 2007 :  2:07:27 PM  Show Profile  Reply with Quote
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$.
Go to Top of Page

FlintZA
New Member

South Africa
8 Posts

Posted - Oct 05 2007 :  02:40:16 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 19 2014 :  12:35:43 AM  Show Profile  Reply with Quote
case=969 is implemented in build 2047
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