1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 12 package org.eclipse.ui; 13 14 import org.eclipse.jface.action.IAction; 15 16 /** 17 * The key binding service allows one to query or set the scope of Eclipse for 18 * the purposes of resolving key assignments to commands, and to register 19 * actions to handle specific commands. See the <code>org.eclipse.ui.commands</code> 20 * extension point for details. 21 * <p> 22 * A participating workbench part is responsible to register all its actions 23 * with this service. The part is also responsible to set the current scope. 24 * </p> 25 * <p> 26 * This interface is not intended to be implemented or extended by clients. 27 * </p> 28 * 29 * @since 2.0 30 * @deprecated See IContextService to manage <b>scopes</b> and 31 * IHandlerService to manage handlers. IAction can 32 * be proxied by org.eclipse.jface.commands.ActionHandler. 33 */ 34 public interface IKeyBindingService { 35 36 /** 37 * Returns the active accelerator scope ids. 38 * 39 * @return the active accelerator scope ids. 40 */ 41 String[] getScopes(); 42 43 /** 44 * Registers an action with the key binding service. 45 * 46 * @param action 47 * the action to be registered with the key binding service. 48 */ 49 void registerAction(IAction action); 50 51 /** 52 * Sets the active accelerator scope ids. 53 * 54 * @param scopes 55 * the active accelerator scope ids. 56 */ 57 void setScopes(String[] scopes); 58 59 /** 60 * Unregisters an action with the key binding service. 61 * 62 * @param action 63 * the action to be unregistered with the key binding service. 64 */ 65 void unregisterAction(IAction action); 66 } 67