Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Extension Templates</title>
<style type="text/css">@import url("../../book.css");</style>
<style type="text/css">@import url("../../schema.css");</style>
<H1 style="text-align:center">Extension Templates</H1>
<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.pde.ui.templates<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>2.0

<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>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:
<li> One or more templates are combined in a wizard that is contributed as plug-in content wizard using <code>org.eclipse.pde.ui.pluginContent</code> extension point. These templates create interesting content for newly created plug-in projects. In addition, all the templates contributed using this extension point can be seen in a special version of the plug-in content wizard that lists the templates and allows users to freely combine the templates by checking them in the list.</li>
<li> A New extension can be added to an existing plug-in using a template.
<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
<p class="code SchemaDtd">&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.template">template</a>+)&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST extension</p>
<p class="code SchemaDtdAttlist">point&nbsp;CDATA #REQUIRED</p>
<p class="code SchemaDtdAttlist">id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</p>
<p class="code SchemaDtdAttlist">name&nbsp;&nbsp;CDATA #IMPLIED&gt;</p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>point</b> - a fully qualified identifier of the target extension point</li>
<li><b>id</b> - an optional identifier of the extension instance</li>
<li><b>name</b> - an optional name of the extension instance</li>
<br><p class="code SchemaDtd">&lt;!ELEMENT <a name="e.template">template</a> EMPTY&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST template</p>
<p class="code SchemaDtdAttlist">id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IDREF #REQUIRED</p>
<p class="code SchemaDtdAttlist">name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</p>
<p class="code SchemaDtdAttlist">icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</p>
<p class="code SchemaDtdAttlist">class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</p>
<p class="code SchemaDtdAttlist">contributingId&nbsp;IDREF #REQUIRED&gt;</p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>id</b> - a unique name that will be used to identify this template.</li>
<li><b>name</b> - a translatable name that will be used in UI representation
of this template.</li>
<li><b>icon</b> - a relative path of an icon that will be used to visually 
represent the template.</li>
<li><b>class</b> - a fully qualified name of the class that implements <code>org.eclipse.pde.ui.templates.ITemplateSection</code> interface.</li>
<li><b>contributingId</b> - the identifier of the extension point that this template will contribute into.</li>
<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>The following is an example of the template registration:
<pre class="Example"><span class="code SchemaTag">
         point=</span><span class="code SchemaCstring">&quot;org.eclipse.pde.ui.templates&quot;</span><span class="code SchemaTag">&gt;
            contributingId=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.actionSets&quot;</span><span class="code SchemaTag">
            name=</span><span class="code SchemaCstring">&quot;XYZ Action Set Generator&quot;</span><span class="code SchemaTag">
   class=</span><span class="code SchemaCstring">&quot;;</span><span class="code SchemaTag">
            id=</span><span class="code SchemaCstring">&quot;;</span><span class="code SchemaTag">&gt;

<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>Each template must provide a class that implements <code>org.eclipse.pde.ui.templates.ITemplateSection</code> interface. However, abstract classes that implement the interface and can be extended are available.

<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>PDE UI contributes a number of templates that create extensions for the most popular extension points like editors, views, preferences etc.

<p class="note SchemaCopyright">
Copyright (c) 2004, 2013 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made 
available under the terms of the Eclipse Public License v1.0 which 
accompanies this distribution, and is available at 
<a href=""></a>.

New to GrepCode? Check out our FAQ X