6

Is there a way to disable this feature in Eclipse CDT Luna?

https://wiki.eclipse.org/CDT/User/NewIn85#Header_File_Rename

I do not want my #include statements being replaced with relative paths as that is against my companies code style.

Example: Before moving a header file:

#include <File.h>

After:

#include "../dir1/File.h"

Is there some setting which will disable this refactoring?

and.pol5
  • 61
  • 3

1 Answers1

0

The header/include management is controlled through a set of options in the Preferences: C/C++ -> Code Style -> Organize Includes:

enter image description here

Jonah Graham
  • 7,890
  • 23
  • 55
  • I have the same problem as the original question. The settings you showed in your answer was my first idea as well. I disabled all settings under Organize includes, and set "Unused Includes and Forward Declarations" to "Keep". But Eclipse STILL occasionally renames my includes to something like "../../../common/foo/foo.h". It's pretty infuriating to be honest. – Martin Oct 14 '16 at 12:07
  • @Martin sounds like you have run into a bug then. Please submit a [bug report](https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT) – Jonah Graham Oct 16 '16 at 08:35