KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > wizards > IWizardDescriptor


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 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.wizards;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IAdaptable;
15 import org.eclipse.jface.resource.ImageDescriptor;
16 import org.eclipse.jface.viewers.IStructuredSelection;
17 import org.eclipse.ui.IWorkbenchPartDescriptor;
18 import org.eclipse.ui.IWorkbenchWizard;
19
20 /**
21  * Base interface for all wizards defined via workbench extension points.
22  * <p>
23  * This interface is not intended to be implemented by clients.
24  * </p>
25  *
26  * @since 3.1
27  */

28 public interface IWizardDescriptor extends IWorkbenchPartDescriptor, IAdaptable {
29
30     /**
31      * Answer the selection for the reciever based on whether the it can handle
32      * the selection. If it can return the selection. If it can handle the
33      * adapted to IResource value of the selection. If it satisfies neither of
34      * these conditions return an empty IStructuredSelection.
35      *
36      * @return IStructuredSelection
37      * @param selection
38      * IStructuredSelection
39      */

40     IStructuredSelection adaptedSelection(IStructuredSelection selection);
41
42     /**
43      * Return the description.
44      *
45      * @return the description
46      */

47     String JavaDoc getDescription();
48     
49     /**
50      * Return the tags associated with this wizard.
51      *
52      * @return the tags associated with this wizard
53      */

54     String JavaDoc [] getTags();
55     
56     /**
57      * Create a wizard.
58      *
59      * @return the wizard
60      * @throws CoreException thrown if there is a problem creating the wizard
61      */

62     IWorkbenchWizard createWizard() throws CoreException;
63     
64     /**
65      * Return the description image for this wizard.
66      *
67      * @return the description image for this wizard or <code>null</code>
68      */

69     public ImageDescriptor getDescriptionImage();
70
71     /**
72      * Return the help system href for this wizard.
73      *
74      * @return the help system href for this wizard or <code>null</code>
75      */

76     String JavaDoc getHelpHref();
77
78     /**
79      * Return the category for this wizard.
80      *
81      * @return the category or <code>null</code>
82      */

83     IWizardCategory getCategory();
84     
85     /**
86      * Answer <code>true</code> if this wizard is able to finish without
87      * loading any pages. This is a hint to any
88      * {@link org.eclipse.jface.wizard.WizardSelectionPage} or container that
89      * may contain this wizard to allow the finish button to be pressed without
90      * actually entering the wizard. If this occurs the
91      * {@link org.eclipse.jface.wizard.IWizard#performFinish()} method should be
92      * invoked by the containing wizard without creating any pages.
93      *
94      * @return <code>true</code> if this wizard can finish immediately
95      */

96     boolean canFinishEarly();
97
98     /**
99      * Answer <code>true</code> if this wizard has any pages. This is a
100      * hint to any {@link org.eclipse.jface.wizard.WizardSelectionPage} or
101      * container that may contain this wizard that they should enable the "Next"
102      * button, if appropriate.
103      *
104      * @return <code>true</code> if this wizard has wizard pages
105      */

106     boolean hasPages();
107 }
108
Popular Tags