Author: rob.stryker(a)jboss.com
Date: 2009-12-16 19:46:19 -0500 (Wed, 16 Dec 2009)
New Revision: 19377
Modified:
trunk/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:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
---
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17
00:37:24 UTC (rev 19376)
+++
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17
00:46:19 UTC (rev 19377)
@@ -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;
}