Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Refactoring: Rename file or unit

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
drzoom Posted - Dec 21 2006 : 07:23:05 AM
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.


2   L A T E S T    R E P L I E S    (Newest First)
support Posted - Sep 13 2012 : 2:04:55 PM
case=1463 is implemented in build 1916
feline Posted - Dec 21 2006 : 07:34:23 AM
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.

case=1463

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