KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > handlers > IActionCommandMappingService


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 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.internal.handlers;
13
14 /**
15  * <p>
16  * A service which holds mappings between retarget action identifiers and
17  * command identifiers (aka: action definition ids).
18  * </p>
19  * <p>
20  * This class is not intended for use outside of the
21  * <code>org.eclipse.ui.workbench</code> plug-in.
22  * </p>
23  *
24  * @since 3.2
25  */

26 public interface IActionCommandMappingService {
27
28     /**
29      * Returns the command identifier corresponding to the given action
30      * identifier, if any.
31      *
32      * @param actionId
33      * The identifier of the retarget action for which the command
34      * identifier should be retrieved; must not be <code>null</code>.
35      * @return The identifier of the corresponding command; <code>null</code>
36      * if none.
37      */

38     public String JavaDoc getCommandId(String JavaDoc actionId);
39
40     /**
41      * Maps an action identifier to a command identifier. This is used for
42      * retarget action, so that global action handlers can be registered with
43      * the correct command.
44      *
45      * @param actionId
46      * The identifier of the retarget action; must not be
47      * <code>null</code>.
48      * @param commandId
49      * The identifier of the command; must not be <code>null</code>
50      */

51     public void map(String JavaDoc actionId, String JavaDoc commandId);
52     
53     public String JavaDoc getGeneratedCommandId(String JavaDoc targetId, String JavaDoc actionId);
54 }
55
56
Popular Tags