T O P I C R E V I E W |
smoothsippin |
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$() ???
|
9 L A T E S T R E P L I E S (Newest First) |
feline |
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. |
wesbigelow |
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. |
support |
Posted - Jan 31 2010 : 1:31:33 PM case=35316 addresses the enhancement for $generatedPropertyName$, and is implemented in build 1810 |
sean |
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. |
sean |
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).
|
jhoffmann |
Posted - Nov 06 2009 : 4:07:02 PM Just wanted to second the suggestion - we could use this option at our company as well.
|
feline |
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. |
rec |
Posted - May 11 2009 : 04:11:36 AM Any news on whether this will be/has been implemented? |
accord |
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. |