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
 Refactor Move to Source
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

M2tM
Junior Member

12 Posts

Posted - Jan 27 2009 :  04:30:00 AM  Show Profile  Reply with Quote
This is a great feature, one thing that is a bit annoying is that it moves the bracket to the next line regardless of how I set it originally. This means I have to manually go in and remove the newline for each item anyway. I know it's not mission-critical but it would be nice.

ie:

void foo(){
...
}

becomes

void bar::foo()
{
...
}

which I would prefer retaining the same brackets as I gave it:


void bar::foo(){
...
}


I can understand wanting to expand something like this and needing to pick a style and go with it:

void foo(){...}

But when the ending bracket isn't on the same line it would be nice if it made no assumptions and kept the brackets in their respective relative positions.

Edited by - M2tM on Jan 27 2009 04:50:58 AM

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jan 28 2009 :  2:50:10 PM  Show Profile  Reply with Quote
You can change the formatting that is used. Simply edit the VA Snippet entry "Refactor Create Implementation" and set the brackets how you want them

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

M2tM
Junior Member

12 Posts

Posted - Jan 28 2009 :  9:06:15 PM  Show Profile  Reply with Quote
Thank you so much :)

Sorry for bugging you with this then! I wasn't aware.

*edit: just tuned it to my liking, worked like a charm. Took a bit of finnagling to find out where to do this. Providing a link in the settings to the directory of template files would have eliminated this question so it may be worth doing in the future (just something to open the directory with a brief explanation that modifying those templates will modify the way re factoring and other pattern stuff works.)

Edited by - M2tM on Jan 28 2009 9:32:23 PM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jan 28 2009 :  9:44:45 PM  Show Profile  Reply with Quote
Sometimes we are too close to the product and things seem obvious...

1 option - VA Options | Advanced | Suggestions | Edit VA Snippets
Another - VAssistX (in top menu) | Insert VA Snippet | Edit VA Snippets (Alt+X,I,E)
Another - VA Context Menu (rt-click in selection margin or shift+rt-click in source) | Edit VA Snippets

Other notes:
Snippets are defined per language (pay attention to parent tree node in the left hand pane).
The snippet editor has a context menu for reserved strings ( see
http://www.wholetomato.com/products/features/vasnippets.asp#reserved ).
Go to Top of Page

M2tM
Junior Member

12 Posts

Posted - Jan 31 2009 :  10:50:02 PM  Show Profile  Reply with Quote
It's probably more a case of RTFM than anything and me being unaware of the terminology "snippet".
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