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