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: * An IHandler for a command that expects to provide feedback through the
18: * registered element mechanism must implement this interface.
19: *
20: * @since 3.3
21: *
22: */
23: public interface IElementUpdater {
24: /**
25: * Whenever the elements for a command are refreshed, this method is called
26: * on the active handler for that command.
27: * <p>
28: * <b>Note:</b> Handlers must never cache the element, which can disappear
29: * or be replaced at any time. Everybody should go through the
30: * ICommandService refreshElements(*) method.
31: * </p>
32: *
33: * @param element
34: * An element for a specific UI element. Will not be
35: * <code>null</code>.
36: * @param parameters
37: * Any parameters registered with the callback. Will not be
38: * <code>null</code>, but it may be empty.
39: */
40: public void updateElement(UIElement element, Map parameters);
41: }
|