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;
}