Lines 33-39
Link Here
|
33 |
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core |
33 |
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core |
34 |
* Xuan Chen (IBM) - [194838] Move the code for comparing two objects by absolute name to a common location |
34 |
* Xuan Chen (IBM) - [194838] Move the code for comparing two objects by absolute name to a common location |
35 |
* David McKnight (IBM) - [165674] Sort subsystem configurations to be in deterministic order |
35 |
* David McKnight (IBM) - [165674] Sort subsystem configurations to be in deterministic order |
36 |
* Martin Oberhuber (Wind River) - [165674] Sort subsystem configurations by Id rather than name |
36 |
* Martin Oberhuber (Wind River) - [165674] Sort subsystem configurations by priority then Id |
37 |
********************************************************************************/ |
37 |
********************************************************************************/ |
38 |
|
38 |
|
39 |
package org.eclipse.rse.ui.internal.model; |
39 |
package org.eclipse.rse.ui.internal.model; |
Lines 265-273
Link Here
|
265 |
ISubSystemConfigurationProxy[] newProxies = (ISubSystemConfigurationProxy[])proxies.clone(); |
265 |
ISubSystemConfigurationProxy[] newProxies = (ISubSystemConfigurationProxy[])proxies.clone(); |
266 |
Arrays.sort(newProxies, new Comparator(){ |
266 |
Arrays.sort(newProxies, new Comparator(){ |
267 |
public int compare(Object o1, Object o2) { |
267 |
public int compare(Object o1, Object o2) { |
268 |
String t1 = ((ISubSystemConfigurationProxy) o1).getId(); |
268 |
ISubSystemConfigurationProxy s1 = (ISubSystemConfigurationProxy)o1; |
269 |
String t2 = ((ISubSystemConfigurationProxy) o2).getId(); |
269 |
ISubSystemConfigurationProxy s2 = (ISubSystemConfigurationProxy)o2; |
270 |
return t1.compareTo(t2); |
270 |
if (s1.getPriority() < s2.getPriority()) { |
|
|
271 |
return -1; |
272 |
} else if (s1.getPriority() > s2.getPriority()) { |
273 |
return +1; |
274 |
} |
275 |
return s1.getId().compareTo(s2.getId()); |
271 |
} |
276 |
} |
272 |
}); |
277 |
}); |
273 |
//for (int idx=0; idx<newProxies.length; idx++) |
278 |
//for (int idx=0; idx<newProxies.length; idx++) |