Bug 187609 - Add "rename file" refactoring
Summary: Add "rename file" refactoring
Status: CONFIRMED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: language (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 265236 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-19 16:45 UTC by Thomas McGuire
Modified: 2018-12-16 20:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas McGuire 2009-03-19 16:45:25 UTC
Version:            (using Devel)
OS:                Linux

It would be cool if KDevelop had support for renaming files, ideally from right-clicking in the project tree.

Renaming a file should:
- Rename the .cpp and the .h file
- Tell the VCS system about it (in SVN, that would be 'svn mv')
- Update the CMakeLists.txt or whatever other project system is being used
- Update all #include statements
- Update header guards
- Maybe update the filename in the license comment, sometimes it is there.

Ideally, KDevelop would also trigger a optional file rename if a user tries to rename a class and KDevelop detects that the class has the same name as the file.

Currently, renaming a file in C++ is really cumbersome.
Comment 1 Andrey Batyiev 2011-03-17 10:56:55 UTC
Current state of things:

Works (= generic code is working, bugs (if any) should be filled per plugin):
- Tell the VCS system about it (in SVN, that would be 'svn mv')
- Update the CMakeLists.txt or whatever other project system is being used

Left to do (in *my* order of *significance*):
- Update all #include statements
- Update header guards
- Maybe update the filename in the license comment, sometimes it is there.
  (Probably it should search-n-replace in all comments, e.g. in cases of "See file somefile.cpp for examples/comments/other stuff")
- Rename the .cpp and the .h file
Comment 2 Aleix Pol 2011-03-17 14:45:23 UTC
*** Bug 265236 has been marked as a duplicate of this bug. ***
Comment 3 Aleix Pol 2012-11-21 02:08:23 UTC
Now the .cpp and .h files are renamed as well.

Left to happen, update include statements and header guards.
Here I'm unsure that this has to happen...