开发者

Eclipse CDT move-file and rename-file refactoring?

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

  1. move file: move a source/header file to another project folder and have every #include directive relative to the moved file automatically updated
  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜