Author: snjeza
Date: 2010-04-06 16:50:12 -0400 (Tue, 06 Apr 2010)
New Revision: 21295
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5950 Need additional runtime checks for ESB &
BPEL project examples (internationalized)
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2010-04-06
16:42:51 UTC (rev 21294)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2010-04-06
20:50:12 UTC (rev 21295)
@@ -30,6 +30,7 @@
public class WTPRuntimeFix implements ProjectExamplesFix {
+ private static final String RIFTSAW_SAR = "riftsaw.sar"; //$NON-NLS-1$
private static final String BPEL = "bpel"; //$NON-NLS-1$
private static final String JBOSSESB_SAR = "jbossesb.sar"; //$NON-NLS-1$
private static final String JBOSSESB_ESB = "jbossesb.esb"; //$NON-NLS-1$
@@ -145,8 +146,14 @@
}
private boolean isBpelPresent(File location, IRuntime runtime) {
- // TODO Auto-generated method stub
- return true;
+ IJBossServerRuntime jbossRuntime =
(IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new
NullProgressMonitor());
+ if (jbossRuntime != null) {
+ IPath jbossLocation = runtime.getLocation();
+ IPath configPath =
jbossLocation.append(IJBossServerConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
+ File configFile = configPath.toFile();
+ return exists(configFile, RIFTSAW_SAR);
+ }
+ return false;
}
private List<String> tokenize(String requiredComponents) {