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

 All Forums
 Visual Assist
 Feature Requests
 More C++ Refactoring
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - Oct 18 2011 :  1:12:13 PM  Show Profile  Reply with Quote
I really wish there were more C++ refactoring commands. Some just off the top of my head:

When multiple multiple functions are selected in a class definition:
- G?Extract interfaceG? command that creates a new class/struct with the selected function definitions copied and changed to pure virtuals.

When caret on class name in header file:
- G?Move to new fileG? command. Typically after you have extracted a new interface.
- G?Rename file to match classG? command. Typically after a rename, since I want the filenames to match.

If there are any readily available macros that can do this, please point me in their direction :)

Whole Tomato Software

United Kingdom
17026 Posts

Posted - Oct 18 2011 :  4:03:09 PM  Show Profile  Reply with Quote
We are considering adding a refactoring command to extract an interface from a class:


Unfortunately we don't have any plans to get involved with creating new code files or renaming code files. Adding code files is not clear cut since different people work with very different directory structures, so it would not be clear where to put the files. There is also the question of adding the files to source control.

Renaming files raises problems with source control systems, and risks loosing the change history for the file.

I am not aware of any IDE macro's to do either of these things, but you might find some by doing a web search.

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

Whole Tomato Software

2817 Posts

Posted - Oct 26 2011 :  4:11:45 PM  Show Profile  Reply with Quote
Good ideas!

case=62266 : Move to new file
case=62267 : Rename file
Go to Top of Page

Senior Member

37 Posts

Posted - Oct 27 2011 :  08:52:11 AM  Show Profile  Reply with Quote
+1 from me. Moving classes between source files is a very important step when I refactor code. I'd love to see some help from VisualAssist there. Even if you ignore the problems with source control systems it would still be very useful.
Go to Top of Page

Whole Tomato Software

United Kingdom
17026 Posts

Posted - Oct 27 2011 :  6:11:14 PM  Show Profile  Reply with Quote
For now, you can use VA Outline to help you move the code to a new file:


Just select the class, or code blocks you want to move in VA Outline, cut from VA Outline, and paste into the destination file.

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

Whole Tomato Software

5566 Posts

Posted - Sep 13 2012 :  2:02:49 PM  Show Profile  Reply with Quote
case=62267 is a duplicate of case=1463
case=1463 is implemented in build 1916
Go to Top of Page

New Member

8 Posts

Posted - Dec 05 2012 :  12:54:01 AM  Show Profile  Reply with Quote
Rename file is very useful, thank you for implementing it.

I would add my vote for case=62267 : Rename file
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000