[216822] Using Catalog resolver always
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java
index 83d8cbe..0109525 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/EclipseResourceAdapter.java
@@ -51,15 +51,17 @@
IProject container = null;
ComponentResource moduleResource = (ComponentResource) getTarget();
- IPath sourcePath = moduleResource.getSourcePath();
- if (moduleResource.getOwningProject() != null)
- container = moduleResource.getOwningProject();
- else
- container = StructureEdit.getContainingProject(moduleResource.getComponent());
- if (container != null)
- resource = container.findMember(sourcePath);
- if(resource == null)
- resource = ResourcesPlugin.getWorkspace().getRoot().findMember(sourcePath);
+ if (moduleResource != null) {
+ IPath sourcePath = moduleResource.getSourcePath();
+ if (moduleResource.getOwningProject() != null)
+ container = moduleResource.getOwningProject();
+ else
+ container = StructureEdit.getContainingProject(moduleResource.getComponent());
+ if (container != null)
+ resource = container.findMember(sourcePath);
+ if(resource == null)
+ resource = ResourcesPlugin.getWorkspace().getRoot().findMember(sourcePath);
+ }
}
}
return resource;