Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Disable Automatic Refactor(Disable refactoring of include files when renaming something (a folder))
Disable Automatic Refactor [message #1702951] Mon, 27 July 2015 14:28 Go to next message
Colton Murphy is currently offline Colton MurphyFriend
Messages: 6
Registered: July 2015
Junior Member
I searched online for this question, but it seems that there are no responses to the questions and or solutions.

How do you disable automatic include name refactoring or refactoring in general when renaming something as simple as a folder? I had a folder that was referenced throughout an entire project in include paths and eclipse or CDT decided to rename all my include paths to use absolute paths (which was completely undesired). Additionally, it managed to perform some of the path changes incorrectly meaning when I tried to compile, the include paths were wrong and thus.. I got some errors.
Re: Disable Automatic Refactor [message #1703505 is a reply to message #1702951] Sat, 01 August 2015 16:40 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
I rather like the way renaming (say a header file) gets propagated to the guard preprocessor statements and to the includes in other files.

if you don't want this then don't use Eclipse to rename it. Do it externally then refresh the project. Of course, you will have to manually fix all references as needed.
Re: Disable Automatic Refactor [message #1703507 is a reply to message #1703505] Sat, 01 August 2015 18:12 Go to previous messageGo to next message
Colton Murphy is currently offline Colton MurphyFriend
Messages: 6
Registered: July 2015
Junior Member
(us/we) = my organization.

So you are saying that to rename a folder / header I have to do it on the file system...

This is a horrible feature for our usage. There are reasons why our header includes need to be named a certain way due to organization. For instance, I have "" in the includes and not <>. Eclipse doesn't seem to care and renames everything using <> with an absolute path. Also, it has actually messed up include paths while renaming causing compile errors.

Based on CDT's history, CDT has a horrible track record with us as eclipse users. The indexer is an abomination and half the time it fails to work. When it does work sometimes it fails to resolve 'everything'. This has propagated to us not trusting the renaming "feature" at all. Unless a feature can be reliable 100% of the time, we do not wish to use it. Why would I use a feature when I have to worry about the 10% of the time it fails which can cause obscure bugs or compile errors? This has already happened using the latest CDT.

The indexing / code completion / intellisense features of CDT are all an abomination; however, that is a different discussion. I will note however that visual studio has no problem in any of these areas in their latest releases. I don't have to worry about 're indexing' every time I change a header or move something around. In fact, its transparent to the user.

Why don't we use visual studio you ask? Believe me, we have been looking for years. Visual studio is not a fully mature platform with regards to the debugging on embedded targets yet.

I apologize for starting a rant. I came here looking for how to disable the feature, not start a rant. If you are telling me that I have to rename things outside of eclipse just because the CDT developers said "Yay, this feature is amazing. Nobody could possibly not ever want to use it", that is a huge ding in an already bad track record..
Re: Disable Automatic Refactor [message #1703509 is a reply to message #1703507] Sat, 01 August 2015 19:13 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Maybe making it an option might be nice but in your organization to do put in options for EVERY possible path a user might want to take? If not, it's silly to ask for it here. If you think ts a bug then submit it. If you don't like the development decisions try joining in the development.

The work around is quite simple and hardly IMO an obnoxious one.
Re: Disable Automatic Refactor [message #1703510 is a reply to message #1703509] Sat, 01 August 2015 19:27 Go to previous messageGo to next message
Colton Murphy is currently offline Colton MurphyFriend
Messages: 6
Registered: July 2015
Junior Member
Every possible path? Eclipse has options for literally every possible path for EVERYTHING else. Don't sit there and tell me disabling auto rename is such a big deal. The number of options Eclipse has for everything is obnoxious. Bad comparison.

If I can't rename a folder in Eclipse without it failing (which it has) and have to do it outside the environment, I would argue that CDT / Eclipse whatever is useless. Renaming things is one of the most basic user operations that an IDE should provide. File and folder handling in a project inside an IDE is one of the most basic necessities for an IDE. Eclipse can't even get that right.

Having the feature in Eclipse is a great option. Don't force it on everyone if it DOES NOT work. Have the option to disable it. For those of you that want to use the feature and deal with the 10% of failure cases, more power to you. Don't force your buggy features on the rest of us.

Join in the development? So you want me to waste my time fixing the bad design decisions of other people? I am not wasting my time with software that is not even worth the two pennies I throw at it.

My opinions aside, there have been several other topics around the web stating the same reasoning that I have for having the option of disabling this feature. If your organization has rules for include paths and eclipse goes and screws them up, that is probably not a good thing.

I was not asking for a new feature. I was asking how to disable it. Now that I know there is no way to do that, it's not worth my time to keep up this discussion. It will literally save me effort just using the workaround even it it puts a huge smudge on eclipse's name.

We are done here, I request a mod to take this post down or close it. Not worth my time.

[Updated on: Sat, 01 August 2015 19:42]

Report message to a moderator

Re: Disable Automatic Refactor [message #1703511 is a reply to message #1703510] Sat, 01 August 2015 20:06 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
I think you should carry this discussion to https://bugs.eclipse.org/bugs/ where it can be more appropriately handled.
Read this first: https://wiki.eclipse.org/CDT/Bugs


Re: Disable Automatic Refactor [message #1704985 is a reply to message #1702951] Tue, 11 August 2015 09:17 Go to previous messageGo to next message
Daniel Stenberg is currently offline Daniel StenbergFriend
Messages: 1
Registered: August 2015
Junior Member
Hello,

I am also interested in a solution for this.

When renaming or moving files or folders in the Eclipse CDT Project Exlplorer, include paths are modified automatically.

This is highly undesirable since I have not only encountered build errors because of this, but library files (such as in my case the STM32Cube FW library drivers) are modified as well.

It does not go well with the code style we are trying to use for this project.

I'd like to keep Eclipse from doing this and only search for include paths in the directories I've added to Paths and Symbols.

From the search results I've found it may have to do with indexing and/or Scanner Discovery settings, but I'm not sure how to alter these to avoid my problems.

Any insight would be greatly appreciated!

Best regards
Daniel
Re: Disable Automatic Refactor [message #1729255 is a reply to message #1702951] Tue, 12 April 2016 12:22 Go to previous messageGo to next message
Thijs van Lankveld is currently offline Thijs van LankveldFriend
Messages: 1
Registered: April 2016
Junior Member
Hello,

Has this issue been resolved yet?

I've also suffered highly undesirable behaviour from this bug. So much that I've tried removing all write permissions to the project setting files, but even this did not stop Eclipse from adding bogus include paths.

Strangely enough, these bogus paths were only added to the Debug configuration but for this one they were added to Paths and Symbols (Assembly, GNU C, and GNU C++) and to the Build Settings Incudes of the same three sections.

Furthermore, this only happens for one (of four) included projects. I have four projects for which I want to have in the include path of C++ only:
"A/src"
"B/src"
"C/src"
"D/src"
Eclipse will automatically add
"C"
to this list.

I wish that Eclipse would stop doing this, because of our company policies, I have to remove this constantly before commiting any changes.
Re: Disable Automatic Refactor [message #1771625 is a reply to message #1703507] Mon, 28 August 2017 17:46 Go to previous messageGo to next message
Amogh V is currently offline Amogh VFriend
Messages: 1
Registered: August 2017
Junior Member
@ Colton Murphy,

The rules for Automatic renaming of header files in ecplise can be adjusted to an extent.

To have "" in the includes and not angle brackets (<>), and to ensure absolute paths are not included, do the following :

Window -> Preferences -> C/C++ -> Code Style -> Organize Includes -> Include Style -> System Headers -> System Headers with/without Extension -> UNCHECK "Use angle brackets", and CHECK "Use path relative to the including file"

This is what worked for me. Hope this helps all people with similar issues.
Re: Disable Automatic Refactor [message #1790797 is a reply to message #1702951] Mon, 18 June 2018 06:55 Go to previous message
RaceMouse Mising name is currently offline RaceMouse Mising nameFriend
Messages: 1
Registered: July 2009
Junior Member
Please vote here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=501131
Previous Topic:cross debug problem
Next Topic:Running an alias before debug runs
Goto Forum:
  


Current Time: Thu Apr 25 04:44:56 GMT 2024

Powered by FUDForum. Page generated in 0.02599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top