KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > commands > IElementReference


1 /*******************************************************************************
2  * Copyright (c) 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.commands;
13
14 import java.util.Map JavaDoc;
15
16 import org.eclipse.ui.menus.UIElement;
17
18 /**
19  * the ICommandService will return a reference for all callbacks that are
20  * registered. This reference can be used to unregister the specific callback.
21  * <p>
22  * Similar in functionality to an IHandlerActivation. This interface should
23  * not be implemented or extended by clients.
24  * </p>
25  *
26  * @since 3.3
27  */

28 public interface IElementReference {
29     /**
30      * The command id that this callback was registered against.
31      *
32      * @return The command id. Will not be <code>null</code>.
33      */

34     public String JavaDoc getCommandId();
35
36     /**
37      * The callback that was registered.
38      *
39      * @return Adapts to provide appropriate user feedback. Will not be
40      * <code>null</code>.
41      */

42     public UIElement getElement();
43
44     /**
45      * Parameters that help scope this callback registration. For example, it
46      * can include parameters from the ParameterizedCommand. Callers should not
47      * change the map that is returned.
48      *
49      * @return scoping parameters. Will not be <code>null</code>.
50      */

51     public Map JavaDoc getParameters();
52 }
53
Popular Tags