Author: svasilyev
Date: 2007-09-13 04:43:17 -0400 (Thu, 13 Sep 2007)
New Revision: 3601
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
null pointer check
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-09-13
07:45:41 UTC (rev 3600)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-09-13
08:43:17 UTC (rev 3601)
@@ -1703,17 +1703,18 @@
IProject project = iFile.getProject();
IModelNature nature = EclipseResourceUtil.getModelNature(project);
- XModel model = nature.getModel();
- XModelObject webXML = WebAppHelper.getWebApp(model);
- XModelObject param = WebAppHelper.findWebAppContextParam(webXML,
"javax.faces.DEFAULT_SUFFIX");
- if ( param != null ) {
- String value = param.getAttributeValue("param-value");
-
- if ( value.length() != 0 && iFile.getName().endsWith(value)) {
- isFacelet = true;
+ if (nature != null) {
+ XModel model = nature.getModel();
+ XModelObject webXML = WebAppHelper.getWebApp(model);
+ XModelObject param = WebAppHelper.findWebAppContextParam(webXML,
"javax.faces.DEFAULT_SUFFIX");
+ if ( param != null ) {
+ String value = param.getAttributeValue("param-value");
+
+ if ( value.length() != 0 && iFile.getName().endsWith(value)) {
+ isFacelet = true;
+ }
}
}
-
}
return isFacelet;
Show replies by date