Package org.eclipse.pde.ui.templates
Class AbstractNewPluginTemplateWizard
- java.lang.Object
- 
- org.eclipse.jface.wizard.Wizard
- 
- org.eclipse.pde.ui.templates.AbstractNewPluginTemplateWizard
 
 
- 
- All Implemented Interfaces:
- IShellProvider,- IWizard,- IBasePluginWizard,- IBundleContentWizard,- IPluginContentWizard
 - Direct Known Subclasses:
- NewPluginTemplateWizard
 
 public abstract class AbstractNewPluginTemplateWizard extends Wizard implements IBundleContentWizard This class is used as a common base for plug-in content wizards that are implemented using PDE template support. The assumption is that one or more templates will be used to generate plug-in content. Dependencies, new files and wizard pages are all computed based on the templates.- Since:
- 2.0
 
- 
- 
Field Summary- 
Fields inherited from class org.eclipse.jface.wizard.WizardDEFAULT_IMAGE
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractNewPluginTemplateWizard()Creates a new template wizard.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddAdditionalPages()This wizard adds a mandatory first page.voidaddPages()Implements wizard method.IFieldDatagetData()Returns the field data passed to the wizard during the initialization.IPluginReference[]getDependencies(String schemaVersion)Returns new dependencies that are required by this wizard.String[]getImportPackages()Returns names of packages that are required by this wizard.String[]getNewFiles()The wizard is required to return an array of new file and folder names that are generated by it for the purpose of inclusion inbuild.propertiesfile.abstract ITemplateSection[]getTemplateSections()Returns the template sections used in this wizard.booleanhasPages()Returns whether this wizard has at least one pagevoidinit(IFieldData data)Initializes the wizard with the data collected from the parent wizard pages.booleanperformFinish()booleanperformFinish(IProject project, IPluginModelBase model, IProgressMonitor monitor)Implements the interface method by looping through template sections and executing them sequentially.- 
Methods inherited from class org.eclipse.jface.wizard.WizardaddPage, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.jface.wizard.IWizardcanFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer
 
- 
 
- 
- 
- 
Method Detail- 
initpublic void init(IFieldData data) Description copied from interface:IPluginContentWizardInitializes the wizard with the data collected from the parent wizard pages. The data can be used to customize the generated content.- Specified by:
- initin interface- IPluginContentWizard
- Parameters:
- data- all the information collected in the parent wizard that can be used in configuring the generated content
 
 - 
getDatapublic IFieldData getData() Returns the field data passed to the wizard during the initialization.- Returns:
- the parent wizard field data
 
 - 
addAdditionalPagesprotected abstract void addAdditionalPages() This wizard adds a mandatory first page. Subclasses implement this method to add additional pages to the wizard.
 - 
addPagespublic final void addPages() Implements wizard method. Subclasses cannot override it.
 - 
performFinishpublic boolean performFinish() - Specified by:
- performFinishin interface- IWizard
- Specified by:
- performFinishin class- Wizard
 
 - 
performFinishpublic boolean performFinish(IProject project, IPluginModelBase model, IProgressMonitor monitor) Implements the interface method by looping through template sections and executing them sequentially.- Specified by:
- performFinishin interface- IPluginContentWizard
- Parameters:
- project- the project
- model- the plug-in model
- monitor- the progress monitor to track the execution progress as part of the overall new project creation operation
- Returns:
- trueif the wizard completed the operation with success,- falseotherwise.
 
 - 
getTemplateSectionspublic abstract ITemplateSection[] getTemplateSections() Returns the template sections used in this wizard.- Returns:
- the array of template sections
 
 - 
getDependenciespublic IPluginReference[] getDependencies(String schemaVersion) Description copied from interface:IPluginContentWizardReturns new dependencies that are required by this wizard. If the wizard adds extensions or code to the plug-in that depend on other plug-ins, it must report it by returning a reference to that plug-in. This information will be used to compose a correct list of plug-in dependencies so that the plug-in compiles without errors in the first build after creation.- Specified by:
- getDependenciesin interface- IPluginContentWizard
- Parameters:
- schemaVersion- version of the plug-in manifest, or null if older manifest (prior to 3.0) has been created. Depending on the manifest version, the list of dependencies may vary.
- Returns:
- the array of plug-in dependencies required by this wizard
 
 - 
getNewFilespublic String[] getNewFiles() Description copied from interface:IPluginContentWizardThe wizard is required to return an array of new file and folder names that are generated by it for the purpose of inclusion inbuild.propertiesfile. All files and folders that must be part of the binary build must be listed inbin.includesvariable. Since the tokens obtained by this method will be passed to the variable as-is, it is legal to use all wild cards also legal inbuild.properties, such as "*.png".- Specified by:
- getNewFilesin interface- IPluginContentWizard
- Returns:
- an array of new file and folder names
 
 - 
hasPagespublic boolean hasPages() Returns whether this wizard has at least one page- Returns:
- whether this wizard has at least one page
 
 - 
getImportPackagespublic String[] getImportPackages() Description copied from interface:IBundleContentWizardReturns names of packages that are required by this wizard. This information will be used to compose the Import-Package header of the manifest.mf being generated, so that the plug-in compiles without errors in the first build after creation.- Specified by:
- getImportPackagesin interface- IBundleContentWizard
- Returns:
- an array of package names required by this wizard
 
 
- 
 
-