Extension Templates

org.eclipse.pde.ui.templates

2.0

This extension point registers plug-in project content templates that are used to generate code for the new extensions. Templates are used in two contexts:

<!ELEMENT extension (template+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT template EMPTY>

<!ATTLIST template

id             CDATA #REQUIRED

name           CDATA #REQUIRED

icon           CDATA #IMPLIED

class          CDATA #REQUIRED

contributingId CDATA #REQUIRED>


The following is an example of the template registration:

   

<extension point=

"org.eclipse.pde.ui.templates"

>

<template contributingId=

"org.eclipse.ui.actionSets"

name=

"XYZ Action Set Generator"

class=

"com.example.xyz.XYZActionSetTemplate"

id=

"com.example.xyz.ActionSetTemplate"

>

</template>

</extension>

Each template must provide a class that implements org.eclipse.pde.ui.templates.ITemplateSection interface. However, abstract classes that implement the interface and can be extended are available.

PDE UI contributes a number of templates that create extensions for the most popular extension points like editors, views, preferences etc.