Author: Grid.Qian
Date: 2008-06-20 00:36:13 -0400 (Fri, 20 Jun 2008)
New Revision: 8857
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
Log:
JBIDE-2388: save the changed version of jboss ws runtime
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-20
02:51:06 UTC (rev 8856)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossRuntimeListFieldEditor.java 2008-06-20
04:36:13 UTC (rev 8857)
@@ -458,6 +458,7 @@
name.doFillIntoGrid(root);
name.addPropertyChangeListener(this);
version.doFillIntoGrid(root);
+ version.addPropertyChangeListener(this);
homeDir.doFillIntoGrid(root);
homeDir.addPropertyChangeListener(this);
@@ -521,6 +522,7 @@
if (current != null
&& current.getName().equals(name.getValueAsString())
&& current.getHomeDir().equals(homeDir.getValueAsString())
+ && current.getVersion().equals(version.getValueAsString())
&& current.isUserConfigClasspath() == jarJbws.isUserConfigClasspath()
&& (!jarJbws.isUserConfigClasspath()
|| hasSameLibraies(current.getLibraries(), jarJbws.getLibraries()))) {
@@ -729,6 +731,7 @@
this.changed = changed;
this.source = source;
page1.name.setValue(source.getName());
+ page1.version.setValue(source.getVersion());
page1.homeDir.setValue(source.getHomeDir());
page1.current = source;
}
@@ -745,6 +748,7 @@
if (added.contains(source) || changed.containsKey(source)) {
source.setName(rt.getName());
source.setHomeDir(rt.getHomeDir());
+ source.setVersion(rt.getVersion());
source.setUserConfigClasspath(rt.isUserConfigClasspath());
source.setLibraries(rt.getLibraries());
} else {
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java
===================================================================
---
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-06-20
02:51:06 UTC (rev 8856)
+++
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/preferences/JbossWSRuntimePreferencePage.java 2008-06-20
04:36:13 UTC (rev 8857)
@@ -86,7 +86,7 @@
// reset default runtime
for (JbossWSRuntime jbossWSRuntime : JbossWSRuntimeManager
.getInstance().getRuntimes()) {
- jbossWSRuntime.setDefault(false);
+ jbossWSRuntime.setDefault(false);
}
// set deafult runtime
if (defaultRuntime != null) {
@@ -98,6 +98,7 @@
for (JbossWSRuntime c : changed.keySet()) {
JbossWSRuntime o = changed.get(c);
o.setHomeDir(c.getHomeDir());
+ o.setVersion(c.getVersion());
String oldName = o.getName();
String newName = c.getName();
if (!oldName.equals(newName)) {
@@ -133,4 +134,8 @@
performApply();
return super.performOk();
}
+
+ public JbossRuntimeListFieldEditor getJbossWSRuntimes() {
+ return jbossWSRuntimes;
+ }
}
Show replies by date