Is there a way in Eclipse CDT to do the following automatic refactorings?
- move file: move a source/header file to another project folder and have every #include directive relative to the moved file automatically updated
- rename file: rename a source/header file and have every #include directive relative to the renamed file automatically updated
If there is no such feature in CDT, is there another tool for Linux that would easily let me do this?
Thank you very much.
I have not been able to find either of these features in CDT 8.0. I would suggest putting in a feature request at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT.
I just did a bunch of your item 2. (header file renaming, #include renaming, include-guard renaming). This took about 3 minutes using eclipse’s Search and Replace. Not bad considering I’ve never done it before. Presumably this might have taken under a minute if “header file rename” was implemented in CDT. Not a big savings, in my book, esp when you consider how infrequently this is done. But then, I had to rename ~20 files. The semi-manual approach I used wouldn’t scale as well as CDT refactor impl probably would.