Author: scabanovich
Date: 2009-05-15 11:05:25 -0400 (Fri, 15 May 2009)
New Revision: 15295
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbBuilder.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java 2009-05-15
14:41:11 UTC (rev 15294)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/KbProjectFactory.java 2009-05-15
15:05:25 UTC (rev 15295)
@@ -17,7 +17,7 @@
* @param resolve if true and results of last build have not been resolved they are
loaded.
* @return
*/
- public static IKbProject getSeamProject(IProject project, boolean resolve) {
+ public static IKbProject getKbProject(IProject project, boolean resolve) {
if(project == null || !project.exists() || !project.isOpen()) return null;
try {
if(!project.hasNature(IKbProject.NATURE_ID)) return null;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbBuilder.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbBuilder.java 2009-05-15
14:41:11 UTC (rev 15294)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbBuilder.java 2009-05-15
15:05:25 UTC (rev 15295)
@@ -10,13 +10,24 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal;
+import java.io.IOException;
import java.util.Map;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
+import org.jboss.tools.jst.web.WebModelPlugin;
+import org.jboss.tools.jst.web.kb.KbProjectFactory;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
+import org.jboss.tools.jst.web.kb.internal.scanner.IFileScanner;
+import org.jboss.tools.jst.web.kb.internal.scanner.LibraryScanner;
+import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
/**
*
@@ -26,10 +37,131 @@
public class KbBuilder extends IncrementalProjectBuilder {
public static String BUILDER_ID = WebKbPlugin.PLUGIN_ID + ".kbbuilder";
//$NON-NLS-1$
+ KbResourceVisitor resourceVisitor = null;
+
+ KbProject getKbProject() {
+ IProject p = getProject();
+ if(p == null) return null;
+ return (KbProject)KbProjectFactory.getKbProject(p, false);
+ }
+
+ KbResourceVisitor getResourceVisitor() {
+ if(resourceVisitor == null) {
+ KbProject p = getKbProject();
+ resourceVisitor = new KbResourceVisitor(p);
+ }
+ return resourceVisitor;
+ }
+
+ class SampleDeltaVisitor implements IResourceDeltaVisitor {
+ /*
+ * @see
org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)
+ */
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ IResource resource = delta.getResource();
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED:
+ return getResourceVisitor().getVisitor().visit(resource);
+ case IResourceDelta.REMOVED:
+ KbProject p = getKbProject();
+ if(p != null) p.pathRemoved(resource.getFullPath());
+ break;
+ case IResourceDelta.CHANGED:
+ return getResourceVisitor().getVisitor().visit(resource);
+ }
+ //return true to continue visiting children.
+ return true;
+ }
+ }
+
+ /**
+ * @see org.eclipse.core.resource.InternalProjectBuilder#build(int,
+ * java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+ */
protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
throws CoreException {
- // TODO Auto-generated method stub
+ KbProject sp = getKbProject();
+ if(sp == null) {
+ return null;
+ }
+
+ long begin = System.currentTimeMillis();
+
+ sp.postponeFiring();
+
+ try {
+
+ sp.resolveStorage(kind != FULL_BUILD);
+
+ if(sp.getClassPath().update()) {
+ sp.getClassPath().process();
+ } else if(sp.getClassPath().hasToUpdateProjectDependencies()) {
+ sp.getClassPath().validateProjectDependencies();
+ }
+
+ TypeInfoCollector.cleanCache();
+
+ if (kind == FULL_BUILD) {
+ fullBuild(monitor);
+ } else {
+ IResourceDelta delta = getDelta(getProject());
+ if (delta == null) {
+ fullBuild(monitor);
+ } else {
+ incrementalBuild(delta, monitor);
+ }
+ }
+ long end = System.currentTimeMillis();
+ sp.fullBuildTime += end - begin;
+ try {
+ sp.store();
+ } catch (IOException e) {
+ WebModelPlugin.getPluginLog().logError(e);
+ }
+
+// sp.postBuild();
+
+ } finally {
+ sp.fireChanges();
+ }
+
return null;
}
+ protected void fullBuild(final IProgressMonitor monitor)
+ throws CoreException {
+ try {
+ getProject().accept(getResourceVisitor().getVisitor());
+ } catch (CoreException e) {
+ WebModelPlugin.getPluginLog().logError(e);
+ }
+ }
+
+ protected void incrementalBuild(IResourceDelta delta,
+ IProgressMonitor monitor) throws CoreException {
+ // the visitor does the work.
+ delta.accept(new SampleDeltaVisitor());
+ }
+
+ /**
+ * Access to xml scanner for test.
+ * @return
+ */
+ public static IFileScanner getXMLScanner() {
+ return new XMLScanner();
+ }
+
+ /**
+ * Access to library scanner for test.
+ * @return
+ */
+ public static IFileScanner getLibraryScanner() {
+ return new LibraryScanner();
+ }
+
+ protected void clean(IProgressMonitor monitor) throws CoreException {
+ KbProject sp = getKbProject();
+ if(sp != null) sp.clean();
+ }
+
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2009-05-15
14:41:11 UTC (rev 15294)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2009-05-15
15:05:25 UTC (rev 15295)
@@ -10,23 +10,35 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Map;
+import java.util.Properties;
import java.util.Set;
import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.xml.XMLUtilities;
import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.KbProjectFactory;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.internal.scanner.ClassPathMonitor;
import org.jboss.tools.jst.web.kb.internal.scanner.LoadedDeclarations;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
+import org.w3c.dom.Element;
/**
*
@@ -166,12 +178,239 @@
public void load() {
if(isStorageResolved) return;
isStorageResolved = true;
+
+ postponeFiring();
+
+ try {
+
+ boolean b = getClassPath().update();
+ if(b) {
+ getClassPath().validateProjectDependencies();
+ }
+ File file = getStorageFile();
+ Element root = null;
+ if(file != null && file.isFile()) {
+ root = XMLUtilities.getElement(file, null);
+ if(root != null) {
+ loadProjectDependencies(root);
+ if(XMLUtilities.getUniqueChild(root, "paths") != null) {
+ loadSourcePaths2(root);
+ }
+ }
+ }
+
+ if(b) {
+ getClassPath().process();
+ }
+
+ } finally {
+ fireChanges();
+ }
+
+ }
+
+ public void clean() {
+ File file = getStorageFile();
+ if(file != null && file.isFile()) {
+ file.delete();
+ }
+ classPath.clean();
+ postponeFiring();
+ IPath[] ps = sourcePaths2.keySet().toArray(new IPath[0]);
+ for (int i = 0; i < ps.length; i++) {
+ pathRemoved(ps[i]);
+ }
+ fireChanges();
+ }
- //TODO
+ public long fullBuildTime;
+ public List<Long> statistics;
+
+
+ /**
+ * Method testing how long it takes to load Seam model
+ * serialized previously.
+ * This approach makes sure, that all other services
+ * (JDT, XModel, etc) are already loaded at first start of
+ * Seam model, so that now it is more or less pure time
+ * to be computed.
+ *
+ * @return
+ */
+ public long reload() {
+ statistics = new ArrayList<Long>();
+ classPath = new ClassPathMonitor(this);
+ sourcePaths.clear();
+ sourcePaths2.clear();
+ isStorageResolved = false;
+ dependsOn.clear();
+ usedBy.clear();
+ libraries.clear();
+
+ long begin = System.currentTimeMillis();
+
+ classPath.init();
+ resolve();
+
+ long end = System.currentTimeMillis();
+ return end - begin;
}
/**
+ * Stores results of last build, so that on exit/enter Eclipse
+ * load them without rebuilding project
+ * @throws IOException
+ */
+ public void store() throws IOException {
+ File file = getStorageFile();
+ file.getParentFile().mkdirs();
+
+ Element root = XMLUtilities.createDocumentElement("seam-project");
//$NON-NLS-1$
+ storeProjectDependencies(root);
+
+// storeSourcePaths(root);
+ storeSourcePaths2(root);
+
+ XMLUtilities.serialize(root, file.getAbsolutePath());
+ }
+
+ /*
*
+ */
+ private File getStorageFile() {
+ IPath path = WebKbPlugin.getDefault().getStateLocation();
+ File file = new File(path.toFile(), "projects/" + project.getName());
//$NON-NLS-1$
+ return file;
+ }
+
+ public void clearStorage() {
+ File f = getStorageFile();
+ if(f != null && f.isFile()) f.delete();
+ }
+
+ /*
+ *
+ */
+ private void loadProjectDependencies(Element root) {
+ Element dependsOnElement = XMLUtilities.getUniqueChild(root,
"depends-on-projects"); //$NON-NLS-1$
+ if(dependsOnElement != null) {
+ Element[] paths = XMLUtilities.getChildren(dependsOnElement, "project");
//$NON-NLS-1$
+ for (int i = 0; i < paths.length; i++) {
+ String p = paths[i].getAttribute("name"); //$NON-NLS-1$
+ if(p == null || p.trim().length() == 0) continue;
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(p);
+ if(project == null || !project.isAccessible()) continue;
+ KbProject sp = (KbProject)KbProjectFactory.getKbProject(project, false);
+ if(sp != null) {
+ dependsOn.add(sp);
+ sp.addDependentSeamProject(this);
+ }
+ }
+ }
+
+ Element usedElement = XMLUtilities.getUniqueChild(root, "used-by-projects");
//$NON-NLS-1$
+ if(usedElement != null) {
+ Element[] paths = XMLUtilities.getChildren(usedElement, "project");
//$NON-NLS-1$
+ for (int i = 0; i < paths.length; i++) {
+ String p = paths[i].getAttribute("name"); //$NON-NLS-1$
+ if(p == null || p.trim().length() == 0) continue;
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(p);
+ if(project == null || !project.isAccessible()) continue;
+ KbProject sp = (KbProject)KbProjectFactory.getKbProject(project, false);
+ if(sp != null) usedBy.add(sp);
+ }
+ }
+
+ }
+
+ private void loadSourcePaths2(Element root) {
+ Properties context = new Properties();
+ context.put("seamProject", this);
+ Element sourcePathsElement = XMLUtilities.getUniqueChild(root, "paths");
//$NON-NLS-1$
+ if(sourcePathsElement == null) return;
+ Element[] paths = XMLUtilities.getChildren(sourcePathsElement, "path");
//$NON-NLS-1$
+ if(paths != null) for (int i = 0; i < paths.length; i++) {
+ String p = paths[i].getAttribute("value"); //$NON-NLS-1$
+ if(p == null || p.trim().length() == 0) continue;
+ IPath path = new Path(p.trim());
+ if(sourcePaths2.containsKey(path)) continue;
+
+ if(!getClassPath().hasPath(path)) {
+ IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if(f == null || !f.exists() || !f.isSynchronized(IResource.DEPTH_ZERO)) continue;
+ }
+
+ //TODO
+
+ long t1 = System.currentTimeMillis();
+ LoadedDeclarations ds = new LoadedDeclarations();
+
+ Element libraries = XMLUtilities.getUniqueChild(paths[i], "libraries");
+ if(libraries != null) {
+
+ //TODO
+
+ }
+
+ getClassPath().pathLoaded(path);
+
+ registerComponents(ds, path);
+ long t2 = System.currentTimeMillis();
+ if(statistics != null) {
+ statistics.add(new Long(t2 - t1));
+ if(t2 - t1 > 30) {
+ System.out.println("--->" + statistics.size() + " " + (t2 -
t1));
+ System.out.println("stop");
+ }
+ }
+ }
+ }
+
+ private void storeSourcePaths2(Element root) {
+ Properties context = new Properties();
+ Element sourcePathsElement = XMLUtilities.createElement(root, "paths");
//$NON-NLS-1$
+ for (IPath path : sourcePaths2.keySet()) {
+ IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if(f != null && f.exists() && f.getProject() != project) {
+ continue;
+ }
+ //TODO
+// context.put(SeamXMLConstants.ATTR_PATH, path);
+ LoadedDeclarations ds = sourcePaths2.get(path);
+ Element pathElement = XMLUtilities.createElement(sourcePathsElement,
"path"); //$NON-NLS-1$
+ pathElement.setAttribute("value", path.toString()); //$NON-NLS-1$
+
+ List<ITagLibrary> fs = ds.getLibraries();
+ if(fs != null && !fs.isEmpty()) {
+ Element cse = XMLUtilities.createElement(pathElement, "factories");
//$NON-NLS-1$
+ for (ITagLibrary d: fs) {
+ //TODO
+// SeamObject o = (SeamObject)d;
+// o.toXML(cse, context);
+ }
+ }
+ }
+ }
+ /*
+ *
+ */
+ private void storeProjectDependencies(Element root) {
+ Element dependsOnElement = XMLUtilities.createElement(root,
"depends-on-projects"); //$NON-NLS-1$
+ for (IKbProject p : dependsOn) {
+ if(!p.getProject().isAccessible()) continue;
+ Element pathElement = XMLUtilities.createElement(dependsOnElement,
"project"); //$NON-NLS-1$
+ pathElement.setAttribute("name", p.getProject().getName()); //$NON-NLS-1$
+ }
+ Element usedElement = XMLUtilities.createElement(root, "used-by-projects");
//$NON-NLS-1$
+ for (IKbProject p : usedBy) {
+ if(!p.getProject().isAccessible()) continue;
+ Element pathElement = XMLUtilities.createElement(usedElement, "project");
//$NON-NLS-1$
+ pathElement.setAttribute("name", p.getProject().getName()); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ *
* @return
* @throws CloneNotSupportedException
*/
@@ -264,7 +503,14 @@
//TODO
}
+ public void postponeFiring() {
+ //TODO
+ }
+ public void fireChanges() {
+ //TODO
+ }
+
class LibraryStorage {
private Set<ITagLibrary> allFactories = new HashSet<ITagLibrary>();
private ITagLibrary[] allFactoriesArray = null;
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java 2009-05-15
15:05:25 UTC (rev 15295)
@@ -0,0 +1,149 @@
+package org.jboss.tools.jst.web.kb.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
+import org.jboss.tools.jst.web.kb.internal.scanner.IFileScanner;
+import org.jboss.tools.jst.web.kb.internal.scanner.LoadedDeclarations;
+import org.jboss.tools.jst.web.kb.internal.scanner.ScannerException;
+import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
+import org.jboss.tools.jst.web.model.helpers.InnerModelHelper;
+
+public class KbResourceVisitor implements IResourceVisitor {
+ static IFileScanner[] FILE_SCANNERS = {
+ new XMLScanner(),
+ };
+
+ KbProject p;
+
+ IPath[] outs = new IPath[0];
+ IPath[] srcs = new IPath[0];
+ IPath webinf = null;
+
+ public KbResourceVisitor(KbProject p) {
+ this.p = p;
+
+ if(p.getProject() != null && p.getProject().isOpen()) {
+ getJavaSourceRoots(p.getProject());
+
+ XModel model = InnerModelHelper.createXModel(p.getProject());
+ if(model != null) {
+ XModelObject wio = FileSystemsHelper.getWebInf(model);
+ if(wio != null) {
+ IResource wir = (IResource)wio.getAdapter(IResource.class);
+ if(wir != null) {
+ webinf = wir.getFullPath();
+ }
+ }
+ }
+ }
+ }
+
+ public IResourceVisitor getVisitor() {
+ return this;
+ }
+
+ public boolean visit(IResource resource) {
+ if(resource instanceof IFile) {
+ IFile f = (IFile)resource;
+ for (int i = 0; i < outs.length; i++) {
+ if(outs[i].isPrefixOf(resource.getFullPath())) {
+ return false;
+ }
+ }
+ for (int i = 0; i < FILE_SCANNERS.length; i++) {
+ IFileScanner scanner = FILE_SCANNERS[i];
+ if(scanner.isRelevant(f)) {
+ long t = System.currentTimeMillis();
+ if(!scanner.isLikelyComponentSource(f)) {
+ p.pathRemoved(f.getFullPath());
+ return false;
+ }
+ LoadedDeclarations c = null;
+ try {
+ c = scanner.parse(f, p);
+ } catch (ScannerException e) {
+ WebKbPlugin.getDefault().logError(e);
+ }
+ if(c != null) componentsLoaded(c, f);
+ long dt = System.currentTimeMillis() - t;
+// timeUsed += dt;
+// System.out.println("Time=" + timeUsed);
+ }
+ }
+ }
+ if(resource instanceof IFolder) {
+ IPath path = resource.getFullPath();
+ for (int i = 0; i < outs.length; i++) {
+ if(outs[i].isPrefixOf(path)) {
+ return false;
+ }
+ }
+ for (int i = 0; i < srcs.length; i++) {
+ if(srcs[i].isPrefixOf(path) || path.isPrefixOf(srcs[i])) {
+ return true;
+ }
+ }
+ if(webinf != null) {
+ if(webinf.isPrefixOf(path) || path.isPrefixOf(webinf)) {
+ return true;
+ }
+ }
+ if(resource == resource.getProject()) {
+ return true;
+ }
+ return false;
+ }
+ //return true to continue visiting children.
+ return true;
+ }
+
+ void componentsLoaded(LoadedDeclarations c, IFile resource) {
+ if(c == null || c.getLibraries().size() == 0) return;
+ p.registerComponents(c, resource.getFullPath());
+ }
+
+ void getJavaSourceRoots(IProject project) {
+ IJavaProject javaProject = EclipseResourceUtil.getJavaProject(project);
+ if(javaProject == null) return;
+ List<IPath> ps = new ArrayList<IPath>();
+ List<IPath> os = new ArrayList<IPath>();
+ try {
+ IPath output = javaProject.getOutputLocation();
+ if(output != null) os.add(output);
+ IClasspathEntry[] es = javaProject.getResolvedClasspath(true);
+ for (int i = 0; i < es.length; i++) {
+ if(es[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+ IResource findMember =
ModelPlugin.getWorkspace().getRoot().findMember(es[i].getPath());
+ if(findMember != null && findMember.exists()) {
+ ps.add(findMember.getFullPath());
+ }
+ IPath out = es[i].getOutputLocation();
+ if(out != null && !os.contains(out)) {
+ os.add(out);
+ }
+ }
+ }
+ srcs = ps.toArray(new IPath[0]);
+ outs = os.toArray(new IPath[0]);
+ } catch(CoreException ce) {
+ ModelPlugin.getPluginLog().logError("Error while locating java source roots for
" + project, ce);
+ }
+ }
+
+}
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbResourceVisitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java 2009-05-15
14:41:11 UTC (rev 15294)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java 2009-05-15
15:05:25 UTC (rev 15295)
@@ -261,7 +261,7 @@
if(es[i].getEntryKind() == IClasspathEntry.CPE_PROJECT) {
IProject p =
ResourcesPlugin.getWorkspace().getRoot().getProject(es[i].getPath().lastSegment());
if(p == null || !p.isAccessible()) continue;
- IKbProject sp = KbProjectFactory.getSeamProject(p, false);
+ IKbProject sp = KbProjectFactory.getKbProject(p, false);
if(sp != null) list.add((KbProject)sp);
}
}