Author: scabanovich
Date: 2009-01-13 09:55:24 -0500 (Tue, 13 Jan 2009)
New Revision: 13016
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
Log:
JBIDE-3546
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2009-01-13
14:38:07 UTC (rev 13015)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2009-01-13
14:55:24 UTC (rev 13016)
@@ -159,5 +159,10 @@
public static IFileScanner getLibraryScanner() {
return new LibraryScanner();
}
-
+
+ protected void clean(IProgressMonitor monitor) throws CoreException {
+ SeamProject sp = getSeamProject();
+ if(sp != null) sp.clean();
+ }
+
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-01-13
14:38:07 UTC (rev 13015)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-01-13
14:55:24 UTC (rev 13016)
@@ -406,6 +406,22 @@
}
}
+
+ 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]);
+ }
+ packages.clear();
+ createScopes();
+ fireChanges();
+ }
public long fullBuildTime;
public List<Long> statistics;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2009-01-13
14:38:07 UTC (rev 13015)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2009-01-13
14:55:24 UTC (rev 13016)
@@ -31,7 +31,6 @@
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.impl.FileSystemsLoader;
-import org.jboss.tools.common.model.filesystems.impl.JarSystemImpl;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelObjectUtil;
import org.jboss.tools.seam.core.ISeamProject;
@@ -49,7 +48,6 @@
public class ClassPath {
SeamProject project;
XModel model = null;
- ClassLoader classLoader = null;
List<String> paths = null;
Map<IPath, String> paths2 = new HashMap<IPath, String>();
@@ -148,8 +146,6 @@
}
}
- classLoader = null;
-
return true;
}
@@ -260,4 +256,10 @@
return paths2.get(path) != null;
}
+ public void clean() {
+ paths = null;
+ if(paths2 != null) paths2.clear();
+ processedPaths.clear();
+ }
+
}
Show replies by date