Author: scabanovich
Date: 2007-10-19 10:38:44 -0400 (Fri, 19 Oct 2007)
New Revision: 4385
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XProjectContentProvider.java
Log:
JBIDE-1123
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XProjectContentProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XProjectContentProvider.java 2007-10-19
14:37:45 UTC (rev 4384)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XProjectContentProvider.java 2007-10-19
14:38:44 UTC (rev 4385)
@@ -15,6 +15,7 @@
import org.eclipse.jdt.core.IJavaProject;
import org.jboss.tools.common.model.XFilteredTree;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
public class XProjectContentProvider extends XContentProvider {
@@ -32,7 +33,10 @@
parentElement = ((IJavaProject)parentElement).getProject();
}
IProject f = (IProject)parentElement;
+ IModelNature n = EclipseResourceUtil.getModelNature(f);
+ if(n == null) return null;
XModelObject o = EclipseResourceUtil.getObjectByResource(f);
+ if(o == null) o = EclipseResourceUtil.createObjectForResource(f);
XFilteredTree filteredTree = getFilteredTree(o);
if(filteredTree == null) {
filteredTree = getFilteredTree(o);
Show replies by date