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
 modification of Encapsulate Field
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

zelka2member
New Member

7 Posts

Posted - May 09 2007 :  10:37:03 AM  Show Profile  Reply with Quote
I would like to modify Set function encapsulating a field to return dereference to this (it really has some advantages). Result should look like this:

class A
{
int something;
public:
A& SetSomething(int val)
{
something=val;
return *this;
}
...
};

I cannot use $SymbolContext$ because it contains class_name::symbol_name.

Is there any $...$ containing just class name? Where to get list of $...$ ? Why is there no full text search on your web site?

Thanks.

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 09 2007 :  3:00:12 PM  Show Profile  Reply with Quote
Full searching of the website is something we are looking into, we just have not got there yet.

The main list of $$ tokes is here: http://www.wholetomato.com/products/features/autotext.asp

Also the list is available if you right click in the autotext editor and look under "Insert"

I don't understand what you are trying to achieve. If you want return *this then you can do this, since this is a keyword, so it is always the same.

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

zelka2member
New Member

7 Posts

Posted - May 10 2007 :  02:34:23 AM  Show Profile  Reply with Quote
Thank you for reply - I should have tried left click. But I did not find what I'm looking for among all $...$ (maybe I'm wrong).

I have no problem with this keyword as it is always the same but with type the function is supposed to return. Return type must be explicit in such cases in C++ syntax.

Have a look at SetSomething function. In this example that return type is A. Class A is something as $SymbolOwner$ in context of "Encapsulate Field" operation.

Hope it clears my intentions, what is your opinion now?

By the way, $PropertyName$ (which I inserted from menu) prompts me to enter value of $PropertyName$ in case of "Encapsulate Field". I did not try it elsewhere. I am using version 1541.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 10 2007 :  07:40:40 AM  Show Profile  Reply with Quote
I understand now. We are looking to add the class name to the autotext symbols:

case=2050


$PropertyName$, based on the description of $GeneratedPropertyName$ here:

http://www.wholetomato.com/products/features/encapsulateField.asp

that this is supposed to prompt you for the name you want to give the property.

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

support
Whole Tomato Software

5566 Posts

Posted - Jan 27 2009 :  10:05:23 PM  Show Profile  Reply with Quote
case=2050 is implemented in build 1715
New tokens are $NamespaceName$, $BaseClassName$, $ClassName$, $MethodName$, and $MethodArgs$.
These should not be used in refactoring snippets.

Whole Tomato Software, Inc.
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