Author: snjeza
Date: 2008-05-08 19:26:31 -0400 (Thu, 08 May 2008)
New Revision: 8009
Modified:
branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
Log:
JBIDE-2198 Unhandled event loop exception when use shift-F6 and alt-shift-F6 as shortcuts
to toggle between the various states of the splitpane.
Modified:
branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
---
branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-05-08
20:51:59 UTC (rev 8008)
+++
branches/jbosstools-2.1.x/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2008-05-08
23:26:31 UTC (rev 8009)
@@ -844,6 +844,8 @@
public void partActivated(IWorkbenchPart part) {
fActivePart = part;
handleActivation();
+ if (part == multiPageEditor)
+ activateKeys();
}
public void partBroughtToTop(IWorkbenchPart part) {
@@ -854,22 +856,24 @@
public void partDeactivated(IWorkbenchPart part) {
fActivePart = null;
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (fContextActivation != null) {
- IContextService contextService = (IContextService) workbench
- .getAdapter(IContextService.class);
- contextService.deactivateContext(fContextActivation);
- }
+ if (part == multiPageEditor) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ if (fContextActivation != null) {
+ IContextService contextService = (IContextService) workbench
+ .getAdapter(IContextService.class);
+ contextService.deactivateContext(fContextActivation);
+ }
- IHandlerService handlerService = (IHandlerService) workbench
- .getService(IHandlerService.class);
- if (handlerService != null) {
- if (sourceActivation != null)
- handlerService.deactivateHandler(sourceActivation);
- if (visualActivation != null)
- handlerService.deactivateHandler(visualActivation);
- if (jumpingActivation != null)
- handlerService.deactivateHandler(jumpingActivation);
+ IHandlerService handlerService = (IHandlerService) workbench
+ .getService(IHandlerService.class);
+ if (handlerService != null) {
+ if (sourceActivation != null)
+ handlerService.deactivateHandler(sourceActivation);
+ if (visualActivation != null)
+ handlerService.deactivateHandler(visualActivation);
+ if (jumpingActivation != null)
+ handlerService.deactivateHandler(jumpingActivation);
+ }
}
}
@@ -898,29 +902,33 @@
}
sourceEditor.safelySanityCheckState(getEditorInput());
}
- IWorkbench workbench = PlatformUI.getWorkbench();
- IContextService contextService = (IContextService) workbench
- .getAdapter(IContextService.class);
- fContextActivation = contextService
- .activateContext(VPE_EDITOR_CONTEXT); //$NON-NLS-1$
- IHandlerService handlerService = (IHandlerService) workbench
- .getService(IHandlerService.class);
- if (handlerService != null) {
- sourceActivation = handlerService.activateHandler(
- VPE_SOURCE_MAXMIN,
- sourceMaxmin);
- visualActivation = handlerService.activateHandler(
- VPE_VISUAL_MAXMIN,
- visualMaxmin);
- jumpingActivation = handlerService.activateHandler(
- VPE_JUMPING,
- jumping);
- }
+
} finally {
fIsHandlingActivation = false;
}
}
}
+
+ private void activateKeys() {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IContextService contextService = (IContextService) workbench
+ .getAdapter(IContextService.class);
+ fContextActivation = contextService
+ .activateContext(VPE_EDITOR_CONTEXT); //$NON-NLS-1$
+ IHandlerService handlerService = (IHandlerService) workbench
+ .getService(IHandlerService.class);
+ if (handlerService != null) {
+ sourceActivation = handlerService.activateHandler(
+ VPE_SOURCE_MAXMIN,
+ sourceMaxmin);
+ visualActivation = handlerService.activateHandler(
+ VPE_VISUAL_MAXMIN,
+ visualMaxmin);
+ jumpingActivation = handlerService.activateHandler(
+ VPE_JUMPING,
+ jumping);
+ }
+ }
}
public VpeController getController() {
Show replies by date