Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.pde.internal.ui.wizards.extension
Class NewExtensionTemplateWizard  view NewExtensionTemplateWizard download NewExtensionTemplateWizard.java

java.lang.Object
  extended byorg.eclipse.jface.wizard.Wizard
      extended byorg.eclipse.pde.internal.ui.wizards.extension.NewExtensionTemplateWizard
All Implemented Interfaces:
org.eclipse.pde.ui.IBasePluginWizard, org.eclipse.pde.ui.IExtensionWizard, org.eclipse.jface.wizard.IWizard

public class NewExtensionTemplateWizard
extends org.eclipse.jface.wizard.Wizard
implements org.eclipse.pde.ui.IExtensionWizard

This wizard should be used as a base class for wizards that provide new plug-in templates. These wizards are loaded during new plug-in or fragment creation and are used to provide initial content (Java classes, directory structure and extensions).

The wizard provides a common first page that will initialize the plug-in itself. This plug-in will be passed on to the templates to generate additional content. After all templates have executed, the wizard will use the collected list of required plug-ins to set up Java buildpath so that all the generated Java classes can be resolved during the build.


Field Summary
(package private)  org.eclipse.pde.core.plugin.IPluginModelBase model
           
(package private)  org.eclipse.core.resources.IProject project
           
private  org.eclipse.pde.ui.templates.ITemplateSection section
           
 
Fields inherited from class org.eclipse.jface.wizard.Wizard
DEFAULT_IMAGE
 
Constructor Summary
NewExtensionTemplateWizard(org.eclipse.pde.ui.templates.ITemplateSection section)
          Creates a new template wizard.
 
Method Summary
 void addPages()
          Adds any last-minute pages to this wizard.
protected  void doFinish(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 org.eclipse.pde.ui.templates.ITemplateSection getSection()
           
 void init(org.eclipse.core.resources.IProject project, org.eclipse.pde.core.plugin.IPluginModelBase model)
          Initializes the wizard with the project of the plug-in and the model object for the plug-in manifest file.
private  boolean modelContains(org.eclipse.pde.core.plugin.IPluginReference ref)
           
 boolean performFinish()
          Performs any actions appropriate in response to the user having pressed the Finish button, or refuse if finishing now is not permitted.
 void setSection(org.eclipse.pde.ui.templates.ITemplateSection section)
           
private  void updateDependencies()
           
 
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
 

Field Detail

section

private org.eclipse.pde.ui.templates.ITemplateSection section

project

org.eclipse.core.resources.IProject project

model

org.eclipse.pde.core.plugin.IPluginModelBase model
Constructor Detail

NewExtensionTemplateWizard

public NewExtensionTemplateWizard(org.eclipse.pde.ui.templates.ITemplateSection section)
Creates a new template wizard.

Method Detail

init

public void init(org.eclipse.core.resources.IProject project,
                 org.eclipse.pde.core.plugin.IPluginModelBase model)
Description copied from interface: org.eclipse.pde.ui.IExtensionWizard
Initializes the wizard with the project of the plug-in and the model object for the plug-in manifest file. Java code and other resorces should be created in the source folder under the provided project. Changes in the plug-in manifest should be made using the APIs of the provided model. Changing the model will make the model dirty. This will show up in the UI indicating that the currently opened manifest file is modified and needs to be saved.

Although the wizard is launched to create an extension, there is no reason a wizard cannot create several at once.

Specified by:
init in interface org.eclipse.pde.ui.IExtensionWizard

setSection

public void setSection(org.eclipse.pde.ui.templates.ITemplateSection section)

getSection

public org.eclipse.pde.ui.templates.ITemplateSection getSection()

addPages

public void addPages()
Description copied from interface: org.eclipse.jface.wizard.IWizard
Adds any last-minute pages to this wizard.

This method is called just before the wizard becomes visible, to give the wizard the opportunity to add any lazily created pages.

Specified by:
addPages in interface org.eclipse.jface.wizard.IWizard

performFinish

public boolean performFinish()
Description copied from interface: org.eclipse.jface.wizard.IWizard
Performs any actions appropriate in response to the user having pressed the Finish button, or refuse if finishing now is not permitted. Normally this method is only called on the container's current wizard. However if the current wizard is a nested wizard this method will also be called on all wizards in its parent chain. Such parents may use this notification to save state etc. However, the value the parents return from this method is ignored.

Specified by:
performFinish in interface org.eclipse.jface.wizard.IWizard

doFinish

protected void doFinish(org.eclipse.core.runtime.IProgressMonitor monitor)
                 throws org.eclipse.core.runtime.CoreException

updateDependencies

private void updateDependencies()
                         throws org.eclipse.core.runtime.CoreException

modelContains

private boolean modelContains(org.eclipse.pde.core.plugin.IPluginReference ref)