Eclipse CDT move-file and file renaming refactoring?

Is there a way in Eclipse CDT to do the following automatic refactoring?

  • move file : move the source / header file to another project folder and update each #include directive relative to the moved file.
  • rename file : rename the source / header file and automatically update each #include directive with respect to the renamed file.

If there is no such feature in the CDT, is there another Linux tool that will easily allow me to do this?

Many thanks.

+7
c ++ file eclipse-cdt refactoring
source share
1 answer

I could not find any of these functions in CDT 8.0. I would suggest adding a feature request to https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT .

I just made a bunch of your goods 2. (renaming headers, renaming #include, renaming with protection enabled). It took about 3 minutes with finding and replacing eclipse. Not bad considering I've never done this before. Presumably, this could be required in a minute if the "renaming of the header file" was implemented in the CDT. Not a big saving, in my book, especially when you consider how rarely this is done. But then I had to rename ~ 20 files. The semi-basic approach that I used will not scale, as perhaps the CDT repeater.

+2
source share

All Articles