01: /*******************************************************************************
02: * Copyright (c) 2000, 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;
11:
12: import org.eclipse.jface.action.IAction;
13:
14: /**
15: * The key binding service allows one to query or set the scope of Eclipse for
16: * the purposes of resolving key assignments to commands, and to register
17: * actions to handle specific commands. See the <code>org.eclipse.ui.commands</code>
18: * extension point for details.
19: * <p>
20: * A participating workbench part is responsible to register all its actions
21: * with this service. The part is also responsible to set the current scope.
22: * </p>
23: * <p>
24: * This interface is not intended to be implemented or extended by clients.
25: * </p>
26: *
27: * @since 2.0
28: * @deprecated See IContextService to manage <b>scopes</b> and
29: * IHandlerService to manage handlers. IAction can
30: * be proxied by org.eclipse.jface.commands.ActionHandler.
31: */
32: public interface IKeyBindingService {
33:
34: /**
35: * Returns the active accelerator scope ids.
36: *
37: * @return the active accelerator scope ids.
38: */
39: String[] getScopes();
40:
41: /**
42: * Registers an action with the key binding service.
43: *
44: * @param action
45: * the action to be registered with the key binding service.
46: */
47: void registerAction(IAction action);
48:
49: /**
50: * Sets the active accelerator scope ids.
51: *
52: * @param scopes
53: * the active accelerator scope ids.
54: */
55: void setScopes(String[] scopes);
56:
57: /**
58: * Unregisters an action with the key binding service.
59: *
60: * @param action
61: * the action to be unregistered with the key binding service.
62: */
63: void unregisterAction(IAction action);
64: }
|