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
 how to custom a refactor?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

newerC
Starting Member

1 Posts

Posted - Aug 04 2008 :  11:28:19 AM  Show Profile  Reply with Quote
how to custom a refactor?

TCHAR szClass[MAX_PATH];
I want to define my refactor to do following things!!!
eg: szClass ---> sizeof(szClass)/sizeof(TCHAR);

//////////////////////////////////////////////////
Refactor Create sizeof
$end$sizeof($SymbolName$)/sizeof($SymbolType$)
////////////////////////////////////////

When i create a suggestion like that, it doesn't work.
And the refactor "Create sizeof" didn't appear in the refactor menu???

help!!!!

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 04 2008 :  11:39:37 AM  Show Profile  Reply with Quote
You cannot create you own custom refactor options. You only see the Refactor options inside the VA Snippets editor so that you can customize the available refactoring options.

For what you are trying to do using the normal Snippets is your only route. There is a case # out there that is supposed to add some of the refactor keywords to normal snippets. I don't know the number off hand, or how many keywords are to be supported outside the refactor options, but I'm sure feline can find that. :)

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64


Edited by - rhummer on Aug 04 2008 11:40:28 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Aug 04 2008 :  11:56:21 AM  Show Profile  Reply with Quote
the case for refactoring tokens in normal snippets is:

case=3204

Here you can use both $selected$ and $clipboard$ so with a bit of care you can have a normal snippet do this, using $clipboard$ for the type and $selected$ for the symbol name.

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