Author: scabanovich
Date: 2010-10-28 07:39:41 -0400 (Thu, 28 Oct 2010)
New Revision: 26102
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/scanner/ClassPathMonitor.java
Log:
JBIDE-7319
https://jira.jboss.org/browse/JBIDE-7319
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 2010-10-28
11:28:02 UTC (rev 26101)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2010-10-28
11:39:41 UTC (rev 26102)
@@ -267,6 +267,10 @@
}
}
+ public boolean isStorageResolved() {
+ return isStorageResolved;
+ }
+
/**
*
*/
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 2010-10-28
11:28:02 UTC (rev 26101)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/ClassPathMonitor.java 2010-10-28
11:39:41 UTC (rev 26102)
@@ -25,6 +25,8 @@
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.jboss.tools.common.model.XJob;
+import org.jboss.tools.common.model.XJob.XRunnable;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.project.ext.AbstractClassPathMonitor;
@@ -181,4 +183,23 @@
}
return list;
}
+
+ public void pathsChanged(List<String> paths) {
+ super.pathsChanged(paths);
+ if(project.isStorageResolved()) {
+ XJob.addRunnableWithPriority(new XRunnable() {
+
+ public void run() {
+ if(update()) {
+ System.out.println("Running " + getId());
+ process();
+ }
+ }
+
+ public String getId() {
+ return "Update class path of kb project " +
project.getProject().getName(); //$NON-NLS-1$
+ }
+ });
+ }
+ }
}
\ No newline at end of file