01: /*******************************************************************************
02: * Copyright (c) 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.commands;
11:
12: import java.util.Map;
13:
14: import org.eclipse.ui.menus.UIElement;
15:
16: /**
17: * the ICommandService will return a reference for all callbacks that are
18: * registered. This reference can be used to unregister the specific callback.
19: * <p>
20: * Similar in functionality to an IHandlerActivation. This interface should
21: * not be implemented or extended by clients.
22: * </p>
23: *
24: * @since 3.3
25: */
26: public interface IElementReference {
27: /**
28: * The command id that this callback was registered against.
29: *
30: * @return The command id. Will not be <code>null</code>.
31: */
32: public String getCommandId();
33:
34: /**
35: * The callback that was registered.
36: *
37: * @return Adapts to provide appropriate user feedback. Will not be
38: * <code>null</code>.
39: */
40: public UIElement getElement();
41:
42: /**
43: * Parameters that help scope this callback registration. For example, it
44: * can include parameters from the ParameterizedCommand. Callers should not
45: * change the map that is returned.
46: *
47: * @return scoping parameters. Will not be <code>null</code>.
48: */
49: public Map getParameters();
50: }
|