Weird cproject and language settings reformatting issue [message #1830537] |
Tue, 28 July 2020 14:47  |
Eclipse User |
|
|
|
I've been working with Eclipse 2020-06 for a while. I originally used the Eclipse installer to install the C/C++ IDE at 2019-06 and have updated it as time's passed. I somehow managed to screw up that installation today, so made a clean install of 2020-06. However I've now found that my language.settings.xml files are being modified weirdly but, more importantly, the same is happening to my .cproject files.
Essentially all the indentation is being changed; where previously only tabs were used, it seems like Eclipse has put a newline after the tabs (that were already there), then re-indented the settings line using spaces.
Has anyone else come across this? If so, is there a way to make it go back to how it was before? Alternatively, does anyone know whether, if I took the lines of only tabs out, it would work OK and not have the tabs put back in on the next change?
I found someone else with the same issue at https://stackoverflow.com/questions/57715522/eclipse-cproject-file-no-longer-indents-with-tabs-but-now-with-spaces, but there's no answer to getting it back to how it was there.
Thanks for any useful suggestions.
John
|
|
|
|
Re: Weird cproject and language settings reformatting issue [message #1830565 is a reply to message #1830549] |
Wed, 29 July 2020 04:57   |
Eclipse User |
|
|
|
David Vavra wrote on Tue, 28 July 2020 23:19
Might be helpful if you could show an example of what you mean.
Here you go, see the attached image. That shows the before and after of a .cproject file. As you can see,:
1) the 1 tab in the cproject on the left has been replaced by 4 spaces, followed by 1 tab, followed by 1 newline, followed by 4 more spaces.
2) 2 tabs on the left becomes 8 spaces, followed by 2 tabs, followed by 1 newline, followed by 8 more spaces
3) 3 tabs on the left becomes 12 spaces, followed by 3 tabs, followed by 1 newline, followed by 12 more spaces
and so on.
If you know why this is, or whether there's a way to avoid this mangling, feel free to reply.
With all due respect, please don't reply if you're only going to ask why I care; that is irrelevant and doesn't add to the discussion.
|
|
|
|
Re: Weird cproject and language settings reformatting issue [message #1830583 is a reply to message #1830578] |
Wed, 29 July 2020 08:46   |
Eclipse User |
|
|
|
Sorry David,
At the risk of alienating everyone, while I don't want to appear unappreciative of you taking the time to read and respond, nor to put anyone else off providing useful information, your answer comes under the category described in the last paragraph of my previous message where I said:
Quote:"With all due respect, please don't reply if you're only going to ask why I care; that is irrelevant and doesn't add to the discussion.".
It's taken you time to write that message, and it's taken me a good 5 minutes to consider my wording in a way that tries not to be offensive, and to reply, but it hasn't added any value for either of us, not for any other Eclipse users.
John
|
|
|
|
|
|
Re: Weird cproject and language settings reformatting issue [message #1830602 is a reply to message #1830600] |
Wed, 29 July 2020 11:14   |
Eclipse User |
|
|
|
David,
While I don't wish for this to be rude, I have better things to do with my time than waste them on stupid responses like yours.
At some point in the future, someone else might come on here with exactly the same question as I had, find this thread and, as I've done on numerous occasions, feel dejected because, despite there being n replies which suggest they have a decent chance of finding an answer, all they've got is you stringing the thread along while not providing anything of value.
Perhaps you've even had the same experience; how do you feel when you're seeking an answer to a question and all someone can do is question your motives for wanting an answer?
Please, if anyone knows either a solution to this issue, or a reason why it's happening, your input to this would be very much appreciated however, David, I feel you really must have better things to do with your time too so, if you have neither a solution nor a reason, please just go away.
|
|
|
|
|
|
|
|
|
|
|
Re: Weird cproject and language settings reformatting issue [message #1830934 is a reply to message #1830931] |
Thu, 06 August 2020 20:00  |
Eclipse User |
|
|
|
https://www.eclipse.org/forums/index.php?t=msg&th=1104680&goto=1830914&#msg_1830914
Quote:And to the useless poster who asked why we care?
I notice you joined this forum just today.
It's odd that you would say this as I only asked that of one person and that was over a week ago.
The reason I asked was to get an idea of why it would be a problem at all with a language that doesn't care about formatting.
Reading the file with a plain vanilla text editor would be more difficult.
To that, I suggested the XML Editor which would avoid the difficulty.
Quote:It interferes with revision control
Yes it can cause unnecessary version control commits but no more so than someone converting spaces to tabs or vice versa or adding extra lines.
There are switches in most version controls to avoid this.
I can only wonder why one wouldn't take advantage of them.
There are some languages where formatting is important but XML isn't one of them.
In 50 years, I've ignored spaces in diffs with all but a few languages.
Quote:when something unexpected like this happens, it's often a symptom of an undetected problem or bug
So then it hasn't actually caused a problem and there is no pressing issue that requires a fix?
Glad to hear it.
[Updated on: Thu, 06 August 2020 22:43] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.19721 seconds