Author: scabanovich
Date: 2009-10-12 07:12:07 -0400 (Mon, 12 Oct 2009)
New Revision: 18038
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4970
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-10-11
23:31:23 UTC (rev 18037)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2009-10-12
11:12:07 UTC (rev 18038)
@@ -23,6 +23,7 @@
import org.eclipse.core.resources.ICommand;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
@@ -385,8 +386,17 @@
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;
+ boolean ok = false;
+ IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
+ if(folder != null && folder.exists() &&
folder.isSynchronized(IResource.DEPTH_INFINITE)) {
+ ok = true;
+ } else {
+ IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if(f != null && f.exists() &&
f.isSynchronized(IResource.DEPTH_ZERO)) {
+ ok = true;
+ }
+ }
+ if(!ok) continue;
}
context.put(XMLStoreConstants.ATTR_PATH, path);