Author: scabanovich
Date: 2008-08-08 05:48:57 -0400 (Fri, 08 Aug 2008)
New Revision: 9616
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java
Log:
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java 2008-08-08
02:02:16 UTC (rev 9615)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java 2008-08-08
09:48:57 UTC (rev 9616)
@@ -147,6 +147,11 @@
}
if(value.indexOf("/", 1) < 0) return null;
IResource r = ModelPlugin.getWorkspace().getRoot().getFolder(new Path(value));
+ if(r == null || !r.exists()) {
+ //we can have both folders and files in tree
+ //so if resource is not a folder, it still can be a file
+ r = ModelPlugin.getWorkspace().getRoot().getFile(new Path(value));
+ }
if(r == null || !r.exists()) return null;
return EclipseResourceUtil.getObjectByResource(r);
}
Show replies by date