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
 Allow case options for $GeneratedPropertyName$()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

smoothsippin
Starting Member

1 Posts

Posted - Oct 31 2008 :  11:11:51 AM  Show Profile  Reply with Quote
When using the refactoring to encapsulate a field, it would be nice if I could control the case of the method. That is,

string m_item;
produces
string ItemOne() const { return m_itemOne; }
void ItemOne(string val) { m_itemOne = val; }

which if fine by me, but my company has a code standard that this should be
string itemOne() const { return m_itemOne; }
void itemOne(string val) { m_itemOne = val; }

I cannot seem to find a way to do this. Maybe there should be a
$generatedPropertyName$() ???




accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 01 2008 :  12:53:24 PM  Show Profile  Reply with Quote
I have put a note on

case=2765

to see what our developers make of it. This case is about to make it possible to convert snippet items to upper or lower case.

Edited by - accord on Nov 02 2008 12:03:45 PM
Go to Top of Page

rec
New Member

2 Posts

Posted - May 11 2009 :  04:11:36 AM  Show Profile  Reply with Quote
Any news on whether this will be/has been implemented?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - May 12 2009 :  7:17:16 PM  Show Profile  Reply with Quote
Unfortunately there is no progress to report on this, it is still in our list of things we are considering doing.

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

jhoffmann
New Member

2 Posts

Posted - Nov 06 2009 :  4:07:02 PM  Show Profile  Reply with Quote
Just wanted to second the suggestion - we could use this option at our company as well.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 06 2009 :  8:19:21 PM  Show Profile  Reply with Quote
Here's a way to make VA give you a chance to edit the generated name.

VAssistX | Insert VA Snippet | Edit VA Snippets...

Locate the "Refactor Encapsulate Field" item (pay attention to the root language node) in the left hand tree.

In the body, replace all occurrences of this:
$GeneratedPropertyName$
with this:
$GeneratedPropertyName=$GeneratedPropertyName$$

Press OK.

Now when you run Encapsulate Field, VA will prompt you for the value of the generated name and it will pre-populate the edit field with the name that it generated. You just change the first letter (or the whole name).
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 06 2009 :  8:31:44 PM  Show Profile  Reply with Quote
That said, there does seem to be convention for lower-case field names, so we'll add $generatedPropertyName$ in the next build.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 31 2010 :  1:31:33 PM  Show Profile  Reply with Quote
case=35316 addresses the enhancement for $generatedPropertyName$, and is implemented in build 1810

Whole Tomato Software, Inc.
Go to Top of Page

wesbigelow
New Member

9 Posts

Posted - Jun 16 2010 :  8:04:44 PM  Show Profile  Reply with Quote
I just went searching the Visual Assist documentation for the ability to change case in my snippets. That feature would have helped me out just now, and I could definitely make use of it in the future.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jun 18 2010 :  1:04:21 PM  Show Profile  Reply with Quote
I don't understand what you are talking about. Can you post a simple example to show me what you are trying to do?

Simple VA Snippets simply insert the text in the snippet body, and you can give this text what ever case you want.

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