Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:43:06 -0500 (Thu, 17 Dec 2009)
New Revision: 19444
Modified:
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
Log:
Sort the versions so they are in order, and stop allowing the name text to change all the
time. UGH.
Modified:
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
---
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17
18:42:09 UTC (rev 19443)
+++
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17
18:43:06 UTC (rev 19444)
@@ -14,6 +14,8 @@
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -510,16 +512,6 @@
*/
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if ("homeDir".equals(evt.getPropertyName())) { //$NON-NLS-1$
- if (name.getValueAsString() == null
- || "".equals(name.getValueAsString().trim()) //$NON-NLS-1$
- || this.getErrorMessage() != null) {
- String homeDirName = homeDir.getValueAsString();
- if (homeDirName != null && !"".equals(homeDirName.trim())) {
//$NON-NLS-1$
- File folder = new File(homeDirName);
- homeDirName = folder.getName();
- }
- name.setValue(homeDirName);
- }
updateConfigrations(homeDir.getValueAsString());
}
@@ -617,7 +609,8 @@
for(IProjectFacetVersion version: esbfacet.getVersions()){
versions.add(version.getVersionString());
}
-
+ Collections.sort(versions);
+ Collections.reverse(versions);
return versions;
}
Show replies by date