Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Move Implementation to source file for selection

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
av0tar15 Posted - Oct 05 2008 : 7:57:15 PM
Hi,

It would be great if I could select several methods in header file and apply Move Implementation to Source file to all of them at once. Instead at present I must apply it one by one on each method.

A use case. I create a derived class from class with 24 abstract methods. I've replaced '= 0;' with some default body by the use of Find and Replace and now want all this stuff in the body. The feature would save me some copy/pastes and find/replaces.

9   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Oct 29 2012 : 10:15:56 AM
In build 1918, Move Implementation to Source File is offered on the class declaration for bulk operations (case=68102).
StefanEgo Posted - Oct 29 2012 : 03:36:45 AM
Well, I've to second av0tar15's user experience here. In the described use-case for me as well it would be less comfortable to use VA Outline to do the job, because I'm normally working in the code-window (and not VA Outline).

I do understand that ur decision might be to stick with the VA Outline solution and don't consider adding this feature to the refactoring-entry in the right-click context menu when having selected a code block. Nevertheless, from my pure user point of view, that would be more accessible for me as well. ;-)
feline Posted - Oct 27 2008 : 1:27:53 PM
I can see this being useful, but I can also see this generating a certain amount of problems for support. I have asked internally to see what other people think of this.
av0tar15 Posted - Oct 24 2008 : 12:51:18 PM
What I'm trying to say is that personally I'm ok with resolving the ambiguity towards including everything that can possibly be included. I understand that you would like to avoid user confusion, but on other hand most "confusion-prone" guys are ok to go click UI instead of editing some code. At the moment I'm still doing my coding in code window, and going to any helper is a distruction to some extent.
feline Posted - Oct 09 2008 : 07:16:02 AM
Just looking for curly braces is not going to help much. Consider this piece of code:

class CInterestingCode
{
    struct MemberStruct
    {
        int nMember1;
    };

    int nMember2;

    void MultiLineFunc(
            bool bParam1,
            bool bParam2
            )
            const
            { /* body here */ }
};


Here it is easy to find sets of lines that in isolation are unclear, assuming you are actually selecting entire lines. As soon as you start selecting just parts of a line at either end of your block of code it gets even more "fun".

This is before I start getting clever by using Macro's to hide curly brackets, or to create default implementations.

Assuming for the moment that all of these problems are solved. You then select the entire class body and open the refactoring menu. You are going to see Move Implementation and Encapsulate Field at a minimum. So two quite different commands, which will do quite different things, based on the same selection. Throw in partial selections and it becomes less clear what a given command will actually do.

Selecting a range in VA Outline with the mouse, try single left click then Control + single left click. Arguably as quick, and less error prone
av0tar15 Posted - Oct 08 2008 : 7:18:29 PM
Actually, I'm using mouse to select the code, this really speeds things up :). My opinion - just grab all the curly braces in my selection and make sure I don't see them after "Move to Implementation" action. So I would prefer "yes" answer to the gray area question.
feline Posted - Oct 07 2008 : 07:27:11 AM
When you have member variables mixed in with your member functions, or multi-line member functions (parameters wrapped onto several lines) then you may be selecting the last parameter of a function, or even just a keyword or macro after the closing bracket for the function. Is that selecting the function? It is a grey area, since you can argue yes it is and no it is not.

This is why VA Outline is useful, it is clear cut to specify what you are doing.

Using Shift + Down arrow to select several lines of code takes about the same number of key presses as selecting several items in VA Outline with shift + down arrow.
av0tar15 Posted - Oct 06 2008 : 6:50:04 PM
In my opinion VA Outline wouldn't work that well for this because one doesn't see which methods have bodies and what code particular body contains. As for confusion, I'd suggest to move every method that is at least partially selected, that would fit my style just fine.

The whole point is to implement the idea of a particular refactoring that came to mind with as as few keystrokes as possible.
feline Posted - Oct 06 2008 : 06:41:26 AM
We are considering doing something like this, but using VA Outline to select the methods instead of selecting them in the editor its self:

case=7787

This bypasses any problems with selecting just half a method, or any confusion over which methods VA thinks it is going to move.

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