java.lang.Object
|
+--org.eclipse.jface.wizard.Wizard
|
+--com.ibm.lab.soln.resources.nature_builder.NewProjectWizard
Wizard to create a new project with the nature CustomNature.
Processing in this wizard is modeled after the platform new project wizard.
org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard| Fields inherited from class org.eclipse.jface.wizard.Wizard |
DEFAULT_IMAGE |
| Constructor Summary | |
NewProjectWizard()
|
|
| Method Summary | |
void |
addCustomNature(org.eclipse.core.resources.IProject project)
Add the nature to the project. |
void |
addPages()
Add the one page to the wizard, the reused page WizardNewProjectCreationPage. |
org.eclipse.core.resources.IProject |
createNewProject()
Creates a new project resource with the name selected in the wizard page. |
void |
createProject(org.eclipse.core.resources.IProjectDescription description,
org.eclipse.core.resources.IProject projectHandle,
org.eclipse.core.runtime.IProgressMonitor monitor)
Creates a project resource given the project handle and description. |
org.eclipse.core.resources.IProject |
getNewProject()
Returns the newly created project. |
void |
init(org.eclipse.ui.IWorkbench workbench,
org.eclipse.jface.viewers.IStructuredSelection selection)
Initializes this creation wizard using the passed workbench and object selection. |
boolean |
performFinish()
Creates a project with a CustomNature association. |
protected void |
resultError(java.lang.String title,
java.lang.String msg)
Used to show action results. |
protected void |
resultInformation(java.lang.String title,
java.lang.String msg)
Used to show action results. |
| Methods inherited from class org.eclipse.jface.wizard.Wizard |
addPage, canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.wizard.IWizard |
canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer |
| Constructor Detail |
public NewProjectWizard()
| Method Detail |
public void addCustomNature(org.eclipse.core.resources.IProject project)
throws org.eclipse.core.runtime.CoreException
public void addPages()
WizardNewProjectCreationPage. This page provides
basic project name validation and allows foraddPages in interface org.eclipse.jface.wizard.IWizardaddPages in class org.eclipse.jface.wizard.WizardWizard.addPages()public org.eclipse.core.resources.IProject createNewProject()
WorkspaceModifyOperation.
null if the project
was not createdorg.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard#createNewProject(),
WorkspaceModifyOperation
public void createProject(org.eclipse.core.resources.IProjectDescription description,
org.eclipse.core.resources.IProject projectHandle,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException,
org.eclipse.core.runtime.OperationCanceledException
description - the project description to create a project resource forprojectHandle - the project handle to create a project resource formonitor - the progress monitor to show visual progress withorg.eclipse.core.runtime.CoreException - if the operation failsorg.eclipse.core.runtime.OperationCanceledException - if the operation is canceledpublic org.eclipse.core.resources.IProject getNewProject()
null
if project not created
public void init(org.eclipse.ui.IWorkbench workbench,
org.eclipse.jface.viewers.IStructuredSelection selection)
This method is called after the no argument constructor and before other methods are called.
init in interface org.eclipse.ui.IWorkbenchWizardworkbench - the current workbenchselection - the current object selectionIWorkbenchWizard.init(IWorkbench, IStructuredSelection)public boolean performFinish()
CustomNature association.performFinish in interface org.eclipse.jface.wizard.IWizardperformFinish in class org.eclipse.jface.wizard.Wizardtrue to indicate the finish request
was accepted, and false to indicate
that the finish request was refusedIWizard.performFinish()
protected void resultError(java.lang.String title,
java.lang.String msg)
MessageDialog
protected void resultInformation(java.lang.String title,
java.lang.String msg)
MessageDialog