Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 3c0b5750384e8bce983f97d555f22fd8b9fb554e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.cdt.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
      <appInfo>
         <meta.schema plugin="org.eclipse.cdt.core" id="templates" name="Template Extension point"/>
      </appInfo>
      <documentation>
         This templates extension point facilitates the users to contribute their Template XMLs to the Template Engine plug-in.
      </documentation>
   </annotation>

   <element name="extension">
      <annotation>
         <appInfo>
            <meta.element />
         </appInfo>
         <documentation>
            Extension point added to Template Engine plugin. Any plugin, which intends to contribute XML templates to the Template Engine must extend this extension point, and add the template element.
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="template" minOccurs="1" maxOccurs="unbounded"/>
            <element ref="category" minOccurs="0" maxOccurs="unbounded"/>
         </sequence>
         <attribute name="point" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  Id for the extension in the extender plugin.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="name" type="string">
            <annotation>
               <documentation>
                  Optional name attribute.
               </documentation>
               <appInfo>
                  <meta.attribute translatable="true"/>
               </appInfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="template">
      <annotation>
         <documentation>
            By adding the templates extension point the users can contribute their Template XMLs to the Template Engine plugin.
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="toolChain" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="parentCategory" minOccurs="0" maxOccurs="unbounded"/>
         </sequence>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  A unique identifier for this template contribution. This does not need to be the same as the id of the template (as defined in template.xml) it is contributing. This allows contributing the same template.xml more than once (for example for multiple project types, or with alternate page sequences).
               </documentation>
            </annotation>
         </attribute>
         <attribute name="location" type="string" use="required">
            <annotation>
               <documentation>
                  The path of template.xml (relative to the base of the containing plug-in). For example &quot;templates/TemplateOne/template.xml&quot;. This attribute is mandatory.
               </documentation>
               <appInfo>
                  <meta.attribute kind="resource"/>
               </appInfo>
            </annotation>
         </attribute>
         <attribute name="projectType" type="string">
            <annotation>
               <documentation>
                  This attribute is a project type id referring to the cdt project type that the template will be associated with. Project types are contributed to the org.eclipse.cdt.managedbuilder.core.buildDefinitions extension-point.
This attribute is mandatory. CDT pre-defines the following values of the build artifact type property: 
&lt;ul&gt;
&lt;li&gt;&quot;org.eclipse.cdt.build.core.buildArtefactType.exe&quot; - to represent executable
&lt;li&gt;&quot;org.eclipse.cdt.build.core.buildArtefactType.staticLib&quot; - to represent static library 
&lt;li&gt;&quot;org.eclipse.cdt.build.core.buildArtefactType.sharedLib&quot; - to represent shared library 
&lt;li&gt;ISVs can define their own custom build artifact values by contributing to the org.eclipse.cdt.managedbuilder.core.buildProperties extension point. 
&lt;/ul&gt;
It&apos;s no longer manditory since templates are no longer organized by project type. Template catogories replace that functionality.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="isCategory" type="boolean">
            <annotation>
               <documentation>
                  If true this template contribution should appear as a folder. Defaults to false.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="filterPattern" type="string">
            <annotation>
               <documentation>
                  filterPattern is a java.util.regex.Pattern format string which is used to match against build configuration ids. This is an optional attribute, if absent will all configurations will match.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="pagesAfterTemplateSelectionProvider" type="string">
            <annotation>
               <documentation>
                  A class that implements org.eclipse.cdt.templateengine.IPagesAfterTemplateSelectionProvider interface to create pages that will be appended to the pages returned from TemplatesChoiceWizard.getPagesAfterTemplateSelection().
               </documentation>
               <appInfo>
                  <meta.attribute kind="java" basedOn="org.eclipse.cdt.ui.templateengine.IPagesAfterTemplateSelectionProvider"/>
               </appInfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="toolChain">
      <annotation>
         <documentation>
            This element is used to reference an existing toolchain by its unique identifier.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  The unique identifier of a toolchain contributed to the org.eclipse.cdt.managedbuilder.core.buildDefinitions extension point.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="category">
      <annotation>
         <documentation>
            Used to arrange templates in a hierarchy in the UI.
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="parentCategory" minOccurs="0" maxOccurs="unbounded"/>
         </sequence>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="label" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
               <appInfo>
                  <meta.attribute translatable="true"/>
               </appInfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="parentCategory">
      <annotation>
         <documentation>
            id of parent category.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>


   <annotation>
      <appInfo>
         <meta.section type="since"/>
      </appInfo>
      <documentation>
         This extension point was added in CDT 4.0
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="examples"/>
      </appInfo>
      <documentation>
         The following is an example of the extension point usage:
&lt;p&gt;
&lt;pre&gt;
   &lt;extension point=&quot;org.eclipse.cdt.core.templates&quot;&gt;
      &lt;template
         id=&quot;org.foobar.templates.MyExampleTemplate&quot;
         location=&quot;templates/MyExampleTemplate/template.xml&quot;
         projectType=&quot;org.eclipse.cdt.build.core.buildArtefactType.exe&quot;
         filterPattern=&quot;.*&quot;&gt;
      &lt;/template&gt;
   &lt;/extension&gt;
&lt;/pre&gt;            

For more details on how to define your own templates, please check examples provided under &lt;samp&gt;org.eclipse.cdt.ui.templateengine&lt;/samp&gt;
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="implementation"/>
      </appInfo>
      <documentation>
         An implementation of this extension point is supplied in &lt;samp&gt;org.eclipse.cdt.templateengine&lt;/samp&gt;
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="copyright"/>
      </appInfo>
      <documentation>
         Copyright (c) 2007 Symbian Software Limited 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
http://www.eclipse.org/legal/epl-v10.html

Contributors:
Symbian - Initial API and implementation
      </documentation>
   </annotation>

</schema>

Back to the top