Field Summary |
|
final public static String | KEY_ACTIVATOR_SIMPLE |
final public static String | KEY_PACKAGE_NAME The key for the package name that will be created by this teamplate
(value="packageName"). |
final public static String | KEY_PLUGIN_CLASS The key for the main plug-in class of the plug-in that the template is
used for (value="pluginClass"). |
final public static String | KEY_PLUGIN_ID The key for the plug-in id of the plug-in that the template is used for
(value="pluginId"). |
final public static String | KEY_PLUGIN_NAME The key for the plug-in name of the plug-in that the template is used for
(value="pluginName"). |
protected IPluginModelBase | model The plug-in model. |
protected IProject | project The project handle. |
Method Summary |
|
public void | addPages(Wizard wizard) |
protected IPluginExtension | createExtension(String pointId, boolean reuse) A utility method to create an extension object for the plug-in model from
the provided extension point id.
Parameters: pointId - the identifier of the target extension point Parameters: reuse - if true, new extension object will be created only if anextension with the same Id does not exist. |
public void | execute(IProject project, IPluginModelBase model, IProgressMonitor monitor) The default implementation of the interface method. |
protected void | generateFiles(IProgressMonitor monitor) Generates files as part of the template execution. |
protected void | generateFiles(IProgressMonitor monitor, URL locationUrl) Generates files as part of the template execution.
The files found in the location are processed in the following way:
- Files and folders found in the directory bin are
copied into the target project without modification.
- Files found in the directory java are copied into the
Java source folder by creating the folder structure that corresponds to
the package name (variable packageName ).
|
public IPluginReference[] | getDependencies(String schemaVersion) |
public String | getDescription() |
public int | getNumberOfWorkUnits() The default implementation of the interface method. |
public boolean | getPagesAdded() Tests if wizard pages for this template section have been added. |
abstract protected ResourceBundle | getPluginResourceBundle() An abstract method that returns the resource bundle that corresponds to
the best match of plugin.properties file for the current
locale (in case of fragments, the file is fragment.properties
). |
public String | getPluginResourceString(String key) Returns the translated version of the resource string represented by the
provided key. |
public String | getReplacementString(String fileName, String key) The default implementation of this method provides values of the
following keys: pluginClass , pluginId and
pluginName . |
protected IFolder | getSourceFolder(IProgressMonitor monitor) Returns the folder with Java files in the target project. |
protected double | getTargetVersion() |
public URL | getTemplateLocation() |
public Object | getValue(String key) |
protected boolean | isOkToCreateFile(File sourceFile) Tests if the file found in the template location should be created in the
target project. |
protected boolean | isOkToCreateFolder(File sourceFolder) Tests if the folder found in the template location should be created in
the target project. |
protected void | markPagesAdded() Marks that pages have been added to the wizard by this template. |
abstract protected void | updateModel(IProgressMonitor monitor) Subclass must implement this method to add the required entries in the
plug-in model. |