Index: E:/workspace-3.4M7-JBoss/plugins/org.drools.eclipse/src/main/java/org/drools/eclipse/util/DroolsClasspathContainer.java =================================================================== --- E:/workspace-3.4M7-JBoss/plugins/org.drools.eclipse/src/main/java/org/drools/eclipse/util/DroolsClasspathContainer.java (revision 25288) +++ E:/workspace-3.4M7-JBoss/plugins/org.drools.eclipse/src/main/java/org/drools/eclipse/util/DroolsClasspathContainer.java (working copy) @@ -2,6 +2,7 @@ import java.io.BufferedReader; import java.io.File; +import java.io.FilenameFilter; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; @@ -12,6 +13,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; import org.eclipse.jdt.core.IAccessRule; import org.eclipse.jdt.core.IClasspathContainer; import org.eclipse.jdt.core.IClasspathEntry; @@ -89,7 +91,67 @@ List list = new ArrayList(); if (s != null) { File file = (new Path(s)).toFile(); - addJarNames(file, list); + IPath jbossrulesesbPath = new Path(s).append("jboss-as/server/default/deploy/jbrules.esb"); + File jbossrulesesb=jbossrulesesbPath.toFile(); + if (jbossrulesesb.isDirectory()) { + // the SOA platform + File[] files = jbossrulesesb.listFiles(new FilenameFilter() { + + public boolean accept(File dir, String name) { + if (!name.endsWith(".jar")) { + return false; + } + if (name.startsWith("jbossesb")) { + return false; + } + return true; + } + + }); + for (int i = 0; i < files.length; i++) { + list.add(files[i].getAbsolutePath()); + } + IPath jbossesbsarPath = new Path(s).append("jboss-as/server/default/deploy/jbossesb.sar/lib"); + File jbossesbsar=jbossesbsarPath.toFile(); + if (jbossesbsar.isDirectory()) { + files = jbossesbsar.listFiles(new FilenameFilter() { + + public boolean accept(File dir, String name) { + if (!name.endsWith(".jar")) { + return false; + } + if (name.startsWith("mvel")) { + return true; + } + if (name.startsWith("xstream")) { + return true; + } + return false; + } + + }); + for (int i = 0; i < files.length; i++) { + list.add(files[i].getAbsolutePath()); + } + } + String pluginRootString = Platform.getInstallLocation().getURL().getPath() + "plugins/"; + File pluginRoot = new Path(pluginRootString).toFile(); + files = pluginRoot.listFiles(new FilenameFilter() { + + public boolean accept(File dir, String name) { + if (name.startsWith("org.eclipse.jdt.core_") && name.endsWith(".jar")) { + return true; + } + return false; + } + + }); + for (int i = 0; i < files.length; i++) { + list.add(files[i].getAbsolutePath()); + } + } else { + addJarNames(file, list); + } } return list; }