Author |
Topic |
|
smoothsippin
Starting Member
1 Posts |
Posted - Oct 31 2008 : 11:11:51 AM
|
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
|
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 |
|
|
rec
New Member
2 Posts |
Posted - May 11 2009 : 04:11:36 AM
|
Any news on whether this will be/has been implemented? |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - May 12 2009 : 7:17:16 PM
|
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 |
|
|
jhoffmann
New Member
2 Posts |
Posted - Nov 06 2009 : 4:07:02 PM
|
Just wanted to second the suggestion - we could use this option at our company as well.
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Nov 06 2009 : 8:19:21 PM
|
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).
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Nov 06 2009 : 8:31:44 PM
|
That said, there does seem to be convention for lower-case field names, so we'll add $generatedPropertyName$ in the next build. |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Jan 31 2010 : 1:31:33 PM
|
case=35316 addresses the enhancement for $generatedPropertyName$, and is implemented in build 1810 |
Whole Tomato Software, Inc. |
|
|
wesbigelow
New Member
9 Posts |
Posted - Jun 16 2010 : 8:04:44 PM
|
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. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Jun 18 2010 : 1:04:21 PM
|
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 |
|
|
|
Topic |
|