01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 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.jdt.ui.wizards;
11:
12: import org.eclipse.jface.wizard.IWizardPage;
13:
14: import org.eclipse.jdt.core.IClasspathEntry;
15:
16: /**
17: * A classpath container page allows the user to create a new or edit an
18: * existing classpath container entry.
19: * <p>
20: * Clients should implement this interface and include the name of their
21: * class in an extension contributed to the jdt.ui's classpath container page
22: * extension point (named <code>org.eclipse.jdt.ui.classpathContainerPage
23: * </code>).
24: * </p>
25: * <p>
26: * Clients implementing this interface may subclass from
27: * <code>org.eclipse.jface.wizard.WizardPage</code>.
28: * </p>
29: * Clients implementing this interface may also implement
30: * <code>IClasspathContainerPageExtension</code> to get additional context
31: * before this page is opened.
32: *
33: * @since 2.0
34: */
35: public interface IClasspathContainerPage extends IWizardPage {
36:
37: /**
38: * Called when the classpath container wizard is closed by selecting
39: * the finish button. Implementers typically override this method to
40: * store the page result (new/changed classpath entry returned in
41: * getSelection) into its model.
42: *
43: * @return if the operation was successful. Only when returned
44: * <code>true</code>, the wizard will close.
45: */
46: public boolean finish();
47:
48: /**
49: * Returns the edited or created classpath container entry. This method
50: * may return <code>null</code> if no classpath container entry exists.
51: * The returned classpath entry is of kind <code>IClasspathEntry.CPE_CONTAINER
52: * </code>.
53: *
54: * @return the classpath entry edited or created on the page.
55: */
56: public IClasspathEntry getSelection();
57:
58: /**
59: * Sets the classpath container entry to be edited or <code>null</code>
60: * if a new entry should be created.
61: *
62: * @param containerEntry the classpath entry to edit or <code>null</code>.
63: * If not <code>null</code> then the classpath entry must be of
64: * kind <code>IClasspathEntry.CPE_CONTAINER</code>
65: */
66: public void setSelection(IClasspathEntry containerEntry);
67:
68: }
|