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.dialogs; 12 13 import org.eclipse.ui.IWorkingSet; 14 15 /** 16 * A working set selection dialog displays the list of working 17 * sets available in the workbench. 18 * <p> 19 * Use org.eclipse.ui.IWorkingSetManager#createWorkingSetSelectionDialog(Shell) 20 * to create an instance of this dialog. 21 * </p> 22 * <p> 23 * This interface is not intended to be implemented by clients. 24 * </p> 25 * @see org.eclipse.ui.IWorkingSetManager 26 * @since 2.0 27 */ 28 public interface IWorkingSetSelectionDialog { 29 /** 30 * Returns the working sets selected in the dialog or 31 * <code>null</code> if the dialog was canceled. 32 * 33 * @return the working sets selected in the dialog. 34 */ 35 public IWorkingSet[] getSelection(); 36 37 /** 38 * Displays the working set selection dialog. 39 * 40 * @return Window.OK if the dialog closes with the working 41 * set selection confirmed. 42 * Window.CANCEL if the dialog closes with the working set 43 * selection dismissed. 44 * @see org.eclipse.jface.window.Window 45 */ 46 public int open(); 47 48 /** 49 * Sets the working sets that are initially selected in the dialog. 50 * 51 * @param workingSets the working sets to select in the dialog. 52 */ 53 public void setSelection(IWorkingSet[] workingSets); 54 } 55