Author: scabanovich
Date: 2007-07-25 04:32:20 -0400 (Wed, 25 Jul 2007)
New Revision: 2646
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
Log:
JBIDE-605 Null pointer fixed.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-07-25
07:41:49 UTC (rev 2645)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-07-25
08:32:20 UTC (rev 2646)
@@ -72,6 +72,11 @@
if(e instanceof IFile) {
IFile f = (IFile)e;
XModelObject o = EclipseResourceUtil.getObjectByResource(f);
+ if(o == null) {
+ EclipseResourceUtil.createObjectForResource(f.getProject());
+ o = EclipseResourceUtil.createObjectForResource(f);
+ }
+ if(o == null) return;
add(o, menu, false);
} else if((e instanceof XModelObject)) {
XModelObject o = (XModelObject)e;
Show replies by date