Author: vrubezhny
Date: 2010-11-10 10:49:09 -0500 (Wed, 10 Nov 2010)
New Revision: 26418
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
Log:
JBIDE-7289
Visual Page Editor cannot be opened on deleted resource by pressing Alt-Left or "Back
to ..." button on toolbar
Issue is fixed
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2010-11-10
15:38:07 UTC (rev 26417)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2010-11-10
15:49:09 UTC (rev 26418)
@@ -459,7 +459,11 @@
break;
}
}
- new ResourceChangeListener(this, getContainer());
+
+ IFile f = getFile();
+ if (f != null && f.exists()) {
+ new ResourceChangeListener(this, getContainer());
+ }
if (getModelObject() != null) {
getModelObject().getModel().addModelTreeListener(syncListener);
}
@@ -904,10 +908,8 @@
return;
IPath path = getPathChange(event, f);
if (path == null) {
-// if (f != null && !f.exists())
-// closeEditor(); // Fix for JBIDE-7289: we don't close the editor here
- // due to let eclipse to show error dialog and
- // default view for the corrupted editor
+ if (f != null && !f.exists())
+ closeEditor();
return;
}
f = ModelPlugin.getWorkspace().getRoot().getFile(path);
Show replies by date