Author: rob.stryker(a)jboss.com
Date: 2009-03-01 23:43:11 -0500 (Sun, 01 Mar 2009)
New Revision: 13906
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-3867 - EAP runtime not incrementing
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-02-28
17:22:01 UTC (rev 13905)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-03-02
04:43:11 UTC (rev 13906)
@@ -55,6 +55,10 @@
private String getNextRuntimeName() {
String version = getRuntime().getRuntimeType().getVersion();
String base = Messages.jboss + " " + version + " " +
Messages.runtime;
+ return getNextRuntimeName(base);
+ }
+
+ public static String getNextRuntimeName(String base) {
IRuntime rt = ServerCore.findRuntime(base);
if (rt == null)
return base;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-02-28
17:22:01 UTC (rev 13905)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-03-02
04:43:11 UTC (rev 13906)
@@ -65,6 +65,7 @@
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.JBossServerType;
import org.jboss.ide.eclipse.as.core.util.ServerBeanLoader;
import org.jboss.ide.eclipse.as.ui.IPreferenceKeys;
@@ -161,6 +162,7 @@
String oldName = r.getName();
if( r.isWorkingCopy() ) {
String newName = oldName.replace("Enterprise Application Platform",
"EAP");
+ newName = LocalJBossServerRuntime.getNextRuntimeName(newName);
((IRuntimeWorkingCopy)r).setName(newName);
}