Author: dmaliarevich
Date: 2008-06-10 06:24:22 -0400 (Tue, 10 Jun 2008)
New Revision: 8670
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2030, method for stopping switcher was put into
"finally" block, in case of exception switcher will be stopped in any case.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2008-06-10
10:21:16 UTC (rev 8669)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2008-06-10
10:24:22 UTC (rev 8670)
@@ -659,25 +659,33 @@
}
public void doOperation(int operation) {
- if (operation == UNDO || operation == REDO
- || operation == FORMAT_DOCUMENT
- || operation == FORMAT_ACTIVE_ELEMENTS) {
- if (editor.getVPEController() != null) {
- editor.getVPEController().preLongOperation();
+ if (operation == UNDO || operation == REDO
+ || operation == FORMAT_DOCUMENT
+ || operation == FORMAT_ACTIVE_ELEMENTS) {
+ if (editor.getVPEController() != null) {
+ editor.getVPEController().preLongOperation();
+ }
+ }
+ /*
+ * Fixes
http://jira.jboss.com/jira/browse/JBIDE-2030
+ * Stops ActiveEditorSwitcher in any case.
+ * Author: dmaliarevich
+ */
+ try {
+ super.doOperation(operation);
+ } catch (Exception e) {
+ JspEditorPlugin.getPluginLog().logError(e);
+ } finally {
+ if (operation == UNDO || operation == REDO
+ || operation == FORMAT_DOCUMENT
+ || operation == FORMAT_ACTIVE_ELEMENTS) {
+ if (editor.getVPEController() != null) {
+ editor.getVPEController().postLongOperation();
+ }
+ }
+ }
}
- }
- super.doOperation(operation);
-
- if (operation == UNDO || operation == REDO
- || operation == FORMAT_DOCUMENT
- || operation == FORMAT_ACTIVE_ELEMENTS) {
- if (editor.getVPEController() != null) {
- editor.getVPEController().postLongOperation();
- }
- }
- }
-
protected void handleDispose() {
if (editor != null && editor.getSourceViewer() != null
&& editor.getSourceViewer().getTextWidget() != null