Author: scabanovich
Date: 2008-10-21 09:24:58 -0400 (Tue, 21 Oct 2008)
New Revision: 11045
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
JBIDE-2894
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21
13:21:56 UTC (rev 11044)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-21
13:24:58 UTC (rev 11045)
@@ -287,15 +287,20 @@
}
sourceModel.addModelLifecycleListener(this);
- XModel xm = null;
- IProject project =
((IFileEditorInput)pageContext.getEditPart().getEditorInput()).getFile().getProject();
- IModelNature mn = EclipseResourceUtil.getModelNature(project);
- if(mn!=null) {
- xm = mn.getModel();
+ IEditorInput editorInput = pageContext.getEditPart().getEditorInput();
+ if(editorInput instanceof IFileEditorInput) {
+ XModel xm = null;
+ IProject project = ((IFileEditorInput) editorInput).getFile()
+ .getProject();
+ IModelNature mn = EclipseResourceUtil.getModelNature(project);
+ if (mn != null) {
+ xm = mn.getModel();
+ }
+ if (xm != null) {
+ WebProject.getInstance(xm).getTaglibMapping().revalidate(
+ WebAppHelper.getWebApp(xm));
+ }
}
- if(xm != null) {
- WebProject.getInstance(xm).getTaglibMapping().revalidate(WebAppHelper.getWebApp(xm));
- }
IDOMDocument sourceDocument = sourceModel.getDocument();
visualBuilder.refreshExternalLinks();
Show replies by date