mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[165674] sorting subsystem configurations to be aphabetical in order
This commit is contained in:
parent
0cce191cc3
commit
daef342bea
1 changed files with 22 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
|
* Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
|
||||||
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
||||||
* Xuan Chen (IBM) - [194838] Move the code for comparing two objects by absolute name to a common location
|
* Xuan Chen (IBM) - [194838] Move the code for comparing two objects by absolute name to a common location
|
||||||
|
* David McKnight (IBM) - [165674] Sort subsystem configurations to be in deterministic order
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.internal.model;
|
package org.eclipse.rse.ui.internal.model;
|
||||||
|
@ -359,6 +360,27 @@ public class SystemRegistry implements ISystemRegistry
|
||||||
|
|
||||||
v.addElement(ssFactory);
|
v.addElement(ssFactory);
|
||||||
}
|
}
|
||||||
|
else // for 165674 - fix the order to be deterministic
|
||||||
|
{
|
||||||
|
// replace with this one if this is first alphabetically
|
||||||
|
// find the current one
|
||||||
|
for (int i = 0; i < v.size(); i++)
|
||||||
|
{
|
||||||
|
if (v.get(i) instanceof IServiceSubSystemConfiguration)
|
||||||
|
{
|
||||||
|
IServiceSubSystemConfiguration addedConfig = (IServiceSubSystemConfiguration)v.get(i);
|
||||||
|
if (addedConfig.getServiceType() == serviceType)
|
||||||
|
{
|
||||||
|
if (serviceFactory.getName().compareTo(addedConfig.getName()) <= 0)
|
||||||
|
{
|
||||||
|
v.remove(addedConfig);
|
||||||
|
v.add(serviceFactory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue