Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Create implementations for multi-selected symbol

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
kennyl Posted - Dec 11 2009 : 02:23:18 AM
Suppose I already have written a dozen of declarations of member functions in .h and now I want to do the implementation part, I have to create implementations from the context menu one function by one function, can this be done in more simpler way like "Create from selection stuff"?

"Create Declaration" can be done in a similar way?

Thanks.
8   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Oct 24 2012 : 4:00:10 PM
Build 1912 supports mass Create Implementation when invoked on the class.
Arnt Posted - Mar 30 2010 : 03:13:23 AM
I see your point about function selection, however, I still think a simple rule like 'if part of the function name is selected, it's selected' would be adequate. I'd think people could easily understand that.

Currently VA does not know if a function has an implementation or not.

True, but that doesn't stop 'create implementation' from saving me a lot of time, so I don't see a problem for creating multiple implementations?

VA Outline is an easy way of selecting the functions you want to act on, without any ambiguity.

Also true, BUT it means you have to go look in another window, which I find myself not doing so easily.
feline Posted - Mar 29 2010 : 4:59:08 PM
The selection, it is down to what people expect. If you select a #define or key word that goes before the return type is the function selected? Part of a line selection? Since this is debatable some people will be surprised at what counts as selecting the function.

Currently VA does not know if a function has an implementation or not. Matching declarations to implementations is difficult when you consider overloaded functions.

VA Outline is an easy way of selecting the functions you want to act on, without any ambiguity.
Arnt Posted - Mar 24 2010 : 04:45:35 AM
I don't see these as edge cases.

The selection certainly isn't an issue, that goes for everything that works on selection (what if I want to copy 2 parts of text...) or cursor position (e.g. refactorings, what if I want to move multiple implementations to the .cpp file).

The selection also seems simple: if any part is selected, it's selected. Especially for create implementation, this isn't a big problem: at worst, two empty functions to much are created. If you happen to select an existing function, it already has an implementation, so that isn't a problem either.

By all means, implement it on the outline, but I don't see any big issues with implementing it on the context menu as well. If you are really afraid of doing things people don't expect, change the context menu text to 'Create implementations for 6 functions' if you have 6 functions selected.
feline Posted - Mar 23 2010 : 3:25:49 PM
For selecting in the text editor, consider a function declaration that is split across 3 lines. If one of these three lines is selected, is the function selected or not?

What if the function declarations are not next to each other in the editor? Then you cannot select all of them in one go in the editor.

VA Outline bypasses both of these edge cases, allowing you to clearly and easily indicate the declarations you want to operate on.
Arnt Posted - Mar 22 2010 : 05:35:34 AM
I had the same idea today while right clicking 10 functions to do 'create implementation'. Would be nice with selection in the text editor!
CamyDee Posted - Dec 16 2009 : 1:23:41 PM
If the functions are part of an interface, Visual Studio will create empty implementations for you, right-click the interface name and select > Implement or > Implement Explicit depending on which way you want to go. It will also look for existing members which already implement one or more of the functions, and leave yours.
feline Posted - Dec 11 2009 : 11:10:38 AM
We are considering letting you select several items at once in VA Outline and then triggering a single refactoring command on all of them at once:

case=7787

Selecting several items at once in the editor is more tricky, since there are quite a few edge cases to consider :)

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