[jbosstools-commits] JBoss Tools SVN: r24556 - branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Aug 30 15:51:06 EDT 2010


Author: snjeza
Date: 2010-08-30 15:51:06 -0400 (Mon, 30 Aug 2010)
New Revision: 24556

Modified:
   branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java
   branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
Log:
https://jira.jboss.org/browse/JBIDE-6936 Runtime detection - invalid runtimes / servers created


Modified: branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java
===================================================================
--- branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java	2010-08-30 19:44:52 UTC (rev 24555)
+++ branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeLocator.java	2010-08-30 19:51:06 UTC (rev 24556)
@@ -82,6 +82,7 @@
 							droolsFound = true;
 						}
 					}
+					boolean jbpmFound = false;
 					if (!droolsFound) {
 						boolean isJBPM = isValidJbpmInstallation(root.getAbsolutePath());
 						if (isJBPM) {
@@ -92,10 +93,14 @@
 								version = JBPM4;
 							}
 							serverDefinitions.add(new ServerDefinition(root.getName(), version, JBossRuntimeStartup.JBPM, root.getAbsoluteFile()));
+							jbpmFound = true;
 						}
 					}
+					if (!droolsFound && !jbpmFound) {
+						children = root.listFiles();
+					}
 				}
-				children = root.listFiles();
+				
 			}
 		} else {
 			children = File.listRoots();

Modified: branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java
===================================================================
--- branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java	2010-08-30 19:44:52 UTC (rev 24555)
+++ branches/jbosstools-3.2.0.M2/runtime/plugins/org.jboss.tools.runtime/src/org/jboss/tools/runtime/JBossRuntimeStartup.java	2010-08-30 19:51:06 UTC (rev 24556)
@@ -93,6 +93,8 @@
 	public static final String SEAM = "SEAM"; // NON-NLS-1$
 	
 	public static final String DROOLS = "DROOLS"; // NON-NLS-1$
+	
+	private static final String AS = "AS"; //$NON-NLS-1$
 
 	public static final String JBOSS_EAP_HOME = "../../../../jboss-eap/jboss-as"; 	// JBoss AS home directory (relative to plugin)- <RHDS_HOME>/jbossas. //$NON-NLS-1$
 	
@@ -312,12 +314,15 @@
 		// then process seam runtimes from bundled servers
 		for(ServerDefinition serverDefinition:serverDefinitions) {
 			String type = serverDefinition.getType();
-			if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type) || EWP.equals(type)) {
+			if (SOA_P.equals(type) || EAP.equals(type) || EPP.equals(type) || EWP.equals(type) ) {
 				for (String folder : SEAM_HOME_FOLDER_OPTIONS) {
 					File seamFile = new File(serverDefinition.getLocation(),folder); //$NON-NLS-1$
 					addSeam(map, serverDefinition, seamFile);
 				} 
 			}
+			if (SEAM.equals(type)) {
+				addSeam(map, serverDefinition, serverDefinition.getLocation());
+			}
 		}
 
 		// Initialize Seam Runtime from JBoss EAP
@@ -459,7 +464,7 @@
 					int index = getJBossASVersion(asLocation);
 					createJBossServer(asLocation,index,name, runtimeName);
 				}
-			} else {
+			} else if (AS.equals(type)){
 				String version = serverDefinition.getVersion();
 				int index = 2;
 				if ("3.2".equals(version)) { //$NON-NLS-1$



More information about the jbosstools-commits mailing list