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.jface.wizard.IWizardPage;
13: import org.eclipse.ui.IWorkingSet;
14:
15: /**
16: * A working set page allows the user to edit an existing
17: * working set and create a new working set.
18: * <p>
19: * Clients should implement this interface and include the
20: * name of their class in an extension contributed to the
21: * workbench's working set extension point
22: * (named <code>"org.eclipse.ui.workingSets"</code>) if they
23: * want to provide a special wizard page for a particular
24: * working set element type.
25: * </p>
26: * <p>
27: * Clients implementing this interface may subclass from
28: * org.eclipse.jface.wizard.WizardPage.
29: * </p>
30: *
31: * @since 2.0
32: */
33: public interface IWorkingSetPage extends IWizardPage {
34: /**
35: * Called when the working set wizard is closed by selecting
36: * the finish button.
37: * Implementers may store the page result (new/changed working
38: * set returned in getSelection) here.
39: */
40: public void finish();
41:
42: /**
43: * Returns the working set edited or created on the page
44: * after the wizard has closed.
45: * Returns the working set that was initially set using
46: * <code>setSelection</code>if the wizard has not been
47: * closed yet.
48: * Implementors should return the object set in setSelection
49: * instead of making a copy and returning the changed copy.
50: *
51: * @return the working set edited or created on the page.
52: */
53: public IWorkingSet getSelection();
54:
55: /**
56: * Sets the working set edited on the page.
57: * Implementors should not make a copy of this working set.
58: * The passed object can be edited as is and should be
59: * returned in getSelection().
60: *
61: * @param workingSet the working set edited on the page.
62: */
63: public void setSelection(IWorkingSet workingSet);
64: }
|