Author |
Topic |
|
peterchen
Tomato Guru
126 Posts |
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.
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
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. |
|
|
peterchen
Tomato Guru
126 Posts |
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 ;)
|
Edited by - peterchen on Mar 30 2012 10:38:11 AM |
|
|
|
Topic |
|
|
|