Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Refactoring: Move class to new file

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
peterchen Posted - Mar 28 2012 : 10:07:30 AM
I've [url=http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=8336]suggested this before[/url], back then it was rejected with "we currently don't consider creating new files". Tis was a while ago, so please reconsider :)

What I have in mind:

When the cursor is over the class name of a class declaration, offer a refactoring command "move to new files". You ask for the file name, the suggestion is based on the folder of the current file and the name of the class.

What this operation could provide (considering C++):


  • Create new header file with declaration

  • Create new body file with implementation (only if required?)

  • Boilerplate for these two files can be taken from VA refactoring macros

  • replicate namespace(s) from the "source" file around the class definition

  • replicate using statements from the "source" file that are in effect at the point of the class definition.
    [*] add includes based on required symbols (not sure if this available), or based on the current file(s).



Especially for C++, where you have to deal with two files (or deal with one of those wizards), these things are flow breakers. There are certainly some open quesitons here, but I don't see any major problems as such.

2   L A T E S T    R E P L I E S    (Newest First)
peterchen Posted - Mar 30 2012 : 10:36:32 AM
Great! I'm Looking forward to it!

The details are just collection of ideas anyway. If it works at all, I'm sure the community will make sure it gets polished ;)
accord Posted - Mar 28 2012 : 11:46:54 AM
These are very good ideas, thank you for the detailed description. Since your last request, we have created a case for this idea:

case=31484

I have added a comment containing your ideas, so the devs can consider them when they get to this. Maybe not all ideas will be included in the first iteration, though.

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