01: /*******************************************************************************
02: * Copyright (c) 2006, 2007 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: /**
13: * <p>
14: * A service which holds mappings between retarget action identifiers and
15: * command identifiers (aka: action definition ids).
16: * </p>
17: * <p>
18: * This class is not intended for use outside of the
19: * <code>org.eclipse.ui.workbench</code> plug-in.
20: * </p>
21: *
22: * @since 3.2
23: */
24: public interface IActionCommandMappingService {
25:
26: /**
27: * Returns the command identifier corresponding to the given action
28: * identifier, if any.
29: *
30: * @param actionId
31: * The identifier of the retarget action for which the command
32: * identifier should be retrieved; must not be <code>null</code>.
33: * @return The identifier of the corresponding command; <code>null</code>
34: * if none.
35: */
36: public String getCommandId(String actionId);
37:
38: /**
39: * Maps an action identifier to a command identifier. This is used for
40: * retarget action, so that global action handlers can be registered with
41: * the correct command.
42: *
43: * @param actionId
44: * The identifier of the retarget action; must not be
45: * <code>null</code>.
46: * @param commandId
47: * The identifier of the command; must not be <code>null</code>
48: */
49: public void map(String actionId, String commandId);
50:
51: public String getGeneratedCommandId(String targetId, String actionId);
52: }
|