Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 modification of Encapsulate Field

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
zelka2member Posted - May 09 2007 : 10:37:03 AM
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.
4   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jan 27 2009 : 10:05:23 PM
case=2050 is implemented in build 1715
New tokens are $NamespaceName$, $BaseClassName$, $ClassName$, $MethodName$, and $MethodArgs$.
These should not be used in refactoring snippets.
feline Posted - May 10 2007 : 07:40:40 AM
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.
zelka2member Posted - May 10 2007 : 02:34:23 AM
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.
feline Posted - May 09 2007 : 3:00:12 PM
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.

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