|
Eclipse PDE Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents a section of the template wizard that generates a new extension or plug-in. Typically, it maps to one wizard page, but more complex sections may span several pages. Also note that in the very simple cases it may not contribute any wizard pages.
If a section generates extensions, it should be written in such a way to be used both in the 'New Extension' wizard and as a part of a new plug-in project wizard. When used as part of the new plug-in project wizard, it may appear alongside other templates and therefore should not do anything that prevents it.
Method Summary | |
---|---|
void |
addPages(Wizard wizard)
Adds template-related pages to the wizard. |
void |
execute(IProject project,
IPluginModelBase model,
IProgressMonitor monitor)
Executes the template. |
IPluginReference[] |
getDependencies(String schemaVersion)
Provides the list of template dependencies. |
String |
getDescription()
Returns a description of the section. |
String |
getLabel()
Returns a presentable label the section. |
String[] |
getNewFiles()
Returns an array of tokens representing new files and folders created by this template section. |
int |
getNumberOfWorkUnits()
Returns the number of work units that this template will consume during the execution. |
WizardPage |
getPage(int pageIndex)
Returns a wizard page at the provided index. |
int |
getPageCount()
Returns number of pages that are contributed by this template. |
boolean |
getPagesAdded()
Tests whether this template have had a chance to create its pages. |
String |
getReplacementString(String fileName,
String key)
Returns a replacement string for the provided key. |
URL |
getTemplateLocation()
Returns the URL of the zip file containing template files and directories that will be created in the plug-in project. |
String |
getUsedExtensionPoint()
Returns identifier of the extension point used in this section. |
Method Detail |
public URL getTemplateLocation()
public String getLabel()
public String getDescription()
public String getReplacementString(String fileName, String key)
fileName
- the name of the file in which the key was found. You can use
it to return different values for different files.key
- the replacement key found in the template file
public void addPages(Wizard wizard)
wizard
- the host wizard to add pages intopublic WizardPage getPage(int pageIndex)
public int getPageCount()
public boolean getPagesAdded()
public int getNumberOfWorkUnits()
public IPluginReference[] getDependencies(String schemaVersion)
schemaVersion
- version of the target manifest, or null if older
manifest (prior to 3.0) will be created. Depending on the
manifest version, the list of dependencies may vary.
public String getUsedExtensionPoint()
public void execute(IProject project, IPluginModelBase model, IProgressMonitor monitor) throws CoreException
project
- the workspace project that contains the plug-inmodel
- structured representation of the plug-in manifestmonitor
- progress monitor to indicate execution progress
CoreException
public String[] getNewFiles()
build.properties
file so that the generated files and
folders are included in the binary build. The tokens will be added as-is
to the variable
return new String[]{"/icons/*.gif"};
bin.includes
variable in build.properties
file.
|
Eclipse PDE Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |