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
 Technical Support
 Macro insertion - automated
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Dec 16 2011 :  07:24:01 AM  Show Profile  Reply with Quote
Hi all, is there any automated way to insert macro to start of function body?

Let's say I have macro:

Collapse | Copy Code

#define WRITE_LINE printf("%s - %d\\n", __FUNCTION__, __LINE__);


And a function:

Collapse | Copy Code

void foo()
{
  DoSomething();
}


What I want is somehow modify all functions in VisualStudio 2005 project to have it like follows:

Collapse | Copy Code

void foo()
{
  WRITE_LINE
  DoSomething();
}


Is it possible?

Thank you

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Dec 16 2011 :  12:05:03 PM  Show Profile  Reply with Quote
If we can assume that the only time you have { at column 1 then you should be able to do this with an IDE regular expression find and replace fairly easily.

Unfortunately this is not the sort of thing VA is designed to help you with, so the regular expression find and replace is probably the best place to start.

zen is the art of being at one with the two'ness
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