Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkchong2007-09-17 16:00:20 +0000
committerkchong2007-09-17 16:00:20 +0000
commitb54127ad69b51124a901a55c5eee4456f6cc09ad (patch)
tree2089b11c1ba3c26a460cfb611416e4fd1f88ec33 /bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java
parentda68db290314aafd6b550f8b748e1336f00f0570 (diff)
downloadwebtools.sourceediting-b54127ad69b51124a901a55c5eee4456f6cc09ad.tar.gz
webtools.sourceediting-b54127ad69b51124a901a55c5eee4456f6cc09ad.tar.xz
webtools.sourceediting-b54127ad69b51124a901a55c5eee4456f6cc09ad.zip
[81751] XSDEditor: No F3 support in Graphical view (only in source view)
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java')
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java
index 478d3e7b56..81b357ae1c 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2006 IBM Corporation and others.
+ * Copyright (c) 2001, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,12 +17,17 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler;
+import org.eclipse.jface.action.IAction;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.xsd.ui.internal.adt.design.editpolicies.KeyBoardAccessibilityEditPolicy;
+import org.eclipse.wst.xsd.ui.internal.common.actions.OpenInNewEditor;
/**
* This key handler is designed to be re-used by both the WSDL and XSD editor
@@ -97,7 +102,20 @@ public class BaseGraphicalViewerKeyHandler extends GraphicalViewerKeyHandler
{
if (scrollPage(event, PositionConstants.NORTH))
return true;
- }
+ }
+ case SWT.F3 :
+ {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IEditorPart editorPart = workbenchWindow.getActivePage().getActiveEditor();
+ ActionRegistry registry = (ActionRegistry) editorPart.getAdapter(ActionRegistry.class);
+ if (registry != null)
+ {
+ IAction action = registry.getAction(OpenInNewEditor.ID);
+ if (action != null)
+ action.run();
+ }
+ }
/*
case SWT.F5 :
{

Back to the top