Pluglet Template

Identifier:
com.ibm.xtools.pluglets.ui.plugletTemplate

Since:
1.5.0

Description:
Allows plug-ins to register pluglet templates. These templates can be discovered in the "New pluglet..." dialog.

Pluglet creation templates appear as choices within the "New Pluglet" dialog. In the dialog, templates are organized into categories which usually reflect a particular problem domain. The categories defined by one plug-in can be referenced by other plug-ins using the category attribute. Uncategorized templates, as well as templates with invalid category paths, will end up in an "Other" category.

A template file contains the Java source that will be placed in the new pluglet after undergoing template expansion. The template file can contain references to template variables such as "${package_declaration}" and "${type_name}".

It is recommended that templates be written such that the resulting expansion compiles without error (e.g. has all the necessary import statements).

Configuration Markup:

<!ELEMENT extension (category | template)*>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT category EMPTY>

<!ATTLIST category

id             CDATA #REQUIRED

name           CDATA #REQUIRED

parentCategory CDATA #IMPLIED>


<!ELEMENT template EMPTY>

<!ATTLIST template

id              CDATA #REQUIRED

name            CDATA #REQUIRED

file            CDATA #REQUIRED

encoding        CDATA #IMPLIED

icon            CDATA #IMPLIED

category        CDATA #IMPLIED

description     CDATA #IMPLIED

requiredPlugins CDATA #IMPLIED>


Examples:


   <extension point="com.ibm.xtools.pluglets.ui.plugletTemplate"> 
      <category 
        id="com.abc.xyz" 
        name="XYZ Templates"> 
      </category> 
      <category 
        id="com.abc.xyz.easy" 
        name="Easy Templates" 
        parentCategory="com.abc.xyz"> 
      </category> 
      <template 
        id="com.abc.xyz.easy.template" 
        name="EasyTemplate" 
        file="pluglet_templates/EasyTemplate.txt" 
        icon="icons/EasyTemplate.gif" 
        category="com.abc.xyz/com.abc.xyz.easy" 
        description="%EasyTemplate.description"> 
      </template> 
   </extension>


© Copyright Model RealTime Corp. 2003, 2004. All Rights Reserved