Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Macro insertion - automated

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
Dusan Posted - Dec 16 2011 : 07:24:01 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 16 2011 : 12:05:03 PM
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.

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