Author: snjeza
Date: 2012-05-31 17:11:48 -0400 (Thu, 31 May 2012)
New Revision: 41595
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java
Log:
JBDS-2183 - EAP6 installed with JBDS should have name "jboss-eap-6" in Servers
view instead of "jboss-as"
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java 2012-05-31
20:09:16 UTC (rev 41594)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java 2012-05-31
21:11:48 UTC (rev 41595)
@@ -40,7 +40,6 @@
public class JBossRuntimeStartup {
private static final String JBOSS_EAP_HOME = "../../jboss-eap"; // JBoss EAP
home directory (relative to plugin)- <RHDS_HOME>/jbossas. //$NON-NLS-1$
- private static final String EAP = "EAP"; //$NON-NLS-1$
private static final String LOCATIONS_FILE_NAME =
"runtime_locations.properties"; //$NON-NLS-1$
private static final String LOCATIONS_FILE = "../../../../studio/" +
LOCATIONS_FILE_NAME; //$NON-NLS-1$
private static final String LOCATIONS_FILE_CONFIGURATION = "../../studio/" +
LOCATIONS_FILE_NAME; //$NON-NLS-1$
@@ -58,10 +57,6 @@
runtimePath.getServerDefinitions().clear();
for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
- if (EAP.equals(serverDefinition.getType())) {
- String name = getUniqueName("jboss-eap-" + serverDefinition.getVersion(),
serverDefinition, serverDefinitions);
- serverDefinition.setName(name);
- }
}
initializeRuntimes(serverDefinitions);
}
@@ -86,28 +81,6 @@
}
}
- private static String getUniqueName(String name, RuntimeDefinition serverDefinition,
List<RuntimeDefinition> serverDefinitions) {
- int i = 0;
- boolean end = false;
- while (!end) {
- end = true;
- for (RuntimeDefinition definition : serverDefinitions) {
- if (definition == serverDefinition) {
- continue;
- }
- if (i > 0) {
- name = name + "(" + i + ")";
- }
- if (name.equals(definition.getName())) {
- i++;
- end = false;
- break;
- }
- }
- }
- return name;
- }
-
public static void initializeRuntimes(List<RuntimeDefinition> serverDefinitions)
{
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
for( IRuntimeDetector detector:detectors) {
Show replies by date