Bug 574142 - keep shared launch configurations attribute order
Summary: keep shared launch configurations attribute order
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.21   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 574143 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-11 01:46 EDT by Jörg Kubitz CLA
Modified: 2021-06-11 11:24 EDT (History)
1 user (show)

See Also:


Attachments
example screenshot of diff.png (60.52 KB, image/png)
2021-06-11 01:46 EDT, Jörg Kubitz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2021-06-11 01:46:06 EDT
Created attachment 286563 [details]
example screenshot of diff.png

Since bug 180756 the attributes are saved ordered by name (by using treemap).
If i change a launch configuration which was saved before (like for example org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/Benchmark Test.launch) or manually add a attribute to the launch configuration then this results in a big diff.
I suggest to instead keep the order in which it was saved/loaded. This could probably easy archived by using a LinkedHashMap instead.
I'd like you to give feedback if you agree about this before developing a patch.

Another "problem" is that the launchconfiguration automatically adds new attributes like <stringAttribute key="checked" value="[NONE]"/> or clearwslog which i did not touch. I would like the launchconfigration to only save values that have been either already been loaded from file or deviate from the default settings to keep the git history clean.
Comment 1 Jörg Kubitz CLA 2021-06-11 01:52:04 EDT
*** Bug 574143 has been marked as a duplicate of this bug. ***
Comment 2 Andrey Loskutov CLA 2021-06-11 10:48:11 EDT
Jörg, you refer to bug 180756, but set the "version" to 4.21 - by mistake? Or do you see some regression in 4.21 (which is not released yet)?

Also I'm not sure how do you get a big diff if everything is sorted? You only should have few lines sorted at right place? Or is the original version unsorted - but how do you get that one?
Comment 3 Jörg Kubitz CLA 2021-06-11 11:24:44 EDT
(In reply to Andrey Loskutov from comment #2)
> Jörg, you refer to bug 180756, but set the "version" to 4.21 - by mistake?

no regression. i just do not know the policy which version number should be set here so i just took the newest. The behaviour is very old. 

> Also I'm not sure how do you get a big diff if everything is sorted? 

Someone else checked it in unsorted. Either because he edited it manually or because it is from a time before the sorting was added.