Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Move Implementation with declaration
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

devarni
New Member

5 Posts

Posted - Aug 10 2007 :  09:45:14 AM  Show Profile  Reply with Quote
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.


Edited by - devarni on Aug 10 2007 11:30:51 AM

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 10 2007 :  5:07:20 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

devarni
New Member

5 Posts

Posted - Aug 10 2007 :  5:59:05 PM  Show Profile  Reply with Quote
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?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 10 2007 :  6:21:03 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000