public class BasicNewProjectResourceWizard
extends BasicNewResourceWizard
This class may be instantiated and used without further configuration; this class is not intended to be subclassed.
Example:
IWorkbenchWizard wizard = new BasicNewProjectResourceWizard(); wizard.init(workbench, selection); WizardDialog dialog = new WizardDialog(shell, wizard); dialog.open();During the call to
open
, the wizard dialog is presented to
the user. When the user hits Finish, a project resource with the
user-specified name is created, the dialog closes, and the call to
open
returns.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WIZARD_ID
The wizard id for creating new projects in the workspace.
|
Constructor and Description |
---|
BasicNewProjectResourceWizard()
Creates a wizard for creating a new project resource in the workspace.
|
Modifier and Type | Method and Description |
---|---|
void |
addPages() |
WizardNewProjectCreationPage |
getMainPage() |
IProject |
getNewProject()
Returns the newly created project.
|
void |
init(IWorkbench workbench,
IStructuredSelection currentSelection) |
protected void |
initializeDefaultPageImageDescriptor() |
boolean |
performFinish() |
void |
setInitializationData(IConfigurationElement cfig,
java.lang.String propertyName,
java.lang.Object data)
Stores the configuration element for the wizard.
|
protected void |
updatePerspective()
Updates the perspective for the active page within the window.
|
static void |
updatePerspective(IConfigurationElement configElement)
Updates the perspective based on the current settings in the
Workbench/Perspectives preference page.
|
public static final java.lang.String WIZARD_ID
public BasicNewProjectResourceWizard()
public WizardNewProjectCreationPage getMainPage()
public void addPages()
public IProject getNewProject()
null
if project not
createdpublic void init(IWorkbench workbench, IStructuredSelection currentSelection)
protected void initializeDefaultPageImageDescriptor()
public boolean performFinish()
public void setInitializationData(IConfigurationElement cfig, java.lang.String propertyName, java.lang.Object data)
performFinish
to set the result perspective.protected void updatePerspective()
public static void updatePerspective(IConfigurationElement configElement)
A new project wizard class will need to implement the
IExecutableExtension
interface so as to gain access to the
wizard's IConfigurationElement
. That is the configuration
element to pass into this method.
configElement
- -
the element we are updating withIPreferenceConstants#OPM_NEW_WINDOW
,
IPreferenceConstants#OPM_ACTIVE_PAGE
,
IWorkbenchPreferenceConstants#NO_NEW_PERSPECTIVE