Author: akazakov
Date: 2009-03-11 10:34:56 -0400 (Wed, 11 Mar 2009)
New Revision: 14170
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3932 - Fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2009-03-11
13:27:33 UTC (rev 14169)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2009-03-11
14:34:56 UTC (rev 14170)
@@ -113,14 +113,14 @@
* SeamRuntime
*/
public void addRuntime(SeamRuntime runtime) {
- if (runtimes.size() == 0) {
+ SeamRuntime oldDefaultRuntime = getDefaultRuntime(runtime.getVersion());
+ if (oldDefaultRuntime != null) {
+ if(runtime.isDefault()) {
+ oldDefaultRuntime.setDefault(false);
+ }
+ } else {
runtime.setDefault(true);
}
-
- SeamRuntime oldDefaultRuntime = getDefaultRuntime(runtime.getVersion());
- if (oldDefaultRuntime != null && runtime.isDefault()) {
- oldDefaultRuntime.setDefault(false);
- }
runtimes.put(runtime.getName(), runtime);
save();
}