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
 Refactoring: Rename file or unit
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ketchup Master

57 Posts

Posted - Dec 21 2006 :  07:23:05 AM  Show Profile  Reply with Quote
Preface: It's very common in c++ that the files are named after the class which is defined in the files. If I rename a class, I used to rename the files in which this class is defined. This is a very time consuming task, because there are #include statements to change.

Topic: There should be a refactoring option to rename the files of a unit. Not only the files of the unit are renamed, also the correct(!) #include statements which are pointing to this file.

Your objections: It's hard to find the correct #include statements which are affected by the rename action.

My opinion: While parsing the files, the relation between the files with #include statements should also be part of the parsed model.

Pitfalls: If the code is using namespaces, the developer are used to organise the files in directory structures which representing the namespaces. Two classes, which are defined in two different namespaces can have the same name. The same name of two classes results in files with the same name. Many tools have problems with this situation, because the developers of these tools only working with one flat list of files (c programmers...).

Like the parser has to understand the correct solving of names in a namespace structure, it has to understand the correct solving of the search in the include search paths. Like the preprocessor does.

Bonus Features: If the user is changing the name of a class, he should have the option to rename the files of the compiling unit too in one step.

best regards

Whole Tomato Software

United Kingdom
17100 Posts

Posted - Dec 21 2006 :  07:34:23 AM  Show Profile  Reply with Quote
This has been requested before, but it is unlikely we will try and do this any time soon. There are already edge cases without even thinking about renaming all of the #include statements.


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:04:55 PM  Show Profile  Reply with Quote
case=1463 is implemented in build 1916
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