Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Improved Refactoring Snippets

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
gdobratz Posted - Jan 25 2010 : 6:41:39 PM
It would be helpful if the Symbol Context reserved strings worked in refactoring snippets. Specifically $BaseClassName$ and $MethodArgs$ would be most useful. (By the way the context menu presents them as choices, but they do not work.)

It is often useful to make a call to the base class method, so a it would be nice to be able to include something like:

$BaseClassName$::$MethodName$( $MethodArgs$ );
or
$BaseClassName$::$SymbolName$( $MethodArgs$ );
5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 03 2010 : 9:26:24 PM
This makes sense, now I see what you are after. I have put in a feature request for this:

case=39184
gdobratz Posted - Feb 01 2010 : 6:35:18 PM
I was attempting to have the refactoring snippet automatically insert the base class call.

Obviously things work as expected if you let the refactoring snippet insert the method and then go into the method and use another snippet to insert the base class call.

I was trying to change a two-step process into a one-step process.
feline Posted - Jan 27 2010 : 11:10:49 AM
I see what you are trying to do now, and also why this is not working. The VA Refactoring commands have to work slightly differently, since often the symbol context cannot be picked up from the caret position. E.g. when the refactoring is triggered via Right click in VA Outline.

What exactly are you trying to achieve? You mention calling the base class method. Using the following simple code example:

class testFindRefBase
{
public:
	testFindRefBase();
	const char *displayResult() { return "base format"; }
	void testCallingBaseForm(int nParam1, int nParam2) { }
};

class testFindRefChild : public testFindRefBase
{
public:
	testFindRefChild();
	const char *displayResult() { return "child format"; }
	void testCallingBaseForm(int nParam1, int nParam2)
	{
		|
	}
};


at this point I type "base", which is the shortcut for a new VA Snippet I have just added:

$BaseClassName$::$MethodName$( $MethodArgs$ );

which inserts a call to the base class version of this function, which sounds like it is what you want.
gdobratz Posted - Jan 26 2010 : 1:43:45 PM
I tried it in Refactor Create Implementation. When that did not work, I didn't try it in any others.
feline Posted - Jan 26 2010 : 10:53:18 AM
Which refactoring command are you trying to do this with?

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