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
 sugg: "Encapsulate Fields (read only)"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Aug 09 2006 :  10:38:32 AM  Show Profile  Reply with Quote
Would be a nice addition to have only a getter added for a property.

Edited by - support on Aug 09 2006 10:41:42 AM

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Aug 09 2006 :  8:08:59 PM  Show Profile  Reply with Quote
look for the VA Autotext entry "Refactor Encapsulate Field". you can edit this to change how Encapsulate Field works, so you should be able to change it to only insert a getter.

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

peterchen
Tomato Guru

126 Posts

Posted - Aug 10 2006 :  10:39:43 AM  Show Profile  Reply with Quote
But I would like to have both! :)
Go to Top of Page

rhummer
Tomato Guru

USA
527 Posts

Posted - Aug 10 2006 :  1:09:29 PM  Show Profile  Reply with Quote
Actually I would like this too. It would be a pain to have to keep channging the autotext..

case=2026

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

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Aug 12 2006 :  3:17:49 PM  Show Profile  Reply with Quote
if i understand correctly then you could try leaving the autotext entry alone and pressing CTRL-SHIFT-L while on the unwanted function. this will delete the entire line, leaving you with the single function you wanted.

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

StefanEgo
Ketchup Master

56 Posts

Posted - Feb 13 2012 :  04:05:33 AM  Show Profile  Reply with Quote
I just ran into this today when I tried to make use of the refactoring method for the first time. What I'd suggest is that in the dialog "Make VA Snippet substituations" would let you choose whether to create a getter, a setter or both. Atm it's quite a lot of manual tweaking to get the refactoring feature to only add a getter, for me resulting in manually adding the function being a lot faster than using VAX' refactoring tool.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Feb 13 2012 :  3:18:53 PM  Show Profile  Reply with Quote
As a temporary work around you can set up two different VA Snippets for the Refactor Encapsulate Field snippet, as explained here:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=7024

so you can change between getting both the getter and the setter, and just the getter.

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