01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 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.registry;
11:
12: import org.eclipse.ui.IActionBars;
13: import org.eclipse.ui.IWorkbenchWindow;
14:
15: /**
16: * An action set is responsible for the creation of actions.
17: * The end user may add these actions to a workbench page menu and tool bar
18: * if they are deemed useful to the particular task at hand.
19: * <p>
20: * [Issue: This interface is not exposed in API, but time may
21: * demonstrate that it should be. For the short term leave it be.
22: * In the long term its use should be re-evaluated. ]
23: * </p>
24: * <p>
25: * In the current workbench implementation the desktop provides the
26: * only implementation of this class in PluginActionSet. So, it may
27: * be useful to phase this interface out at some point. PluginActionSet
28: * provides a lazy load strategy, where the actions are declared in
29: * XML and represented at runtime by a PluginAction.
30: * </p>
31: */
32: public interface IActionSet {
33: /**
34: * Disposes of this action set.
35: * <p>
36: * Implementation should remove any references to the window and action bars
37: * created in the <code>init</code>.
38: * </p>
39: * <p>
40: * [Issue: Should this say: "...should remove anything they contributed
41: * in <code>init</code>? Or is most of the withdrawal done automatically?
42: * ]
43: * </p>
44: */
45: public void dispose();
46:
47: /**
48: * Initializes this action set, which is expected to add it actions as required
49: * to the given workbench window and action bars.
50: *
51: * @param window the workbench window
52: * @param bars the action bars
53: */
54: public void init(IWorkbenchWindow window, IActionBars bars);
55: }
|