## com.ibm.lab.soln.resources.nature_builder
Class NewProjectWizard

    java.lang.Object
      |
      +--org.eclipse.jface.wizard.Wizard
            |
            +--com.ibm.lab.soln.resources.nature_builder.NewProjectWizard

All Implemented Interfaces:
  org.eclipse.ui.INewWizard, org.eclipse.jface.wizard.IWizard, org.eclipse.ui.IWorkbenchWizard

public class NewProjectWizard
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.ui.INewWizard

Wizard to create a new project with the nature `CustomNature`. Processing in this wizard is modeled after the platform new project wizard.

See Also:
  `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

### NewProjectWizard

    public NewProjectWizard()

Method Detail

### addCustomNature

    public void addCustomNature(org.eclipse.core.resources.IProject project)
                         throws org.eclipse.core.runtime.CoreException

  Add the nature to the project.

### addPages

    public void addPages()

  Add the one page to the wizard, the reused page `WizardNewProjectCreationPage`. This page provides basic project name validation and allows for
  Specified by:
    `addPages` in interface `org.eclipse.jface.wizard.IWizard`
  Overrides:
    `addPages` in class `org.eclipse.jface.wizard.Wizard`
  See Also:
    `Wizard.addPages()`

### createNewProject

    public org.eclipse.core.resources.IProject createNewProject()

  Creates a new project resource with the name selected in the wizard page. Project creation is wrapped in a `WorkspaceModifyOperation`.

  Returns:
    the created project resource, or `null` if the project was not created
  See Also:
    `org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard#createNewProject()`, `WorkspaceModifyOperation`

### createProject

    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

  Creates a project resource given the project handle and description.
  Parameters:
    `description` - the project description to create a project resource for
    `projectHandle` - the project handle to create a project resource for
    `monitor` - the progress monitor to show visual progress with
  Throws:
    `org.eclipse.core.runtime.CoreException` - if the operation fails
    `org.eclipse.core.runtime.OperationCanceledException` - if the operation is canceled

### getNewProject

    public org.eclipse.core.resources.IProject getNewProject()

  Returns the newly created project.
  Returns:
    the created project, or `null` if project not created

### init

    public void init(org.eclipse.ui.IWorkbench workbench,
                     org.eclipse.jface.viewers.IStructuredSelection selection)

  Initializes this creation wizard using the passed workbench and object selection.

  This method is called after the no argument constructor and before other methods are called.

  Specified by:
    `init` in interface `org.eclipse.ui.IWorkbenchWizard`
  Parameters:
    `workbench` - the current workbench
    `selection` - the current object selection
  See Also:
    `IWorkbenchWizard.init(IWorkbench, IStructuredSelection)`

### performFinish

    public boolean performFinish()

  Creates a project with a `CustomNature` association.
  Specified by:
    `performFinish` in interface `org.eclipse.jface.wizard.IWizard`
  Overrides:
    `performFinish` in class `org.eclipse.jface.wizard.Wizard`
  Returns:
    `true` to indicate the finish request was accepted, and `false` to indicate that the finish request was refused
  See Also:
    `IWizard.performFinish()`

### resultError

    protected void resultError(java.lang.String title,
                               java.lang.String msg)

  Used to show action results.
  See Also:
    `MessageDialog`

### resultInformation

    protected void resultInformation(java.lang.String title,
                                     java.lang.String msg)

  Used to show action results.
  See Also:
    `MessageDialog`