Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 74368 Details for
Bug 165674
Ordering of Services in the New Connection Wizard is not always consistent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Additional patch to sort by Priority then Id
bug165674_subSysSortById2.diff.txt (text/plain), 1.97 KB, created by
Martin Oberhuber
on 2007-07-23 11:31:34 EDT
(
hide
)
Description:
Additional patch to sort by Priority then Id
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2007-07-23 11:31:34 EDT
Size:
1.97 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.ui >Index: model/org/eclipse/rse/ui/internal/model/SystemRegistry.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/ui/internal/model/SystemRegistry.java,v >retrieving revision 1.32 >diff -u -r1.32 SystemRegistry.java >--- model/org/eclipse/rse/ui/internal/model/SystemRegistry.java 23 Jul 2007 14:55:11 -0000 1.32 >+++ model/org/eclipse/rse/ui/internal/model/SystemRegistry.java 23 Jul 2007 15:31:13 -0000 >@@ -33,7 +33,7 @@ > * 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 > * David McKnight (IBM) - [165674] Sort subsystem configurations to be in deterministic order >- * Martin Oberhuber (Wind River) - [165674] Sort subsystem configurations by Id rather than name >+ * Martin Oberhuber (Wind River) - [165674] Sort subsystem configurations by priority then Id > ********************************************************************************/ > > package org.eclipse.rse.ui.internal.model; >@@ -265,9 +265,14 @@ > ISubSystemConfigurationProxy[] newProxies = (ISubSystemConfigurationProxy[])proxies.clone(); > Arrays.sort(newProxies, new Comparator(){ > public int compare(Object o1, Object o2) { >- String t1 = ((ISubSystemConfigurationProxy) o1).getId(); >- String t2 = ((ISubSystemConfigurationProxy) o2).getId(); >- return t1.compareTo(t2); >+ ISubSystemConfigurationProxy s1 = (ISubSystemConfigurationProxy)o1; >+ ISubSystemConfigurationProxy s2 = (ISubSystemConfigurationProxy)o2; >+ if (s1.getPriority() < s2.getPriority()) { >+ return -1; >+ } else if (s1.getPriority() > s2.getPriority()) { >+ return +1; >+ } >+ return s1.getId().compareTo(s2.getId()); > } > }); > //for (int idx=0; idx<newProxies.length; idx++)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165674
:
74361
| 74368 |
74369