TPTP 4.2.0 Platform Project
Internal API Specification

org.eclipse.hyades.ui.internal.wizard.exampleproject
Class CreationWizard

java.lang.Object
  extended byorg.eclipse.jface.wizard.Wizard
      extended byorg.eclipse.ui.wizards.newresource.BasicNewResourceWizard
          extended byorg.eclipse.hyades.ui.internal.wizard.exampleproject.CreationWizard
All Implemented Interfaces:
org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.INewWizard, org.eclipse.jface.wizard.IWizard, org.eclipse.ui.IWorkbenchWizard
Direct Known Subclasses:
ZipAdjusterCreationWizard

public class CreationWizard
extends org.eclipse.ui.wizards.newresource.BasicNewResourceWizard
implements org.eclipse.ui.INewWizard, org.eclipse.core.runtime.IExecutableExtension

This wizard is designed to simplify the creation of project samples in Eclipse. Most of the actions to be performed by this class can be defined in the plugin registry when this wizard is defined.

This is a sample of an extension point definition that uses this plugin %theDescriptionOfTheProjectToBeCreated

The ${nn} variables available are ${plugins} - Parent directory of the plugin that declares the extension point ${base.plugins} - Parent directory of the "org.eclipse.boot" plugin ${pluginId="xxx"} - Directory of the xxx plugin (there should be no spaces before and after the equal signal

Since:
0.0.1

Field Summary
 
Fields inherited from class org.eclipse.ui.wizards.newresource.BasicNewResourceWizard
selection
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
CreationWizard()
          Constructor for CreationWizard
 
Method Summary
 void addPages()
           
 void createPageControls(org.eclipse.swt.widgets.Composite pageContainer)
           
protected  CreationWizardPage createWizardPage(java.lang.String suggestedName, org.eclipse.core.runtime.IConfigurationElement configurationElement)
          Clients may overwrite this method to provide a customized implementation of the CreationWizardPage.
 void disableResourceOpening(boolean disableOpening)
          Sets whether or not the wizard should open designated resources after the wizard has finished all of the appropriate actions when the user clicks on the finish button.
protected  boolean finishWork()
          finishWork is a callback function that is called in the performWork method.
 IProjectAdjuster getAdjuster()
          Returns the adjuster.
protected  CreationWizardPage[] getCreationWizardPages()
          Returns the CreationWizardPage pages added to this wizard.
protected  java.lang.String getPluginId()
          Returns the id of the plugin that is declaring this wizard.
protected  java.lang.String[] getPluginIdsToResolve(java.lang.String text)
          Returns the pluginsId that should be resolved.
protected  void initializeDefaultPageImageDescriptor()
           
 boolean performFinish()
           
protected  java.lang.String replaceClasspathVariables(java.lang.String value)
           
protected  java.lang.String replaceVariableByPluginDirectory(java.lang.String text, java.lang.String var, java.lang.String pluginId, boolean useParentDir)
           
 void setAdjuster(IProjectAdjuster adjuster)
          Sets the adjuster.
 void setInitializationData(org.eclipse.core.runtime.IConfigurationElement cfig, java.lang.String propertyName, java.lang.Object data)
          Stores the configuration element for the wizard.
 
Methods inherited from class org.eclipse.ui.wizards.newresource.BasicNewResourceWizard
getSelection, getWorkbench, init, selectAndReveal, selectAndReveal
 
Methods inherited from class org.eclipse.jface.wizard.Wizard
addPage, canFinish, 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.ui.IWorkbenchWizard
init
 
Methods inherited from interface org.eclipse.jface.wizard.IWizard
canFinish, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
 

Constructor Detail

CreationWizard

public CreationWizard()
Constructor for CreationWizard

Method Detail

addPages

public void addPages()
Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard
See Also:
IWizard.addPages()

createWizardPage

protected CreationWizardPage createWizardPage(java.lang.String suggestedName,
                                              org.eclipse.core.runtime.IConfigurationElement configurationElement)
Clients may overwrite this method to provide a customized implementation of the CreationWizardPage.

Parameters:
suggestedName - The suggested name for the page to be created. This is not the page title.
configurationElement - The configuration element that describes this page.
Returns:
CreationWizardPage If null then there won't be a page for the specified configuration element.

getCreationWizardPages

protected CreationWizardPage[] getCreationWizardPages()
Returns the CreationWizardPage pages added to this wizard.

Returns:
CreationWizardPage

createPageControls

public void createPageControls(org.eclipse.swt.widgets.Composite pageContainer)
Specified by:
createPageControls in interface org.eclipse.jface.wizard.IWizard
See Also:
IWizard.createPageControls(Composite)

getAdjuster

public IProjectAdjuster getAdjuster()
Returns the adjuster.

Returns:
IBaseExampleProjectCreationAdjuster

setAdjuster

public void setAdjuster(IProjectAdjuster adjuster)
Sets the adjuster.

Parameters:
adjuster - The adjuster to set

replaceClasspathVariables

protected java.lang.String replaceClasspathVariables(java.lang.String value)

replaceVariableByPluginDirectory

protected java.lang.String replaceVariableByPluginDirectory(java.lang.String text,
                                                            java.lang.String var,
                                                            java.lang.String pluginId,
                                                            boolean useParentDir)

getPluginIdsToResolve

protected java.lang.String[] getPluginIdsToResolve(java.lang.String text)
Returns the pluginsId that should be resolved. These plugins are identified by {pluginId="xxx"} where xxx is the plugin id. The variable {pluginId="xxx"} will be replaced by the plugin directory.

Parameters:
text - where the expression {pluginId="xxx"} should be found
Returns:
String[] the plugin ids to be resolved.

finishWork

protected boolean finishWork()
finishWork is a callback function that is called in the performWork method. This function is called after copying the resources to the workspace and before any of the resources are opened in an associated editor. This is necessary to process the resources before opening up any associated editors.

Returns:
boolean value that determines if the work was performed successfully.

performFinish

public boolean performFinish()
Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard
See Also:
IWizard.performFinish()

setInitializationData

public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement cfig,
                                  java.lang.String propertyName,
                                  java.lang.Object data)
Stores the configuration element for the wizard. The configuration element will be used in performFinish to set the result perspective.

Specified by:
setInitializationData in interface org.eclipse.core.runtime.IExecutableExtension

getPluginId

protected java.lang.String getPluginId()
Returns the id of the plugin that is declaring this wizard.

Returns:
String

initializeDefaultPageImageDescriptor

protected void initializeDefaultPageImageDescriptor()
See Also:
BasicNewResourceWizard.initializeDefaultPageImageDescriptor()

disableResourceOpening

public void disableResourceOpening(boolean disableOpening)
Sets whether or not the wizard should open designated resources after the wizard has finished all of the appropriate actions when the user clicks on the finish button. By default, resources are to be opened after the wizard has completed its operation. This method provides an override to this functionality.


TPTP 4.2.0 Platform Project
Internal API Specification