01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.handlers;
11:
12: import org.eclipse.core.commands.ExecutionEvent;
13: import org.eclipse.ui.IWorkbench;
14: import org.eclipse.ui.PlatformUI;
15: import org.eclipse.ui.keys.IBindingService;
16:
17: /**
18: * A handler that displays the key assist dialog when executed.
19: *
20: * @since 3.1
21: */
22: public class ShowKeyAssistHandler extends
23: WorkbenchWindowHandlerDelegate {
24:
25: /**
26: * Opens the key assistant. This should never be called until initialization
27: * occurs.
28: *
29: * @param event
30: * Ignored
31: * @return <code>null</code>
32: */
33: public Object execute(final ExecutionEvent event) {
34: final IWorkbench workbench = PlatformUI.getWorkbench();
35: final IBindingService bindingService = (IBindingService) workbench
36: .getService(IBindingService.class);
37: bindingService.openKeyAssistDialog();
38: return null;
39: }
40: }
|