Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 7914b5a3ebad70c2afdbdce4d28186a5f59a255e (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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.cdt.core">
<annotation>
      <appInfo>
         <meta.schema plugin="org.eclipse.cdt.core" id="templateProcessTypes" name="Processes Extension point"/>
      </appInfo>
      <documentation>
         This extension point is to be extended to define new processes to be used in template descriptors by template writers.
      </documentation>
   </annotation>

   <element name="extension">
      <annotation>
         <documentation>
            One or more elements of processType should be added as children to this element.
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="processType" minOccurs="1" maxOccurs="unbounded"/>
         </sequence>
         <attribute name="point" type="string" use="required">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="processType">
      <annotation>
         <documentation>
            This element defines a single process. A process is analogous to a procedure with a set of parameters. In similar terms, one can say that this element defines the prototype of this process procedure. One needs to specify all the parameters expected by this process. In the eventual template xml, one needs to specify arguments for the process matching the types and order of these parameters.
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <choice minOccurs="0" maxOccurs="unbounded">
               <element ref="simple"/>
               <element ref="simpleArray"/>
               <element ref="complex"/>
               <element ref="complexArray"/>
            </choice>
         </sequence>
         <attribute name="name" type="string" use="required">
            <annotation>
               <documentation>
                  The value of this attribute is used (fully qualified with the namespace in which the extension is declared), to uniquely identify this processType. e.g. a value such as AddFiles will mean that the usage in the template.xml should be something like &amp;lt;process type=&quot;&amp;lt;plugin_id&amp;gt;.AddFiles&amp;gt;
               </documentation>
            </annotation>
         </attribute>
         <attribute name="processRunner" type="string" use="required">
            <annotation>
               <documentation>
                  A class that extends org.eclipse.cdt.core.templateengine.process.ProcessRunner abstract class and implements all its abstract methods. This is the code that actually processes.
               </documentation>
               <appInfo>
                  <meta.attribute kind="java" basedOn="org.eclipse.cdt.templateengine.process.ProcessRunner"/>
               </appInfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="simple">
      <annotation>
         <documentation>
            A simple string parameter. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a simple argument alongwith the corresponding value attribute.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="name" type="string" use="required">
            <annotation>
               <documentation>
                  Name of the parameter. This should be used exactly as is in the name attribute of a simple argument in the template xml.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="external" type="boolean">
            <annotation>
               <documentation>
                  This is an optional attribute. If specified with a true value, it implies that the template xml need not mention this argument for this param. The attribute does not have any meaning in the context of a child of a complex param or of a child of a complexArray param.

Another thing to note is that arguments corresponding to external=true type params, if not mentioned in the template xml, should be supplied directly through the ValueStore with the key as the param&apos;s name.

If not mentioned, this attribute&apos;s is treated as false.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="nullable" type="boolean">
            <annotation>
               <documentation>
                  This is an optional attribute. If specified with a true value, it implies that the template xml need not mention the value attribute of the argument for this param. The attribute does not have any meaning in the context of a child of a complex param or of a child of a complexArray param.

If not mentioned, this attribute&apos;s is treated as false.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="simpleArray">
      <annotation>
         <documentation>
            A simple string array parameter. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a simple-array argument alongwith the corresponding element children, one child per array element with the corresponding value attribute.
         </documentation>
      </annotation>
      <complexType>
         <attribute name="name" type="string" use="required">
            <annotation>
               <documentation>
                  Name of the parameter. This should be used exactly as is in the name attribute of a simple-array argument in the template xml.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="complex">
      <annotation>
         <documentation>
            A complex parameter that groups together any number of simple, simpleArray, complex, complexArray parameters. This is equivalent of an object parameter. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a simple argument alongwith the corresponding children, each child matching the type of the corresponding child of this element.
         </documentation>
      </annotation>
      <complexType>
         <sequence minOccurs="1" maxOccurs="unbounded">
            <choice>
               <element ref="simple"/>
               <element ref="simpleArray"/>
               <element ref="complex"/>
               <element ref="complexArray"/>
            </choice>
         </sequence>
         <attribute name="name" type="string" use="required">
            <annotation>
               <documentation>
                  Name of the parameter. This should be used exactly as is in the name attribute of a complex argument in the template xml.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="complexArray">
      <annotation>
         <documentation>
            A complex array parameter. Each element of this parameter is of the same base complex type as specified by the baseType child of this element. In the eventual template xml, one needs to specify the same name as the value of the name attribute of a complex-array argument alongwith the corresponding element children, one child per array element with the corresponding complex type arguments (based on baseType definition).
         </documentation>
      </annotation>
      <complexType>
         <sequence>
            <element ref="baseType"/>
         </sequence>
         <attribute name="name" type="string" use="required">
            <annotation>
               <documentation>
                  Name of the parameter. This should be used exactly as is in the name attribute of a complex-array argument in the template xml.
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="baseType">
      <annotation>
         <documentation>
            This is not a direct parameter of a process. This simply acts as a complex grouping of parameters to be used as the base type of complexArray parameters.
         </documentation>
      </annotation>
      <complexType>
         <sequence minOccurs="1" maxOccurs="unbounded">
            <choice>
               <element ref="simple"/>
               <element ref="simpleArray"/>
               <element ref="complex"/>
               <element ref="complexArray"/>
            </choice>
         </sequence>
      </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
         id=&quot;processExample&quot;
         name=&quot;Process Example&quot;
         point=&quot;org.eclipse.cdt.core.templateengine.processTypes&quot;&gt;

        &lt;processType
            name=&quot;NewManagedProject&quot;
            processRunner=&quot;org.eclipse.cdt.core.templateengine.process.processes.NewManagedProject&quot;&gt;
         &lt;simple name=&quot;name&quot;/&gt;
         &lt;simple
               external=&quot;true&quot;
               name=&quot;projectType&quot;/&gt;
         &lt;simple
               external=&quot;true&quot;
               name=&quot;location&quot;
               nullable=&quot;true&quot;/&gt;
         &lt;simple name=&quot;targetType&quot;/&gt;
        &lt;/processType&gt;

        &lt;processType
            name=&quot;SetMBSBooleanOptionValue&quot;
            processRunner=&quot;org.eclipse.cdt.core.templateengine.process.processes.SetMBSBooleanOptionValue&quot;&gt;
         &lt;simple name=&quot;projectName&quot;/&gt;
         &lt;complexArray name=&quot;resourcePaths&quot;&gt;
            &lt;baseType&gt;
               &lt;simple name=&quot;id&quot;/&gt;
               &lt;simple name=&quot;value&quot;/&gt;
               &lt;simple name=&quot;path&quot;/&gt;
            &lt;/baseType&gt;
         &lt;/complexArray&gt;
        &lt;/processType&gt;

        &lt;processType
            name=&quot;AddFile&quot;
            processRunner=&quot;org.eclipse.cdt.core.templateengine.process.processes.AddFile&quot;&gt;
         &lt;simple name=&quot;projectName&quot;/&gt;
         &lt;complex name=&quot;file&quot;&gt;
            &lt;simple name=&quot;source&quot;/&gt;
            &lt;simple name=&quot;target&quot;/&gt;
            &lt;simple name=&quot;replaceable&quot;/&gt;
         &lt;/complex&gt;
        &lt;/processType&gt;

        &lt;processType
            name=&quot;AppendToMBSStringListOptionValues&quot;
            processRunner=&quot;org.eclipse.cdt.core.templateengine.process.processes.AppendToMBSStringListOptionValues&quot;&gt;
         &lt;simple name=&quot;projectName&quot;/&gt;
         &lt;complexArray name=&quot;resourcePaths&quot;&gt;
            &lt;baseType&gt;
               &lt;simple name=&quot;id&quot;/&gt;
               &lt;simpleArray name=&quot;values&quot;/&gt;
               &lt;simple name=&quot;path&quot;/&gt;
            &lt;/baseType&gt;
         &lt;/complexArray&gt;
        &lt;/processType&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.gnu.templates&lt;/samp&gt;
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="apiInfo"/>
      </appInfo>
      <documentation>
         
      </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.core.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:
Bala Torati (Symbian) - Initial API and implementation
      </documentation>
   </annotation>

</schema>

Back to the top