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 with declaration

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
devarni Posted - Aug 10 2007 : 09:45:14 AM
At first, VAX is fantastic. It makes refactoring so easy!

If the implementation inside a class is moved to another class with the VAX-outline view (cut and then paste in the outline of the other class), the declaration inside the class should be moved too. Also it would be a great idea to rename the class part from the method to the new classname.

3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 10 2007 : 6:21:03 PM
I don't really follow what you are doing. I get the impression you are using VA Outline to move the implementation, and that you are doing this in the cpp file.

However my cpp files, even when I have to classes, look like this:

void CFoo::method1() { /* ... */ }
void CFoo::method2() { /* ... */ }

void CBar::method1() { /* ... */ }
void CBar::method2() { /* ... */ }

when the code is organised like this moving the function implementations around in the file does not move them from one class to another.

Currently VA Outline is not designed to update two different files in one go. Assuming your code is split between a header file and a cpp file then this would be required.

Moving a function from one class to another class is an interesting refactoring operation, but is not quite what VA Outline is designed to do.

How a "move function from class A to class B" should work would need a little bit of thought.
devarni Posted - Aug 10 2007 : 5:59:05 PM
I have refactored a class... Created a new class and moved a member of another class to this new class.
For that in the VAX-Outline I cut the member (contextmenu "cut") and opened the implementation for the other class. There in the VAX-Outline I paste (Contextmenu "Paste") the previous cutted member.
But this only moves the member implementation with the old class prefix "bool oldclass::mymethod()". Instead it should paste the complete member with the renamed prefix "thisclass::mymethod()" and also moves the declaration in the header to the new class.

In other words...
I would be nice to have a complete moving of a member from one class to another. This only needs some improvements, eg. the class prefix must be renamed to the class where the member is pasted and the declaration in the header must be moved to the header of the class where the method is pasted.
You know what I mean?
feline Posted - Aug 10 2007 : 5:07:20 PM
How is your code structured? Could you post a short example?

You talk as if the implementation and declaration are separate, but if so then how can you move the implementation from one class to another class? I am feeling a little confused.

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