JBoss Tools SVN: r43349 - in trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test: launchers and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: psuchy
Date: 2012-08-31 04:54:00 -0400 (Fri, 31 Aug 2012)
New Revision: 43349
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java
Log:
Mavenization - add pom.xml and testSuite for project part
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch 2012-08-31 08:54:00 UTC (rev 43349)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":${string_prompt:display number:0}"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.runtime.as.ui.bot.test.ProjectTestsSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.runtime.as.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/pom.xml 2012-08-31 08:54:00 UTC (rev 43349)
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.runtime</groupId>
+ <artifactId>tests</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.runtime.as.ui.bot.test</groupId>
+ <artifactId>org.jboss.tools.runtime.as.ui.bot.test</artifactId>
+
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <requirementsDirectory>${project.build.directory}/requirements</requirementsDirectory>
+ <jboss-as-7>${requirementsDirectory}/jboss-as-7.1.1.Final/</jboss-as-7>
+ <jboss-seam-2.2>${requirementsDirectory}/jboss-seam-2.2.2.Final/</jboss-seam-2.2>
+ <jboss-seam-2.3>${requirementsDirectory}/jboss-seam-2.3.0.Beta1/</jboss-seam-2.3>
+ <test.class>org.jboss.tools.runtime.as.ui.bot.test.ProjectTestsSuite/</test.class>
+ <additionalSystemProperties></additionalSystemProperties>
+ <systemProperties>${additionalSystemProperties}</systemProperties>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>debug</id>
+ <properties>
+ <additionalSystemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</additionalSystemProperties>
+ </properties>
+ </profile>
+ </profiles>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>sonatype-public-repository</id>
+ <url>https://oss.sonatype.org/content/groups/public</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install-as</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-dist</artifactId>
+ <version>7.1.1.Final</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${requirementsDirectory}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>maven-download-plugin</artifactId>
+ <version>1.0.0</version>
+ <executions>
+ <execution>
+ <id>install-seam-2.2.2.Final</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.2.2.Final/jbos...</url>
+ <unpack>true</unpack>
+ <md5>3bdb26921b1ebfb7222968657df95bb3</md5>
+ <outputDirectory>${requirementsDirectory}/</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-seam-2.3.0.Beta1</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.3.0.Beta1/jbos...</url>
+ <unpack>true</unpack>
+ <md5>85c2f188e1efe5291ba3aa1f3c0c22d0</md5>
+ <outputDirectory>${requirementsDirectory}/</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <useUIThread>false</useUIThread>
+ <testSuite>org.jboss.tools.runtime.as.ui.bot.test</testSuite>
+ <testClass>${test.class}</testClass>
+ <skip>${swtbot.test.skip}</skip>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.runtime.seam.detector.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.runtime.core.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.runtime.as.detector.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.seam.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>resources</outputDirectory>
+ <resources>
+ <resource>
+ <directory>resources/template</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>runtimes.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <ignoreTychoRepositories>true</ignoreTychoRepositories>
+ <environments>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.apache.maven.plugins
+ </groupId>
+ <artifactId>
+ maven-dependency-plugin
+ </artifactId>
+ <versionRange>[2.1,)</versionRange>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
Added: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java 2012-08-31 08:54:00 UTC (rev 43349)
@@ -0,0 +1,26 @@
+package org.jboss.tools.runtime.as.ui.bot.test;
+
+import org.jboss.tools.runtime.as.ui.bot.test.detector.RuntimeDuplications;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.ServerWithSeam;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam22.CheckSeam22;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam22.DetectSeam22;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam23.CheckSeam23;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.seam.seam23.DetectSeam23;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.server.jboss7.DetectJBoss7;
+import org.jboss.tools.runtime.as.ui.bot.test.detector.server.jboss7.OperateJBoss7;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({
+ DetectJBoss7.class,
+ OperateJBoss7.class,
+ DetectSeam22.class,
+ CheckSeam22.class,
+ DetectSeam23.class,
+ CheckSeam23.class
+})
+public class ProjectTestsSuite {
+
+}
Modified: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-31 07:42:30 UTC (rev 43348)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-31 08:54:00 UTC (rev 43349)
@@ -1,11 +1,16 @@
package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
+import java.awt.AWTException;
+import java.awt.Robot;
+import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactory;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
@@ -39,7 +44,18 @@
for (int i = 0; i < runtimesNumber; i++){
table.click(0, 0);
bot.button("Remove").click();
- KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.RIGHT, Keystrokes.CR, Keystrokes.LF);
+ Robot robot = null;
+ try {
+ robot = new Robot();
+ } catch (AWTException e) {
+ e.printStackTrace();
+ }
+ robot.setAutoWaitForIdle(true);
+ //robot.keyPress(KeyEvent.VK_RIGHT);
+ //robot.keyRelease(KeyEvent.VK_RIGHT);
+ robot.keyPress(KeyEvent.VK_ENTER);
+ robot.keyRelease(KeyEvent.VK_ENTER);
+ //KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.RIGHT, Keystrokes.CR, Keystrokes.LF);
bot.shell("Preferences").activate();
}
}
Modified: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java 2012-08-31 07:42:30 UTC (rev 43348)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/CheckSeamRuntimeTemplate.java 2012-08-31 08:54:00 UTC (rev 43349)
@@ -23,5 +23,6 @@
@After
public void cleanup(){
removeAllSeamRuntimes();
+ assertSeamRuntimesNumber(0);
}
}
12 years, 4 months
JBoss Tools SVN: r43348 - in trunk/as: tests/org.jboss.tools.as.test.core/META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-31 03:42:30 -0400 (Fri, 31 Aug 2012)
New Revision: 43348
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF
Log:
JBIDE-12500 to trunk
Modified: trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2012-08-31 07:17:17 UTC (rev 43347)
+++ trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2012-08-31 07:42:30 UTC (rev 43348)
@@ -90,5 +90,10 @@
install-size="0"
version="0.0.0"
unpack="false"/>
-
+ <plugin
+ id="org.jboss.ide.eclipse.as.doc.user"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
</feature>
Modified: trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF 2012-08-31 07:17:17 UTC (rev 43347)
+++ trunk/as/tests/org.jboss.tools.as.test.core/META-INF/MANIFEST.MF 2012-08-31 07:42:30 UTC (rev 43348)
@@ -16,7 +16,6 @@
org.jboss.ide.eclipse.as.classpath.ui;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.dmr;bundle-version="2.3.0",
- org.jboss.ide.eclipse.as.doc.user;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.jmx.integration;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.management.as71;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.management.core;bundle-version="2.3.0",
12 years, 4 months
JBoss Tools SVN: r43347 - in trunk: examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-31 03:17:17 -0400 (Fri, 31 Aug 2012)
New Revision: 43347
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeExtensionManager.java
Modified:
trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java
trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
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/RuntimeUIActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionFrameworkTest.java
trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java
Log:
JBIDE-12525 to trunk
Modified: trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -350,7 +350,7 @@
RuntimeDefinition esbDefinition = new RuntimeDefinition(
name, version, ESB,
esbRoot);
- IRuntimeDetector esbDetector = RuntimeCoreActivator.getEsbDetector();
+ IRuntimeDetector esbDetector = RuntimeCoreActivator.getDefault().getEsbDetector();
if (esbDetector != null) {
version = esbDetector.getVersion(esbDefinition);
esbDefinition.setVersion(version);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -581,7 +581,7 @@
});
} else {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault()
.getRuntimeDetectors();
for (IRuntimeDetector detector : detectors) {
if (detector.isEnabled()) {
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -81,7 +81,7 @@
monitor.setTaskName("Searching " + directory.getAbsolutePath());
- Set<IRuntimeDetector> runtimeDetectors = RuntimeCoreActivator.getRuntimeDetectors();
+ Set<IRuntimeDetector> runtimeDetectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
for (IRuntimeDetector detector:runtimeDetectors) {
if (monitor.isCanceled()) {
return;
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -11,18 +11,10 @@
package org.jboss.tools.runtime.core;
import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
-import java.util.TreeSet;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
@@ -30,7 +22,6 @@
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
-import org.jboss.tools.runtime.core.model.InvalidRuntimeDetector;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -46,14 +37,6 @@
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.runtime.core"; //$NON-NLS-1$
private static final String ESB_DETECTOR_ID = "org.jboss.tools.runtime.handlers.EsbHandler"; //$NON-NLS-1$
- private static final String RUNTIME_DETECTOR_EXTENSION_ID = "org.jboss.tools.runtime.core.runtimeDetectors";
-
- // Extension point property keys
- private static final String NAME = "name";
- private static final String PREFERENCE_ID = "preferenceId";
- private static final String ID = "id";
- private static final String ENABLED = "enabled";
- private static final String PRIORITY = "priority";
// Preference key
private static final String ENABLED_DETECTORS = "enabledDetectors";
@@ -101,96 +84,26 @@
return plugin;
}
- public static IRuntimeDetector getEsbDetector() {
- return getOrLoadDefaultInstance().getEsbDetector2();
- }
-
- private static RuntimeCoreActivator getOrLoadDefaultInstance() {
- if( getDefault() == null ) {
- // load bundle
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- try {
- bundle.start();
- } catch(BundleException be) {
- be.printStackTrace();
+ public IRuntimeDetector getEsbDetector() {
+ if (esbDetector == null) {
+ for (IRuntimeDetector detector:getDeclaredRuntimeDetectors()) {
+ if (ESB_DETECTOR_ID.equals(detector.getId())) {
+ esbDetector = detector;
+ }
}
}
- return getDefault();
+ return esbDetector;
}
+
// Convenience method
- public static Set<IRuntimeDetector> getDeclaredRuntimeDetectors() {
- return getOrLoadDefaultInstance().getDeclaredRuntimeDetectors2();
- }
-
- // Load all declared runtime detectors
- public Set<IRuntimeDetector> getDeclaredRuntimeDetectors2() {
+ public Set<IRuntimeDetector> getDeclaredRuntimeDetectors() {
if( declaredRuntimeDetectors == null) {
- declaredRuntimeDetectors = loadDeclaredRuntimeDetectors();
+ declaredRuntimeDetectors = RuntimeExtensionManager.getDefault().loadDeclaredRuntimeDetectors();
}
return declaredRuntimeDetectors;
}
-
- // This method will do a full load and actually instantiate the classes
- public Set<IRuntimeDetector> loadDeclaredRuntimeDetectors() {
- Set<IRuntimeDetector> declared = new TreeSet<IRuntimeDetector>();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint = registry
- .getExtensionPoint(RUNTIME_DETECTOR_EXTENSION_ID);
- IExtension[] extensions = extensionPoint.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IExtension extension = extensions[i];
- IConfigurationElement[] configurationElements = extension
- .getConfigurationElements();
- for (int j = 0; j < configurationElements.length; j++) {
- IRuntimeDetector dec = loadOneDeclaredRuntimeDetector(configurationElements[j]);
- if( !declared.contains(dec)) {
- declared.add(dec);
- }
- }
- }
- return declared;
- }
-
- // This method will load one detector from a configuration element
- private IRuntimeDetector loadOneDeclaredRuntimeDetector(IConfigurationElement configurationElement) {
- IRuntimeDetector detector;
- try {
- detector = (IRuntimeDetector) configurationElement.createExecutableExtension("class");
- } catch (CoreException e) {
- log(e);
- detector = new InvalidRuntimeDetector();
- detector.setValid(false);
- }
- String name = configurationElement.getAttribute(NAME);
- String preferenceId = configurationElement.getAttribute(PREFERENCE_ID);
- String id = configurationElement.getAttribute(ID);
- detector.setName(name);
- detector.setPreferenceId(preferenceId);
- detector.setId(id);
- String enabled = configurationElement.getAttribute(ENABLED);
- if (enabled == null || new Boolean(enabled).booleanValue()) {
- detector.setEnabled(true);
- } else {
- detector.setEnabled(false);
- }
- String priorityString = configurationElement
- .getAttribute(PRIORITY);
- int priority;
- try {
- priority = Integer.parseInt(priorityString);
- } catch (Exception ex) {
- priority = Integer.MAX_VALUE;
- }
- detector.setPriority(priority);
- return detector;
- }
-
- public static Set<IRuntimeDetector> getRuntimeDetectors() {
- return getOrLoadDefaultInstance().getRuntimeDetectors2();
- }
-
- public Set<IRuntimeDetector> getRuntimeDetectors2() {
+ public Set<IRuntimeDetector> getRuntimeDetectors() {
if (runtimeDetectors == null) {
Set<IRuntimeDetector> tmp = getDeclaredRuntimeDetectors();
String enabledDetectors = getPreferences().get(ENABLED_DETECTORS,
@@ -216,7 +129,11 @@
return runtimeDetectors;
}
- public static void saveEnabledDetectors(Set<IRuntimeDetector> allDetectors) {
+ public void saveEnabledDetectors() {
+ saveEnabledDetectors(getDeclaredRuntimeDetectors());
+ }
+
+ public void saveEnabledDetectors(Set<IRuntimeDetector> allDetectors) {
StringBuilder builder = new StringBuilder();
for (IRuntimeDetector detector:allDetectors) {
if (detector.isEnabled()) {
@@ -237,27 +154,13 @@
}
}
- private static IEclipsePreferences getPreferences() {
- return getOrLoadDefaultInstance().getPreferences2();
- }
-
- private IEclipsePreferences getPreferences2() {
+ private IEclipsePreferences getPreferences() {
if (prefs == null) {
prefs = ConfigurationScope.INSTANCE.getNode(PLUGIN_ID);
}
return prefs;
}
- public IRuntimeDetector getEsbDetector2() {
- if (esbDetector == null) {
- for (IRuntimeDetector detector:getDeclaredRuntimeDetectors()) {
- if (ESB_DETECTOR_ID.equals(detector.getId())) {
- esbDetector = detector;
- }
- }
- }
- return esbDetector;
- }
public static void log(Throwable e) {
IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e
.getLocalizedMessage(), e);
Added: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeExtensionManager.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeExtensionManager.java (rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeExtensionManager.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -0,0 +1,86 @@
+package org.jboss.tools.runtime.core;
+
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.runtime.core.model.IRuntimeDetector;
+import org.jboss.tools.runtime.core.model.InvalidRuntimeDetector;
+
+public class RuntimeExtensionManager {
+ private static final String RUNTIME_DETECTOR_EXTENSION_ID = "org.jboss.tools.runtime.core.runtimeDetectors";
+
+ // Extension point property keys
+ private static final String NAME = "name";
+ private static final String PREFERENCE_ID = "preferenceId";
+ private static final String ID = "id";
+ private static final String ENABLED = "enabled";
+ private static final String PRIORITY = "priority";
+
+ private static RuntimeExtensionManager manager = null;
+ public static RuntimeExtensionManager getDefault() {
+ if( manager == null )
+ manager = new RuntimeExtensionManager();
+ return manager;
+ }
+
+ // This method will do a full load and actually instantiate the classes
+ public Set<IRuntimeDetector> loadDeclaredRuntimeDetectors() {
+ Set<IRuntimeDetector> declared = new TreeSet<IRuntimeDetector>();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint(RUNTIME_DETECTOR_EXTENSION_ID);
+ IExtension[] extensions = extensionPoint.getExtensions();
+ for (int i = 0; i < extensions.length; i++) {
+ IExtension extension = extensions[i];
+ IConfigurationElement[] configurationElements = extension
+ .getConfigurationElements();
+ for (int j = 0; j < configurationElements.length; j++) {
+ IRuntimeDetector dec = loadOneDeclaredRuntimeDetector(configurationElements[j]);
+ if( !declared.contains(dec)) {
+ declared.add(dec);
+ }
+ }
+ }
+ return declared;
+ }
+
+ // This method will load one detector from a configuration element
+ private IRuntimeDetector loadOneDeclaredRuntimeDetector(IConfigurationElement configurationElement) {
+ IRuntimeDetector detector;
+ try {
+ detector = (IRuntimeDetector) configurationElement.createExecutableExtension("class");
+ } catch (CoreException e) {
+ RuntimeCoreActivator.log(e);
+ detector = new InvalidRuntimeDetector();
+ detector.setValid(false);
+ }
+ String name = configurationElement.getAttribute(NAME);
+ String preferenceId = configurationElement.getAttribute(PREFERENCE_ID);
+ String id = configurationElement.getAttribute(ID);
+ detector.setName(name);
+ detector.setPreferenceId(preferenceId);
+ detector.setId(id);
+ String enabled = configurationElement.getAttribute(ENABLED);
+ if (enabled == null || new Boolean(enabled).booleanValue()) {
+ detector.setEnabled(true);
+ } else {
+ detector.setEnabled(false);
+ }
+ String priorityString = configurationElement
+ .getAttribute(PRIORITY);
+ int priority;
+ try {
+ priority = Integer.parseInt(priorityString);
+ } catch (Exception ex) {
+ priority = Integer.MAX_VALUE;
+ }
+ detector.setPriority(priority);
+ return detector;
+ }
+}
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-08-31 07:17:03 UTC (rev 43346)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -81,7 +81,7 @@
}
public static void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
for( IRuntimeDetector detector:detectors) {
if (detector.isEnabled()) {
detector.initializeRuntimes(serverDefinitions);
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -114,8 +114,6 @@
private Set<RuntimePath> runtimePaths = new HashSet<RuntimePath>();
- private Set<IRuntimeDetector> runtimeDetectors;
-
private List<RuntimeDefinition> serverDefinitions;
private ListenerList runtimePathChangeChangeListeners;
@@ -133,7 +131,6 @@
super.start(context);
plugin = this;
runtimePaths = null;
- runtimeDetectors = null;
}
/*
@@ -253,7 +250,7 @@
}
public static boolean runtimeExists(RuntimeDefinition serverDefinition) {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
for (IRuntimeDetector detector:detectors) {
if (detector.isEnabled() && detector.exists(serverDefinition)) {
return true;
@@ -281,9 +278,7 @@
public void saveRuntimePreferences() {
saveRuntimePaths();
- if (runtimeDetectors != null) {
- RuntimeCoreActivator.saveEnabledDetectors(runtimeDetectors);
- }
+ RuntimeCoreActivator.getDefault().saveEnabledDetectors();
}
private void initRuntimePaths() throws WorkbenchException {
@@ -335,7 +330,7 @@
}
if (computeIncluded) {
for(RuntimeDefinition definition:getServerDefinitions()) {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
for (IRuntimeDetector detector:detectors) {
detector.computeIncludedRuntimeDefinition(definition);
}
@@ -455,15 +450,11 @@
}
public Set<IRuntimeDetector> getRuntimeDetectors() {
- if (runtimeDetectors == null) {
- runtimeDetectors = RuntimeCoreActivator.getRuntimeDetectors();
- }
- return runtimeDetectors;
+ return RuntimeCoreActivator.getDefault().getRuntimeDetectors();
}
public void initDefaultRuntimePreferences() {
runtimePaths = new HashSet<RuntimePath>();
- runtimeDetectors = RuntimeCoreActivator.getDeclaredRuntimeDetectors();
}
public static void setTimestamp(Set<RuntimePath> runtimePaths2) {
@@ -480,7 +471,6 @@
public void refreshRuntimePreferences() {
runtimePaths = null;
- runtimeDetectors = null;
}
public static boolean runtimeCreated(RuntimeDefinition serverDefinition) {
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -59,7 +59,7 @@
private boolean canceled;
private boolean needRefresh;
private Label foundRuntimesLabel;
- private List<RuntimeDefinition> serverDefinitions;
+ private List<RuntimeDefinition> runtimeDefinitions;
private Button hideCreatedRuntimes;
private int heightHint;
@@ -124,7 +124,7 @@
RuntimeDefinition definition = (RuntimeDefinition) event.getElement();
definition.setEnabled(!definition.isEnabled());
boolean enableOk = false;
- List<RuntimeDefinition> serverDefinitions = getServerDefinitions(hideCreatedRuntimes.getSelection());
+ List<RuntimeDefinition> serverDefinitions = getRuntimeDefinitions(hideCreatedRuntimes.getSelection());
for (RuntimeDefinition serverDefinition:serverDefinitions) {
if (serverDefinition.isEnabled()) {
enableOk = true;
@@ -228,7 +228,7 @@
private void refresh(String message) {
running = false;
treeViewer.setInput(null);
- List<RuntimeDefinition> serverDefinitions = getServerDefinitions(hideCreatedRuntimes.getSelection());
+ List<RuntimeDefinition> serverDefinitions = getRuntimeDefinitions(hideCreatedRuntimes.getSelection());
treeViewer.setInput(serverDefinitions);
for (RuntimeDefinition definition:serverDefinitions) {
treeViewer.setChecked(definition, definition.isEnabled());
@@ -256,8 +256,8 @@
@Override
protected void okPressed() {
getShell().setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_WAIT));
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
- List<RuntimeDefinition> definitions = getServerDefinitions(true);
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
+ List<RuntimeDefinition> definitions = getRuntimeDefinitions(true);
for( IRuntimeDetector detector:detectors) {
if (detector.isEnabled()) {
detector.initializeRuntimes(definitions);
@@ -284,7 +284,7 @@
}
decrementNestingDepth();
getShell().setCursor(null);
- int count = getServerDefinitions(true).size();
+ int count = getRuntimeDefinitions(true).size();
if (count == 0) {
hideCreatedRuntimes.setSelection(false);
}
@@ -330,12 +330,12 @@
return composite;
}
- private List<RuntimeDefinition> getServerDefinitions(
+ private List<RuntimeDefinition> getRuntimeDefinitions(
boolean hideCreatedRuntimes) {
- if (serverDefinitions == null) {
- serverDefinitions = new ArrayList<RuntimeDefinition>();
+ if (runtimeDefinitions == null) {
+ runtimeDefinitions = new ArrayList<RuntimeDefinition>();
} else {
- serverDefinitions.clear();
+ runtimeDefinitions.clear();
}
List<RuntimeDefinition> allDefinitions = getAllDefinitions();
for (RuntimePath runtimePath : runtimePaths) {
@@ -355,13 +355,13 @@
for (RuntimePath runtimePath : runtimePaths) {
for (RuntimeDefinition serverDefinition : runtimePath.getRuntimeDefinitions()) {
if (!hideCreatedRuntimes) {
- serverDefinitions.add(serverDefinition);
+ runtimeDefinitions.add(serverDefinition);
} else if (!RuntimeUIActivator.runtimeCreated(serverDefinition)) {
- serverDefinitions.add(serverDefinition);
+ runtimeDefinitions.add(serverDefinition);
}
}
}
- return serverDefinitions;
+ return runtimeDefinitions;
}
protected List<RuntimeDefinition> getAllDefinitions(RuntimePath runtimePath) {
Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionFrameworkTest.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionFrameworkTest.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionFrameworkTest.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -52,7 +52,7 @@
@Test
public void testInvalidDetectors() {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDeclaredRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getDeclaredRuntimeDetectors();
IRuntimeDetector invalidDetector = null;
for (IRuntimeDetector detector:detectors) {
if (detector instanceof InvalidRuntimeDetector) {
@@ -132,7 +132,7 @@
// initialize them
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
for( IRuntimeDetector detector:detectors) {
if (detector.isEnabled()) {
detector.initializeRuntimes(runtimeDefinitions);
Modified: trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
===================================================================
--- trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -91,7 +91,7 @@
}
RuntimeUIActivator.getDefault().saveRuntimePaths();
List<RuntimeDefinition> serverDefinitions = new ArrayList<RuntimeDefinition>();
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault()
.getRuntimeDetectors();
for (IRuntimeDetector detector : detectors) {
if (detector.isEnabled()) {
@@ -108,15 +108,15 @@
List<RuntimeDefinition> serverDefinitions = locator
.searchForRuntimes(runtimePath.getPath(),
new NullProgressMonitor());
- runtimePath.getServerDefinitions().clear();
+ runtimePath.getRuntimeDefinitions().clear();
for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
- runtimePath.getServerDefinitions().addAll(serverDefinitions);
+ runtimePath.getRuntimeDefinitions().addAll(serverDefinitions);
}
List<RuntimeDefinition> serverDefinitions = RuntimeUIActivator
.getDefault().getServerDefinitions();
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault()
.getRuntimeDetectors();
for (IRuntimeDetector detector : detectors) {
if (detector.isEnabled()) {
@@ -127,7 +127,7 @@
@Test
public void testRuntimeDetectors() {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault()
.getRuntimeDetectors();
assertTrue("Runtime detectors don't exist.", detectors.size() > 0);
}
@@ -394,7 +394,7 @@
@Test
public void testInvalidDetectors() {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDeclaredRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getDeclaredRuntimeDetectors();
IRuntimeDetector invalidDetector = null;
for (IRuntimeDetector detector:detectors) {
if (detector instanceof InvalidRuntimeDetector) {
Modified: trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java 2012-08-31 07:17:03 UTC (rev 43346)
+++ trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java 2012-08-31 07:17:17 UTC (rev 43347)
@@ -101,13 +101,13 @@
@Test
public void testRuntimeDetectors() {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
assertTrue("Runtime detectors don't exist.", detectors.size() > 0);
assertTrue(handlerExists("org.jboss.tools.runtime.handlers.SeamHandler"));
}
private boolean handlerExists(String id) {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
boolean found = false;
Iterator<IRuntimeDetector> i = detectors.iterator();
while(i.hasNext()) {
@@ -272,7 +272,7 @@
/* Pass to all handlers the list of runtime definitions and let them initialize them */
private void initializeDefinitions(List<RuntimeDefinition> runtimeDefinitions) {
- Set<IRuntimeDetector> detectors = RuntimeCoreActivator
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault()
.getRuntimeDetectors();
for (IRuntimeDetector detector : detectors) {
if (detector.isEnabled()) {
12 years, 4 months
JBoss Tools SVN: r43346 - trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: mmalina
Date: 2012-08-31 03:17:03 -0400 (Fri, 31 Aug 2012)
New Revision: 43346
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/pom.xml
Log:
Updated as ui bot test pom.xml to reflect changes in stable branch.
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/pom.xml
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/pom.xml 2012-08-31 06:16:07 UTC (rev 43345)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/pom.xml 2012-08-31 07:17:03 UTC (rev 43346)
@@ -13,14 +13,12 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <jbosstools.test.jboss-as-7.1.home>${requirementsDirectory}/jboss-as-7.1.1.Final</jbosstools.test.jboss-as-7.1.home>
- <jbosstools.test.jboss-as-7.1.url>http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1...</jbosstools.test.jboss-as-7.1.url>
- <jbosstools.test.jboss-as-7.1.md5>175c92545454f4e7270821f4b8326c4e</jbosstools.test.jboss-as-7.1.md5>
- <configurations.dir>resources/project_config_files</configurations.dir>
+ <swtbot.test.skip>false</swtbot.test.skip>
+ <maven.test.failure.ignore>true</maven.test.failure.ignore>
+ <requirementsDirectory>${project.build.directory}/requirements</requirementsDirectory>
<additionalSystemProperties></additionalSystemProperties>
- <systemProperties>${additionalSystemProperties} -Djbosstools.test.jboss-as-7.1.home=${jbosstools.test.jboss-as-7.1.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
- <test.class>org.jboss.ide.eclipse.as.ui.bot.test.AllTestsSuite</test.class>
- <surefire.timeout>7200</surefire.timeout>
+ <runtimesProperties></runtimesProperties>
+ <systemProperties>${additionalSystemProperties} ${runtimesProperties} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
</properties>
<profiles>
@@ -43,27 +41,240 @@
<platformSystemProperties> -d32 -Dosgi.arch=x86 -XstartOnFirstThread -Dorg.eclipse.swtbot.keyboard.layout=MAC_EN_US</platformSystemProperties>
</properties>
</profile>
- </profiles>
-
- <build>
- <plugins>
- <plugin>
+
+ <!-- the default and jbosstools-staging-aggregate profiles are to be active always
+ - thus using a random property is known to be always defined -->
+ <profile>
+ <id>default</id>
+ <activation>
+ <property>
+ <name>!disableDefaultProfiles</name>
+ </property>
+ </activation>
+ </profile>
+ <profile>
+ <id>jbosstools-staging-aggregate</id>
+ <activation>
+ <property>
+ <name>!disableDefaultProfiles</name>
+ </property>
+ </activation>
+ </profile>
+
+ <profile>
+ <id>projects</id>
+ <activation>
+ <property>
+ <name>!test.profile</name>
+ </property>
+ </activation>
+ <properties>
+ <test.class>org.jboss.ide.eclipse.as.ui.bot.test.AllTestsSuite</test.class>
+ <jbosstools.test.jboss-as-3.2.home>${requirementsDirectory}/jboss-3.2.8.SP1</jbosstools.test.jboss-as-3.2.home>
+ <jbosstools.test.jboss-as-4.0.home>${requirementsDirectory}/jboss-4.0.5.GA</jbosstools.test.jboss-as-4.0.home>
+ <jbosstools.test.jboss-as-4.2.home>${requirementsDirectory}/jboss-4.2.3.GA</jbosstools.test.jboss-as-4.2.home>
+ <jbosstools.test.jboss-as-5.0.home>${requirementsDirectory}/jboss-5.0.1.GA</jbosstools.test.jboss-as-5.0.home>
+ <jbosstools.test.jboss-as-5.1.home>${requirementsDirectory}/jboss-5.1.0.GA</jbosstools.test.jboss-as-5.1.home>
+ <jbosstools.test.jboss-as-6.x.home>${requirementsDirectory}/jboss-6.1.0.Final</jbosstools.test.jboss-as-6.x.home>
+ <jbosstools.test.jboss-as-7.0.home>${requirementsDirectory}/jboss-as-7.0.2.Final</jbosstools.test.jboss-as-7.0.home>
+ <jbosstools.test.jboss-as-7.1.home>${requirementsDirectory}/jboss-as-7.1.1.Final</jbosstools.test.jboss-as-7.1.home>
+ <runtimesProperties>-Djbosstools.test.jboss-as-3.2.home=${jbosstools.test.jboss-as-3.2.home} -Djbosstools.test.jboss-as-4.0.home=${jbosstools.test.jboss-as-4.0.home} -Djbosstools.test.jboss-as-4.2.home=${jbosstools.test.jboss-as-4.2.home} -Djbosstools.test.jboss-as-5.0.home=${jbosstools.test.jboss-as-5.0.home} -Djbosstools.test.jboss-as-5.1.home=${jbosstools.test.jboss-as-5.1.home} -Djbosstools.test.jboss-as-6.x.home=${jbosstools.test.jboss-as-6.x.home} -Djbosstools.test.jboss-as-7.0.home=${jbosstools.test.jboss-as-7.0.home} -Djbosstools.test.jboss-as-7.1.home=${jbosstools.test.jboss-as-7.1.home} -Dtest.configurations.dir=resources/config_files_templates/project</runtimesProperties>
+ </properties>
+ <build>
+ <plugins><plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>maven-download-plugin</artifactId>
<executions>
<execution>
+ <id>install-as-3.2.8</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss/JBoss-3.2.8.SP1/jboss-3...</url>
+ <outputFileName>jboss-3.2.8.SP1.zip</outputFileName>
+ <md5>97147374ee5b048e4462c7ebaf3cccb5</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-as-4.0.5</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.0.5.GA/jboss-4....</url>
+ <outputFileName>jboss-4.0.5.GA.zip</outputFileName>
+ <md5>a39e85981958fea2411e9346e218aa39</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-as-4.2.3</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4....</url>
+ <outputFileName>jboss-4.2.3.GA-jdk6.zip</outputFileName>
+ <md5>e548d9e369589f8b9be0abc642c19842</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-as-5.0.1</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.0.1.GA/jboss-5....</url>
+ <outputFileName>jboss-5.0.1.GA-jdk6.zip</outputFileName>
+ <md5>8983740c2cdd2bbcbd8e94df0b7a87c8</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-as-5.1.0</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5....</url>
+ <outputFileName>jboss-5.1.0.GA-jdk6.zip</outputFileName>
+ <md5>ca64add783eb38c123ddb0dcd8465e3f</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-as-6.1.0</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.zip</url>
+ <md5>2264e4d5ba448fa07716008d1452f1e7</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-as-7.0.2</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://download.jboss.org/jbossas/7.0/jboss-as-7.0.2.Final/jboss-as-7.0.2...</url>
+ <md5>774556618e73c2273fff91fa5e92c1d5</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ <execution>
<id>install-as-7.1.1</id>
<phase>pre-integration-test</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
- <url>${jbosstools.test.jboss-as-7.1.url}</url>
- <md5>${jbosstools.test.jboss-as-7.1.md5}</md5>
+ <url>http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1...</url>
+ <md5>175c92545454f4e7270821f4b8326c4e</md5>
<unpack>true</unpack>
</configuration>
</execution>
</executions>
+ </plugin></plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>eap5</id>
+ <activation>
+ <property>
+ <name>test.profile</name>
+ <value>eap5</value>
+ </property>
+ </activation>
+ <properties>
+ <test.class>org.jboss.ide.eclipse.as.ui.bot.test.EAP5CompatibilitySuite</test.class>
+ <jbosstools.test.jboss-eap-5.home>${requirementsDirectory}/jboss-eap-5.1/jboss-as</jbosstools.test.jboss-eap-5.home>
+ <jbosstools.test.jboss-eap-5.url>url/to/jboss-eap-noauth-5.1.2.zip</jbosstools.test.jboss-eap-5.url>
+ <jbosstools.test.jboss-eap-5.md5>82fac5578a5ed96d68592ac58f9c35e4</jbosstools.test.jboss-eap-5.md5>
+ <runtimesProperties>-Djbosstools.test.jboss-eap-5.home=${jbosstools.test.jboss-eap-5.home} -Dswtbot.test.properties.file=resources/config_files_templates/product/eap-5.properties</runtimesProperties>
+ </properties>
+ <build>
+ <plugins><plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>maven-download-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install-eap-5</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>${jbosstools.test.jboss-eap-5.url}</url>
+ <md5>${jbosstools.test.jboss-eap-5.md5}</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin></plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>eap6</id>
+ <activation>
+ <property>
+ <name>test.profile</name>
+ <value>eap6</value>
+ </property>
+ </activation>
+ <properties>
+ <test.class>org.jboss.ide.eclipse.as.ui.bot.test.EAP6CompatibilitySuite</test.class>
+ <jbosstools.test.jboss-eap-6.home>${requirementsDirectory}/jboss-eap-6.0</jbosstools.test.jboss-eap-6.home>
+ <jbosstools.test.jboss-eap-6.url></jbosstools.test.jboss-eap-6.url>
+ <jbosstools.test.jboss-eap-6.md5>ca0e20c5523281233888c296689b7172</jbosstools.test.jboss-eap-6.md5>
+ <runtimesProperties>-Djbosstools.test.jboss-eap-6.home=${jbosstools.test.jboss-eap-6.home} -Dswtbot.test.properties.file=resources/config_files_templates/product/eap-6.properties</runtimesProperties>
+ </properties>
+ <build>
+ <plugins><plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>maven-download-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install-eap-6</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>${jbosstools.test.jboss-eap-6.url}</url>
+ <md5>${jbosstools.test.jboss-eap-6.md5}</md5>
+ <unpack>true</unpack>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin></plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>maven-download-plugin</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <configuration>
+ <skip>${skipRequirements}</skip>
+ <outputDirectory>${requirementsDirectory}</outputDirectory>
+ </configuration>
</plugin>
<plugin>
@@ -71,9 +282,17 @@
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<useUIThread>false</useUIThread>
+ <surefire.timeout>7200</surefire.timeout>
+ <forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
<testSuite>org.jboss.ide.eclipse.as.ui.bot.test</testSuite>
<testClass>${test.class}</testClass>
<skip>${swtbot.test.skip}</skip>
+ <explodedBundles>
+ <bundle>org.mozilla.xulrunner.cocoa.macosx</bundle>
+ <bundle>org.mozilla.xulrunner.gtk.linux.x86</bundle>
+ <bundle>org.mozilla.xulrunner.gtk.linux.x86_64</bundle>
+ <bundle>org.mozilla.xulrunner.win32.win32.x86</bundle>
+ </explodedBundles>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
12 years, 4 months
JBoss Tools SVN: r43345 - in trunk: examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-31 02:16:07 -0400 (Fri, 31 Aug 2012)
New Revision: 43345
Modified:
trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java
trunk/runtime-soa/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java
trunk/runtime-soa/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java
trunk/runtime-soa/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java
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/RuntimeScanner.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/handlers/TestHandler1.java
trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java
trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java
Log:
JBIDE-12521 to trunk
Modified: trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/as/plugins/org.jboss.tools.runtime.as.detector/src/org/jboss/tools/runtime/handlers/JBossASHandler.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -246,7 +246,7 @@
return serverWC.save(true, new NullProgressMonitor());
}
- public RuntimeDefinition getServerDefinition(File root,
+ public RuntimeDefinition getRuntimeDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null || !isEnabled()) {
return null;
@@ -399,7 +399,7 @@
}
@Override
- public void computeIncludedServerDefinition(
+ public void computeIncludedRuntimeDefinition(
RuntimeDefinition serverDefinition) {
if (serverDefinition == null) {
return;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/DownloadRuntimeDialog.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -553,11 +553,11 @@
final RuntimePath runtimePath = new RuntimePath(directory);
List<RuntimeDefinition> serverDefinitions = locator.searchForRuntimes(
runtimePath.getPath(), monitor);
- runtimePath.getServerDefinitions().clear();
+ runtimePath.getRuntimeDefinitions().clear();
for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
- runtimePath.getServerDefinitions().addAll(serverDefinitions);
+ runtimePath.getRuntimeDefinitions().addAll(serverDefinitions);
RuntimeUIActivator.getDefault().getRuntimePaths().add(runtimePath);
RuntimeUIActivator.getDefault().saveRuntimePaths();
if (serverDefinitions.size() == 0) {
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/JBossRuntimeLocator.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -89,7 +89,7 @@
if (!detector.isEnabled()) {
continue;
}
- RuntimeDefinition runtimeDefinition = detector.getServerDefinition(directory, monitor);
+ RuntimeDefinition runtimeDefinition = detector.getRuntimeDefinition(directory, monitor);
if (runtimeDefinition != null) {
runtimeCollector.add(runtimeDefinition);
return;
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -127,7 +127,7 @@
}
@Override
- public void computeIncludedServerDefinition(
+ public void computeIncludedRuntimeDefinition(
RuntimeDefinition runtimeDefinition) {
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -37,7 +37,7 @@
* @param monitor
* @return
*/
- RuntimeDefinition getServerDefinition(File root, IProgressMonitor monitor);
+ RuntimeDefinition getRuntimeDefinition(File root, IProgressMonitor monitor);
/**
* The framework is asking you to check nested folders for
@@ -45,7 +45,7 @@
*
* @param runtimeDefinition
*/
- void computeIncludedServerDefinition(RuntimeDefinition runtimeDefinition);
+ void computeIncludedRuntimeDefinition(RuntimeDefinition runtimeDefinition);
void setName(String name);
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -28,7 +28,7 @@
}
@Override
- public RuntimeDefinition getServerDefinition(File root,
+ public RuntimeDefinition getRuntimeDefinition(File root,
IProgressMonitor monitor) {
return null;
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/RuntimePath.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -24,13 +24,13 @@
private String path;
private boolean scanOnEveryStartup;
- private List<RuntimeDefinition> serverDefinitions;
+ private List<RuntimeDefinition> runtimeDefinitions;
private long timestamp;
public RuntimePath(String path) {
this.path = path;
this.scanOnEveryStartup = false;
- this.serverDefinitions = new ArrayList<RuntimeDefinition>();
+ this.runtimeDefinitions = new ArrayList<RuntimeDefinition>();
this.timestamp = -1;
}
@@ -50,15 +50,15 @@
this.scanOnEveryStartup = scanOnEveryStartup;
}
- public List<RuntimeDefinition> getServerDefinitions() {
- return serverDefinitions;
+ public List<RuntimeDefinition> getRuntimeDefinitions() {
+ return runtimeDefinitions;
}
@Override
public Object clone() throws CloneNotSupportedException {
RuntimePath runtimePath = new RuntimePath(path);
runtimePath.setScanOnEveryStartup(scanOnEveryStartup);
- runtimePath.serverDefinitions = (List<RuntimeDefinition>) ((ArrayList<RuntimeDefinition>)serverDefinitions).clone();
+ runtimePath.runtimeDefinitions = (List<RuntimeDefinition>) ((ArrayList<RuntimeDefinition>)runtimeDefinitions).clone();
return runtimePath;
}
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-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/JBossRuntimeStartup.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -54,7 +54,7 @@
directory.getAbsolutePath());
List<RuntimeDefinition> runtimeDefinitions = locator
.searchForRuntimes(runtimePath.getPath(), monitor);
- runtimePath.getServerDefinitions().clear();
+ runtimePath.getRuntimeDefinitions().clear();
for (RuntimeDefinition serverDefinition : runtimeDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
@@ -67,11 +67,11 @@
for (RuntimePath runtimePath : runtimePaths) {
List<RuntimeDefinition> serverDefinitions = locator
.searchForRuntimes(runtimePath.getPath(), monitor);
- runtimePath.getServerDefinitions().clear();
+ runtimePath.getRuntimeDefinitions().clear();
for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
- runtimePath.getServerDefinitions().addAll(serverDefinitions);
+ runtimePath.getRuntimeDefinitions().addAll(serverDefinitions);
}
if (runtimePaths.size() > 0) {
RuntimeUIActivator.getDefault().getRuntimePaths()
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeScanner.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -100,15 +100,15 @@
if (monitor.isCanceled()) {
return false;
}
- runtimePath.getServerDefinitions().clear();
+ runtimePath.getRuntimeDefinitions().clear();
for (RuntimeDefinition serverDefinition:serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
- runtimePath.getServerDefinitions().addAll(serverDefinitions);
+ runtimePath.getRuntimeDefinitions().addAll(serverDefinitions);
RuntimeUIActivator.setTimestamp(runtimePaths);
}
monitor.setTaskName("JBoss Runtime Detector: checking " + runtimePath.getPath());
- List<RuntimeDefinition> serverDefinitions = runtimePath.getServerDefinitions();
+ List<RuntimeDefinition> serverDefinitions = runtimePath.getRuntimeDefinitions();
for (RuntimeDefinition serverDefinition:serverDefinitions) {
if (monitor.isCanceled()) {
return false;
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -193,7 +193,7 @@
viewer.setLabelProvider(new RuntimeLabelProvider());
List<RuntimeDefinition> serverDefinitions = new ArrayList<RuntimeDefinition>();
for (RuntimePath runtimePath:runtimePaths2) {
- serverDefinitions.addAll(runtimePath.getServerDefinitions());
+ serverDefinitions.addAll(runtimePath.getRuntimeDefinitions());
}
viewer.setContentProvider(new RuntimeContentProvider(serverDefinitions));
viewer.setInput(serverDefinitions);
@@ -213,11 +213,11 @@
for (RuntimePath runtimePath : runtimePaths) {
List<RuntimeDefinition> serverDefinitions = locator
.searchForRuntimes(runtimePath.getPath(), monitor);
- runtimePath.getServerDefinitions().clear();
+ runtimePath.getRuntimeDefinitions().clear();
for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
- runtimePath.getServerDefinitions()
+ runtimePath.getRuntimeDefinitions()
.addAll(serverDefinitions);
}
}
@@ -234,7 +234,7 @@
List<RuntimeDefinition> serverDefinitions = new ArrayList<RuntimeDefinition>();
for (RuntimePath runtimePath : runtimePaths) {
serverDefinitions.addAll(runtimePath
- .getServerDefinitions());
+ .getRuntimeDefinitions());
viewer.setInput(serverDefinitions);
for (RuntimeDefinition serverDefinition : serverDefinitions) {
runtimeExists(serverDefinition);
@@ -329,7 +329,7 @@
included);
}
}
- runtimePath.getServerDefinitions().add(serverDefinition);
+ runtimePath.getRuntimeDefinitions().add(serverDefinition);
}
runtimePaths.add(runtimePath);
}
@@ -337,7 +337,7 @@
for(RuntimeDefinition definition:getServerDefinitions()) {
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
for (IRuntimeDetector detector:detectors) {
- detector.computeIncludedServerDefinition(definition);
+ detector.computeIncludedRuntimeDefinition(definition);
}
}
}
@@ -378,7 +378,7 @@
runtimePathNode.putBoolean(SCAN_ON_EVERY_STAERTUP, runtimePath.isScanOnEveryStartup());
runtimePathNode.putString(TIMESTAMP, String.valueOf(runtimePath.getTimestamp()));
IMemento serverDefinitionsNode = runtimePathNode.createChild(SERVER_DEFINITIONS);
- List<RuntimeDefinition> definitions = runtimePath.getServerDefinitions();
+ List<RuntimeDefinition> definitions = runtimePath.getRuntimeDefinitions();
putDefinitions(serverDefinitionsNode, definitions);
}
writer = new StringWriter();
@@ -449,7 +449,7 @@
serverDefinitions.clear();
}
for (RuntimePath runtimePath:getRuntimePaths()) {
- serverDefinitions.addAll(runtimePath.getServerDefinitions());
+ serverDefinitions.addAll(runtimePath.getRuntimeDefinitions());
}
return serverDefinitions;
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -353,7 +353,7 @@
}
for (RuntimePath runtimePath : runtimePaths) {
- for (RuntimeDefinition serverDefinition : runtimePath.getServerDefinitions()) {
+ for (RuntimeDefinition serverDefinition : runtimePath.getRuntimeDefinitions()) {
if (!hideCreatedRuntimes) {
serverDefinitions.add(serverDefinition);
} else if (!RuntimeUIActivator.runtimeCreated(serverDefinition)) {
@@ -366,8 +366,8 @@
protected List<RuntimeDefinition> getAllDefinitions(RuntimePath runtimePath) {
List<RuntimeDefinition> allDefinitions = new ArrayList<RuntimeDefinition>();
- allDefinitions.addAll(runtimePath.getServerDefinitions());
- for (RuntimeDefinition serverDefinition : runtimePath.getServerDefinitions()) {
+ allDefinitions.addAll(runtimePath.getRuntimeDefinitions());
+ for (RuntimeDefinition serverDefinition : runtimePath.getRuntimeDefinitions()) {
allDefinitions.addAll(serverDefinition.getIncludedServerDefinitions());
}
return allDefinitions;
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -339,7 +339,7 @@
runtimePaths2.add(runtimePath);
RuntimeUIActivator.refreshRuntimes(getShell(), runtimePaths2, null, true, 15);
configureSearch();
- runtimePathViewer.setInput(runtimePath.getServerDefinitions());
+ runtimePathViewer.setInput(runtimePath.getRuntimeDefinitions());
viewer.refresh();
}
Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/handlers/TestHandler1.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/handlers/TestHandler1.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/handlers/TestHandler1.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -32,7 +32,7 @@
}
@Override
- public RuntimeDefinition getServerDefinition(File root,
+ public RuntimeDefinition getRuntimeDefinition(File root,
IProgressMonitor monitor) {
if( root.isDirectory() && root.list().length == 0 ) {
RuntimeDefinition def = new RuntimeDefinition(
Modified: trunk/runtime-soa/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java
===================================================================
--- trunk/runtime-soa/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime-soa/plugins/org.jboss.tools.runtime.drools.detector/src/org/jboss/tools/runtime/handlers/DroolsHandler.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -44,16 +44,16 @@
}
- private void initializeInternal(List<RuntimeDefinition> serverDefinitions,
+ private void initializeInternal(List<RuntimeDefinition> runtimeDefinitions,
List<DroolsRuntime> droolsRuntimes) {
- for (RuntimeDefinition serverDefinition : serverDefinitions) {
- String type = serverDefinition.getType();
- if (serverDefinition.isEnabled() && !droolsExists(serverDefinition)) {
+ for (RuntimeDefinition runtimeDefinition : runtimeDefinitions) {
+ String type = runtimeDefinition.getType();
+ if (runtimeDefinition.isEnabled() && !droolsExists(runtimeDefinition)) {
if (DROOLS.equals(type)) {
- File droolsRoot = serverDefinition.getLocation(); //$NON-NLS-1$
+ File droolsRoot = runtimeDefinition.getLocation(); //$NON-NLS-1$
if (droolsRoot.isDirectory()) {
DroolsRuntime runtime = new DroolsRuntime();
- runtime.setName("Drools " + serverDefinition.getVersion() + " - " + serverDefinition.getName()); //$NON-NLS-1$
+ runtime.setName("Drools " + runtimeDefinition.getVersion() + " - " + serverDefinition.getName()); //$NON-NLS-1$
runtime.setPath(droolsRoot.getAbsolutePath());
DroolsRuntimeManager.recognizeJars(runtime);
runtime.setDefault(true);
@@ -61,7 +61,7 @@
}
}
}
- initializeInternal(serverDefinition.getIncludedServerDefinitions(),
+ initializeInternal(runtimeDefinition.getIncludedServerDefinitions(),
droolsRuntimes);
}
}
@@ -70,13 +70,13 @@
* @param serverDefinition
* @return
*/
- private static boolean droolsExists(RuntimeDefinition serverDefinition) {
+ private static boolean droolsExists(RuntimeDefinition runtimeDefinition) {
DroolsRuntime[] droolsRuntimes = DroolsRuntimeManager
.getDroolsRuntimes();
for (DroolsRuntime dr : droolsRuntimes) {
String location = dr.getPath();
if (location != null
- && location.equals(serverDefinition.getLocation()
+ && location.equals(runtimeDefinition.getLocation()
.getAbsolutePath())) {
return true;
}
@@ -85,7 +85,7 @@
}
@Override
- public RuntimeDefinition getServerDefinition(File root,
+ public RuntimeDefinition getRuntimeDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null) {
return null;
@@ -111,26 +111,33 @@
}
@Override
- public boolean exists(RuntimeDefinition serverDefinition) {
- if (serverDefinition == null || serverDefinition.getLocation() == null) {
+ public boolean exists(RuntimeDefinition runtimeDefinition) {
+ if (runtimeDefinition == null || runtimeDefinition.getLocation() == null) {
return false;
}
- return droolsExists(serverDefinition);
+ return droolsExists(runtimeDefinition);
}
+
+ @Override
+ public void computeIncludedRuntimeDefinition(
+ RuntimeDefinition runtimeDefinition) {
+ calculateIncludedServerDefinition(runtimeDefinition);
+ }
+ @Deprecated /* Does this belong here? Static with no callers? */
public static void calculateIncludedServerDefinition(
- RuntimeDefinition serverDefinition) {
- if (serverDefinition == null
- || !SOA_P.equals(serverDefinition.getType())) {
+ RuntimeDefinition runtimeDefinition) {
+ if (runtimeDefinition == null
+ || !SOA_P.equals(runtimeDefinition.getType())) {
return;
}
- File droolsRoot = serverDefinition.getLocation(); //$NON-NLS-1$
+ File droolsRoot = runtimeDefinition.getLocation(); //$NON-NLS-1$
if (droolsRoot.isDirectory()) {
- String name = "Drools - " + serverDefinition.getName(); //$NON-NLS-1$
+ String name = "Drools - " + runtimeDefinition.getName(); //$NON-NLS-1$
RuntimeDefinition sd = new RuntimeDefinition(name,
- serverDefinition.getVersion(), DROOLS, droolsRoot);
- sd.setParent(serverDefinition);
- serverDefinition.getIncludedServerDefinitions().add(sd);
+ runtimeDefinition.getVersion(), DROOLS, droolsRoot);
+ sd.setParent(runtimeDefinition);
+ runtimeDefinition.getIncludedServerDefinitions().add(sd);
}
}
Modified: trunk/runtime-soa/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java
===================================================================
--- trunk/runtime-soa/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime-soa/plugins/org.jboss.tools.runtime.esb.detector/src/org/jboss/tools/runtime/handlers/EsbHandler.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -24,21 +24,21 @@
private static final String DEFAULT_CONFIGURATION = "default";
private static final String ESB = "ESB"; //$NON-NLS-1$
- public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
- for (RuntimeDefinition serverDefinition : serverDefinitions) {
- String type = serverDefinition.getType();
- if (serverDefinition.isEnabled() && !esbExists(serverDefinition)) {
+ public void initializeRuntimes(List<RuntimeDefinition> runtimeDefinitions) {
+ for (RuntimeDefinition runtimeDefinition : runtimeDefinitions) {
+ String type = runtimeDefinition.getType();
+ if (runtimeDefinition.isEnabled() && !esbExists(runtimeDefinition)) {
if (ESB.equals(type)) {
JBossESBRuntime runtime = new JBossESBRuntime();
- runtime.setName("ESB - " + serverDefinition.getName()); //$NON-NLS-1$
- runtime.setHomeDir(serverDefinition.getLocation()
+ runtime.setName("ESB - " + runtimeDefinition.getName()); //$NON-NLS-1$
+ runtime.setHomeDir(runtimeDefinition.getLocation()
.getAbsolutePath());
runtime.setConfiguration(DEFAULT_CONFIGURATION);
- runtime.setVersion(serverDefinition.getVersion());
+ runtime.setVersion(runtimeDefinition.getVersion());
JBossRuntimeManager.getInstance().addRuntime(runtime);
}
}
- initializeRuntimes(serverDefinition.getIncludedServerDefinitions());
+ initializeRuntimes(runtimeDefinition.getIncludedServerDefinitions());
}
}
@@ -46,11 +46,11 @@
* @param serverDefinition
* @return
*/
- private static boolean esbExists(RuntimeDefinition serverDefinition) {
+ private static boolean esbExists(RuntimeDefinition runtimeDefinition) {
JBossESBRuntime[] runtimes = JBossRuntimeManager.getInstance().getRuntimes();
for (JBossESBRuntime runtime:runtimes) {
String location = runtime.getHomeDir();
- if (location != null && location.equals(serverDefinition.getLocation().getAbsolutePath())) {
+ if (location != null && location.equals(runtimeDefinition.getLocation().getAbsolutePath())) {
return true;
}
}
Modified: trunk/runtime-soa/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java
===================================================================
--- trunk/runtime-soa/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/runtime-soa/plugins/org.jboss.tools.runtime.jbpm.detector/src/org/jboss/tools/runtime/handlers/JbpmHandler.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -30,31 +30,31 @@
private static final String SOA_P = "SOA-P"; //$NON-NLS-1$
private static final String SOA_P_STD = "SOA-P-STD"; //$NON-NLS-1$
- public static File getJbpmRoot(RuntimeDefinition serverDefinition) {
- String type = serverDefinition.getType();
+ public static File getJbpmRoot(RuntimeDefinition runtimeDefinition) {
+ String type = runtimeDefinition.getType();
if (SOA_P.equals(type) || SOA_P_STD.equals(type)) {
- return new File(serverDefinition.getLocation(),"jbpm-jpdl"); //$NON-NLS-1$
+ return new File(runtimeDefinition.getLocation(),"jbpm-jpdl"); //$NON-NLS-1$
}
if (JBPM.equals(type)) {
- return serverDefinition.getLocation();
+ return runtimeDefinition.getLocation();
}
return null;
}
@Override
- public void initializeRuntimes(List<RuntimeDefinition> serverDefinitions) {
- for (RuntimeDefinition serverDefinition : serverDefinitions) {
- if (serverDefinition.isEnabled() && !jbpmExists(serverDefinition)) {
- File jbpmRoot = getJbpmRoot(serverDefinition);
+ public void initializeRuntimes(List<RuntimeDefinition> runtimeDefinitions) {
+ for (RuntimeDefinition runtimeDefinition : runtimeDefinitions) {
+ if (runtimeDefinition.isEnabled() && !jbpmExists(runtimeDefinition)) {
+ File jbpmRoot = getJbpmRoot(runtimeDefinition);
if (jbpmRoot == null || !jbpmRoot.isDirectory()) {
continue;
}
- String type = serverDefinition.getType();
+ String type = runtimeDefinition.getType();
if (JBPM.equals(type)) {
- PreferencesManager.getInstance().addJbpmInstallation(serverDefinition.getName(), jbpmRoot.getAbsolutePath(), serverDefinition.getVersion());
+ PreferencesManager.getInstance().addJbpmInstallation(runtimeDefinition.getName(), jbpmRoot.getAbsolutePath(), runtimeDefinition.getVersion());
}
}
- initializeRuntimes(serverDefinition.getIncludedServerDefinitions());
+ initializeRuntimes(runtimeDefinition.getIncludedServerDefinitions());
}
}
@@ -63,8 +63,8 @@
* @param serverDefinition
* @return
*/
- public static boolean jbpmExists(RuntimeDefinition serverDefinition) {
- File jbpmRoot = getJbpmRoot(serverDefinition);
+ public static boolean jbpmExists(RuntimeDefinition runtimeDefinition) {
+ File jbpmRoot = getJbpmRoot(runtimeDefinition);
if (jbpmRoot == null || !jbpmRoot.isDirectory()) {
return false;
}
@@ -80,7 +80,7 @@
}
@Override
- public RuntimeDefinition getServerDefinition(File root,
+ public RuntimeDefinition getRuntimeDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null) {
return null;
@@ -125,20 +125,28 @@
return jbpmExists(serverDefinition);
}
- public static void calculateIncludedServerDefinition(
- RuntimeDefinition serverDefinition) {
- if (serverDefinition == null || !SOA_P.equals(serverDefinition.getType())) {
+ @Deprecated /* Does this belong as static? Nobody calls this */
+ public static void calculateIncludedRuntimeDefinition(
+ RuntimeDefinition runtimeDefinition) {
+ if (runtimeDefinition == null || !SOA_P.equals(runtimeDefinition.getType())) {
return;
}
- File jbpmRoot = new File(serverDefinition.getLocation(),"jbpm-jpdl"); //$NON-NLS-1$
+ File jbpmRoot = new File(runtimeDefinition.getLocation(),"jbpm-jpdl"); //$NON-NLS-1$
if (jbpmRoot.isDirectory()) {
String version = JBPM3;
- if (isJbpm4(serverDefinition.getLocation().getAbsolutePath())) {
+ if (isJbpm4(runtimeDefinition.getLocation().getAbsolutePath())) {
version = JBPM4;
}
- RuntimeDefinition sd = new RuntimeDefinition(serverDefinition.getName(), version, JBPM, jbpmRoot);
- sd.setParent(serverDefinition);
- serverDefinition.getIncludedServerDefinitions().add(sd);
+ RuntimeDefinition sd = new RuntimeDefinition(runtimeDefinition.getName(), version, JBPM, jbpmRoot);
+ sd.setParent(runtimeDefinition);
+ runtimeDefinition.getIncludedServerDefinitions().add(sd);
}
}
+
+ @Override
+ public void computeIncludedRuntimeDefinition(
+ RuntimeDefinition runtimeDefinition) {
+ calculateIncludedRuntimeDefinition(runtimeDefinition);
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/src/org/jboss/tools/runtime/handlers/SeamHandler.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -115,7 +115,7 @@
}
@Override
- public RuntimeDefinition getServerDefinition(File root,
+ public RuntimeDefinition getRuntimeDefinition(File root,
IProgressMonitor monitor) {
if (monitor.isCanceled() || root == null) {
return null;
Modified: trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java 2012-08-31 05:17:58 UTC (rev 43344)
+++ trunk/seam/tests/org.jboss.tools.runtime.seam.detector.test/src/org/jboss/tools/runtime/seam/detector/test/SeamRuntimeDetectionTest.java 2012-08-31 06:16:07 UTC (rev 43345)
@@ -287,11 +287,11 @@
new NullProgressMonitor());
// Shouldn't this be done by the framework somehow??
- runtimePath.getServerDefinitions().clear();
+ runtimePath.getRuntimeDefinitions().clear();
for (RuntimeDefinition serverDefinition : serverDefinitions) {
serverDefinition.setRuntimePath(runtimePath);
}
- runtimePath.getServerDefinitions().addAll(serverDefinitions);
+ runtimePath.getRuntimeDefinitions().addAll(serverDefinitions);
return serverDefinitions;
}
12 years, 4 months
JBoss Tools SVN: r43344 - trunk/common/plugins/org.jboss.tools.common.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-31 01:17:58 -0400 (Fri, 31 Aug 2012)
New Revision: 43344
Modified:
trunk/common/plugins/org.jboss.tools.common.core/
Log:
svn ignore bin
Property changes on: trunk/common/plugins/org.jboss.tools.common.core
___________________________________________________________________
Modified: svn:ignore
- target
+ target
bin
12 years, 4 months
JBoss Tools SVN: r43343 - trunk/common/plugins/org.jboss.tools.common.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-31 01:17:31 -0400 (Fri, 31 Aug 2012)
New Revision: 43343
Modified:
trunk/common/plugins/org.jboss.tools.common.core/
Log:
svn ignore target folder
Property changes on: trunk/common/plugins/org.jboss.tools.common.core
___________________________________________________________________
Added: svn:ignore
+ target
12 years, 4 months
JBoss Tools SVN: r43342 - trunk/central.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-08-30 20:35:25 -0400 (Thu, 30 Aug 2012)
New Revision: 43342
Modified:
trunk/central/pom.xml
Log:
added reference to m2e-wtp repository to fix the build
Modified: trunk/central/pom.xml
===================================================================
--- trunk/central/pom.xml 2012-08-31 00:13:23 UTC (rev 43341)
+++ trunk/central/pom.xml 2012-08-31 00:35:25 UTC (rev 43342)
@@ -27,5 +27,18 @@
<module>tests</module>
<module>site</module>
</modules>
+ <repositories>
+ <repository>
+ <id>jbosstools-m2e-wtp-mirror</id>
+ <layout>p2</layout>
+ <url>http://download.jboss.org/jbosstools/updates/requirements/m2eclipse/m2e-w...</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
</project>
12 years, 4 months
JBoss Tools SVN: r43341 - in trunk/forge/plugins/org.jboss.tools.forge.runtime: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-08-30 20:13:23 -0400 (Thu, 30 Aug 2012)
New Revision: 43341
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath
trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties
trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml
Log:
JBIDE-12515 Update Forge Embedded Runtime to 1.0.6.Final
fixed actual problem, download is skipped when tests are skipped by -DskipTests
explicitly added <skip>false</skip> to fix compilation errors
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath 2012-08-30 23:46:50 UTC (rev 43340)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath 2012-08-31 00:13:23 UTC (rev 43341)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.5.Final/modules/javax/inject/api/main/javax.inject-1.jar"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.5.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.5.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.5.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/javax/inject/api/main/javax.inject-1.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.6.Final.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-08-30 23:46:50 UTC (rev 43340)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-08-31 00:13:23 UTC (rev 43341)
@@ -16,7 +16,6 @@
org.jboss.forge.shell.command,
org.jboss.forge.shell.events,
org.jboss.forge.shell.spi
-Bundle-ClassPath: forge-distribution-1.0.5.Final/modules/javax/inject/api/main/javax.inject-1.jar,
- forge-distribution-1.0.5.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
- forge-distribution-1.0.5.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.5.Final.jar
-
+Bundle-ClassPath: forge-distribution-1.0.6.Final/modules/javax/inject/api/main/javax.inject-1.jar,
+ forge-distribution-1.0.6.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
+ forge-distribution-1.0.6.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.6.Final.jar
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties 2012-08-30 23:46:50 UTC (rev 43340)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties 2012-08-31 00:13:23 UTC (rev 43341)
@@ -1,5 +1,5 @@
bin.includes = META-INF/,\
- forge-distribution-1.0.5.Final/,\
+ forge-distribution-1.0.6.Final/,\
plugin.properties
src.includes = *
jars.compile.order = .
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml 2012-08-30 23:46:50 UTC (rev 43340)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml 2012-08-31 00:13:23 UTC (rev 43341)
@@ -32,6 +32,7 @@
<type>zip</type>
</artifactItem>
</artifactItems>
+ <skip>false</skip>
<outputDirectory>${basedir}</outputDirectory>
</configuration>
</execution>
12 years, 4 months
JBoss Tools SVN: r43340 - in trunk/forge/plugins/org.jboss.tools.forge.runtime: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-08-30 19:46:50 -0400 (Thu, 30 Aug 2012)
New Revision: 43340
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath
trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties
Log:
JBIDE-12515 Update Forge Embedded Runtime to 1.0.6.Final
I reverted the changes because it broke the build.
Don't forget to add referenced runtime jars into SVN
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath 2012-08-30 23:30:11 UTC (rev 43339)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath 2012-08-30 23:46:50 UTC (rev 43340)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/javax/inject/api/main/javax.inject-1.jar"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.6.Final.jar"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.5.Final/modules/javax/inject/api/main/javax.inject-1.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.5.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.5.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.5.Final.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-08-30 23:30:11 UTC (rev 43339)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-08-30 23:46:50 UTC (rev 43340)
@@ -1,22 +1,22 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %BundleName
-Bundle-SymbolicName: org.jboss.tools.forge.runtime
-Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-Vendor: %BundleProvider
-Bundle-Localization: plugin
-Eclipse-BundleShape: dir
-Export-Package: javax.enterprise.event,
- javax.inject,
- org.jboss.forge.project,
- org.jboss.forge.resources,
- org.jboss.forge.resources.events,
- org.jboss.forge.shell,
- org.jboss.forge.shell.command,
- org.jboss.forge.shell.events,
- org.jboss.forge.shell.spi
-Bundle-ClassPath: forge-distribution-1.0.6.Final/modules/javax/inject/api/main/javax.inject-1.jar,
- forge-distribution-1.0.6.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
- forge-distribution-1.0.6.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.6.Final.jar
-
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.forge.runtime
+Bundle-Version: 1.1.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %BundleProvider
+Bundle-Localization: plugin
+Eclipse-BundleShape: dir
+Export-Package: javax.enterprise.event,
+ javax.inject,
+ org.jboss.forge.project,
+ org.jboss.forge.resources,
+ org.jboss.forge.resources.events,
+ org.jboss.forge.shell,
+ org.jboss.forge.shell.command,
+ org.jboss.forge.shell.events,
+ org.jboss.forge.shell.spi
+Bundle-ClassPath: forge-distribution-1.0.5.Final/modules/javax/inject/api/main/javax.inject-1.jar,
+ forge-distribution-1.0.5.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
+ forge-distribution-1.0.5.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.5.Final.jar
+
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties 2012-08-30 23:30:11 UTC (rev 43339)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties 2012-08-30 23:46:50 UTC (rev 43340)
@@ -1,5 +1,5 @@
bin.includes = META-INF/,\
- forge-distribution-1.0.6.Final/,\
+ forge-distribution-1.0.5.Final/,\
plugin.properties
src.includes = *
jars.compile.order = .
12 years, 4 months