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