root/trunk/descent.ui/templates/default-templates.xml

Revision 1486, 18.2 kB (checked in by asterite, 5 years ago)

Implemented override indicators and override proposals.

Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 /*******************************************************************************
5  * Copyright (c) 2000, 2005 IBM Corporation and others.
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 -->
15
16 <templates>
17
18 <template name="for" description="%Templates.for_array" id="descent.ui.templates.for_array" context="d" enabled="true" autoinsert="false">for (int ${index} = 0; ${index} &lt; ${array}.length; ${index}++) {
19     ${line_selection}${cursor}
20 }</template>
21
22 <template name="for" description="%Templates.for_temp" id="descent.ui.templates.for_temp" context="d" enabled="true" autoinsert="false">for (int ${index} = 0; ${index} &lt; ${array}.length; ${index}++) {
23     ${array_type} ${array_element} = ${array}[${index}];
24     ${cursor}
25 }</template>
26
27 <template name="foreach" description="%Templates.foreach_collection" id="descent.ui.templates.foreach_single" context="d" enabled="true" autoinsert="false">foreach (${var}; ${iterable}) {
28     ${cursor}
29 }</template>
30
31 <template name="foreach" description="%Templates.foreach_dictionary" id="descent.ui.templates.foreach_dictionary" context="d" enabled="true" autoinsert="false">foreach (${key}, ${value}; ${iterable}) {
32     ${cursor}
33 }</template>
34
35 <template name="foreach_reverse" description="%Templates.foreach_reverse_collection" id="descent.ui.templates.foreach_reverse_single" context="d" enabled="true" autoinsert="false">foreach_reverse (${var}; ${iterable}) {
36     ${cursor}
37 }</template>
38
39 <template name="foreach_reverse" description="%Templates.foreach_reverse_dictionary" id="descent.ui.templates.foreach_reverse_dictionary" context="d" enabled="true" autoinsert="false">foreach_reverse (${key}, ${value}; ${iterable}) {
40     ${cursor}
41 }</template>
42
43 <template name="do" description="%Templates.do" id="descent.ui.templates.do" context="d" enabled="true" autoinsert="false">do {
44     ${line_selection}${cursor}
45 } while (${condition});</template>
46
47 <template name="switch" description="%Templates.switch" id="descent.ui.templates.switch" context="d" enabled="true" autoinsert="false">switch (${key}) {
48     case ${value}:
49         ${cursor}
50         break;
51
52     default:
53         break;
54 }</template>
55
56 <template name="if" description="%Templates.if" id="descent.ui.templates.if" context="d" enabled="true" autoinsert="false">if (${condition}) {
57     ${line_selection}${cursor}
58 }</template>
59
60 <template name="ifelse" description="%Templates.ifelse" id="descent.ui.templates.ifelse" context="d" enabled="true" autoinsert="false">if (${condition}) {
61     ${cursor}
62 } else {
63    
64 }</template>
65
66 <template name="elseif" description="%Templates.elseif" id="descent.ui.templates.elseif" context="d" enabled="true" autoinsert="false">else if (${condition}) {
67     ${cursor}
68 }</template>
69
70 <template name="else" description="%Templates.else" id="descent.ui.templates.else" context="d" enabled="true" autoinsert="false">else {
71     ${cursor}
72 }</template>
73
74 <template name="try" description="%Templates.try" id="descent.ui.templates.try" context="d" enabled="true" autoinsert="false">try {
75     ${line_selection}${cursor}
76 } catch (${Exception} e) {
77     // ${todo}: handle exception
78 }</template>
79
80 <template name="catch" description="%Templates.catch" id="descent.ui.templates.catch" context="d" enabled="true" autoinsert="false">catch (${Exception} e) {
81     ${cursor}// ${todo}: handle exception
82 }</template>
83
84 <template name="main" description="%Templates.main" id="descent.ui.templates.main" context="d" enabled="true" autoinsert="false">int main(char[][] args) {
85     ${cursor}
86     return 0;
87 }</template>
88
89 <template name="public_method" description="%Templates.public_method" id="descent.ui.templates.public_method" context="d" enabled="true" autoinsert="false">public ${return_type} ${name}(${}) {
90     ${cursor}
91 }</template>
92
93 <template name="protected_method" description="%Templates.protected_method" id="descent.ui.templates.protected_method" context="d" enabled="true" autoinsert="false">protected ${return_type} ${name}(${}) {
94     ${cursor}
95 }</template>
96
97 <template name="package_method" description="%Templates.package_method" id="descent.ui.templates.package_method" context="d" enabled="true" autoinsert="false">package ${return_type} ${name}(${}) {
98     ${cursor}
99 }</template>
100
101 <template name="private_method" description="%Templates.private_method" id="descent.ui.templates.private_method" context="d" enabled="true" autoinsert="false">private ${return_type} ${name}(${}) {
102     ${cursor}
103 }</template>
104
105 <template name="private_static_method" description="%Templates.private_static_method" id="descent.ui.templates.private_static_method" context="d" enabled="true" autoinsert="false">private static ${return_type} ${name}(${}) {
106     ${cursor}
107 }</template>
108
109 <template name="cast" description="%Templates.cast" id="descent.ui.templates.cast" context="d" enabled="true" autoinsert="false">${type} ${new_name} = cast(${type}) ${name};</template>
110
111 <template name="new" description="%Templates.new" id="descent.ui.templates.new" context="d" enabled="true" autoinsert="false">${type} ${name} = new ${type}(${arguments});</template>
112 <template name="authors" description="%Templates.author" id="descent.ui.templates.author" context="ddoc" enabled="true" autoinsert="true">Authors: ${user}</template>
113
114 <template name="while" description="%Templates.while_condition" id="descent.ui.templates.while_condition" context="d" enabled="true" autoinsert="false">while (${condition}) {
115     ${line_selection}${cursor}
116 }</template>
117
118 <template name="synchronized" description="%Templates.synchronized" id="descent.ui.templates.synchronized" context="d" enabled="true" autoinsert="false">synchronized (${mutex}) {
119     ${line_selection}${cursor}
120 }</template>
121
122 <template name="volatile" description="%Templates.volatile" id="descent.ui.templates.volatile" context="d" enabled="true" autoinsert="false">volatile (${mutex}) {
123     ${line_selection}${cursor}
124 }</template>
125
126 <template name="opNeg" description="%Templates.opNeg" id="descent.ui.templates.opNeg" context="d" enabled="true" autoinsert="false">${type} opNeg() {
127     ${line_selection}${cursor}
128 }</template>
129
130 <template name="opPos" description="%Templates.opPos" id="descent.ui.templates.opPos" context="d" enabled="true" autoinsert="false">${type} opPos() {
131     ${line_selection}${cursor}
132 }</template>
133
134 <template name="opCom" description="%Templates.opCom" id="descent.ui.templates.opCom" context="d" enabled="true" autoinsert="false">${type} opCom() {
135     ${line_selection}${cursor}
136 }</template>
137
138 <template name="opPostInc" description="%Templates.opPostInc" id="descent.ui.templates.opPostInc" context="d" enabled="true" autoinsert="false">${type} opPostInc() {
139     ${line_selection}${cursor}
140 }</template>
141
142 <template name="opPostDec" description="%Templates.opPostDec" id="descent.ui.templates.opPostDec" context="d" enabled="true" autoinsert="false">${type} opPostDec() {
143     ${line_selection}${cursor}
144 }</template>
145
146 <template name="opCast" description="%Templates.opCast" id="descent.ui.templates.opCast" context="d" enabled="true" autoinsert="false">${type} opCast() {
147     ${line_selection}${cursor}
148 }</template>
149
150 <template name="opAdd" description="%Templates.opAdd" id="descent.ui.templates.opAdd" context="d" enabled="true" autoinsert="false">${type} opAdd(${type} ${other}) {
151     ${line_selection}${cursor}
152 }</template>
153
154 <template name="opAdd_r" description="%Templates.opAdd_r" id="descent.ui.templates.opAdd_r" context="d" enabled="true" autoinsert="false">${type} opAdd_r(${type} ${other}) {
155     ${line_selection}${cursor}
156 }</template>
157
158 <template name="opSub" description="%Templates.opSub" id="descent.ui.templates.opSub" context="d" enabled="true" autoinsert="false">${type} opSub(${type} ${other}) {
159     ${line_selection}${cursor}
160 }</template>
161
162 <template name="opSub_r" description="%Templates.opSub_r" id="descent.ui.templates.opSub_r" context="d" enabled="true" autoinsert="false">${type} opSub_r(${type} ${other}) {
163     ${line_selection}${cursor}
164 }</template>
165
166 <template name="opMul" description="%Templates.opMul" id="descent.ui.templates.opMul" context="d" enabled="true" autoinsert="false">${type} opMul(${type} ${other}) {
167     ${line_selection}${cursor}
168 }</template>
169
170 <template name="opMul_r" description="%Templates.opMul_r" id="descent.ui.templates.opMul_r" context="d" enabled="true" autoinsert="false">${type} opMul_r(${type} ${other}) {
171     ${line_selection}${cursor}
172 }</template>
173
174 <template name="opDiv" description="%Templates.opDiv" id="descent.ui.templates.opDiv" context="d" enabled="true" autoinsert="false">${type} opDiv(${type} ${other}) {
175     ${line_selection}${cursor}
176 }</template>
177
178 <template name="opDiv_r" description="%Templates.opDiv_r" id="descent.ui.templates.opDiv_r" context="d" enabled="true" autoinsert="false">${type} opDiv_r(${type} ${other}) {
179     ${line_selection}${cursor}
180 }</template>
181
182 <template name="opMod" description="%Templates.opMod" id="descent.ui.templates.opMod" context="d" enabled="true" autoinsert="false">${type} opMod(${type} ${other}) {
183     ${line_selection}${cursor}
184 }</template>
185
186 <template name="opMod_r" description="%Templates.opMod_r" id="descent.ui.templates.opMod_r" context="d" enabled="true" autoinsert="false">${type} opMod_r(${type} ${other}) {
187     ${line_selection}${cursor}
188 }</template>
189
190 <template name="opAnd" description="%Templates.opAnd" id="descent.ui.templates.opAnd" context="d" enabled="true" autoinsert="false">${type} opAnd(${type} ${other}) {
191     ${line_selection}${cursor}
192 }</template>
193
194 <template name="opAnd_r" description="%Templates.opAnd_r" id="descent.ui.templates.opAnd_r" context="d" enabled="true" autoinsert="false">${type} opAnd_r(${type} ${other}) {
195     ${line_selection}${cursor}
196 }</template>
197
198 <template name="opOr" description="%Templates.opOr" id="descent.ui.templates.opOr" context="d" enabled="true" autoinsert="false">${type} opOr(${type} ${other}) {
199     ${line_selection}${cursor}
200 }</template>
201
202 <template name="opOr_r" description="%Templates.opOr_r" id="descent.ui.templates.opOr_r" context="d" enabled="true" autoinsert="false">${type} opOr_r(${type} ${other}) {
203     ${line_selection}${cursor}
204 }</template>
205
206 <template name="opXor" description="%Templates.opXor" id="descent.ui.templates.opXor" context="d" enabled="true" autoinsert="false">${type} opXor(${type} ${other}) {
207     ${line_selection}${cursor}
208 }</template>
209
210 <template name="opXor_r" description="%Templates.opXor_r" id="descent.ui.templates.opXor_r" context="d" enabled="true" autoinsert="false">${type} opXor_r(${type} ${other}) {
211     ${line_selection}${cursor}
212 }</template>
213
214 <template name="opShl" description="%Templates.opShl" id="descent.ui.templates.opShl" context="d" enabled="true" autoinsert="false">${type} opShl(${type} ${other}) {
215     ${line_selection}${cursor}
216 }</template>
217
218 <template name="opShl_r" description="%Templates.opShl_r" id="descent.ui.templates.opShl_r" context="d" enabled="true" autoinsert="false">${type} opShl_r(${type} ${other}) {
219     ${line_selection}${cursor}
220 }</template>
221
222 <template name="opShr" description="%Templates.opShr" id="descent.ui.templates.opShr" context="d" enabled="true" autoinsert="false">${type} opShr(${type} ${other}) {
223     ${line_selection}${cursor}
224 }</template>
225
226 <template name="opShr_r" description="%Templates.opShr_r" id="descent.ui.templates.opShr_r" context="d" enabled="true" autoinsert="false">${type} opShr_r(${type} ${other}) {
227     ${line_selection}${cursor}
228 }</template>
229
230 <template name="opUShr" description="%Templates.opUShr" id="descent.ui.templates.opUShr" context="d" enabled="true" autoinsert="false">${type} opUShr(${type} ${other}) {
231     ${line_selection}${cursor}
232 }</template>
233
234 <template name="opUShr_r" description="%Templates.opUShr_r" id="descent.ui.templates.opUShr_r" context="d" enabled="true" autoinsert="false">${type} opUShr_r(${type} ${other}) {
235     ${line_selection}${cursor}
236 }</template>
237
238 <template name="opCat" description="%Templates.opCat" id="descent.ui.templates.opCat" context="d" enabled="true" autoinsert="false">${type} opCat(${type} ${other}) {
239     ${line_selection}${cursor}
240 }</template>
241
242 <template name="opCat_r" description="%Templates.opCat_r" id="descent.ui.templates.opCat_r" context="d" enabled="true" autoinsert="false">${type} opCat_r(${type} ${other}) {
243     ${line_selection}${cursor}
244 }</template>
245
246 <template name="opAddAssign" description="%Templates.opAddAssign" id="descent.ui.templates.opAddAssign" context="d" enabled="true" autoinsert="false">${type} opAddAssign(${type} ${other}) {
247     ${line_selection}${cursor}
248 }</template>
249
250 <template name="opSubAssign" description="%Templates.opSubAssign" id="descent.ui.templates.opSubAssign" context="d" enabled="true" autoinsert="false">${type} opSubAssign(${type} ${other}) {
251     ${line_selection}${cursor}
252 }</template>
253
254 <template name="opMulAssign" description="%Templates.opMulAssign" id="descent.ui.templates.opMulAssign" context="d" enabled="true" autoinsert="false">${type} opMulAssign(${type} ${other}) {
255     ${line_selection}${cursor}
256 }</template>
257
258 <template name="opDivAssign" description="%Templates.opDivAssign" id="descent.ui.templates.opDivAssign" context="d" enabled="true" autoinsert="false">${type} opDivAssign(${type} ${other}) {
259     ${line_selection}${cursor}
260 }</template>
261
262 <template name="opModAssign" description="%Templates.opModAssign" id="descent.ui.templates.opModAssign" context="d" enabled="true" autoinsert="false">${type} opModAssign(${type} ${other}) {
263     ${line_selection}${cursor}
264 }</template>
265
266 <template name="opAndAssign" description="%Templates.opAndAssign" id="descent.ui.templates.opAndAssign" context="d" enabled="true" autoinsert="false">${type} opAndAssign(${type} ${other}) {
267     ${line_selection}${cursor}
268 }</template>
269
270 <template name="opOrAssign" description="%Templates.opOrAssign" id="descent.ui.templates.opOrAssign" context="d" enabled="true" autoinsert="false">${type} opOrAssign(${type} ${other}) {
271     ${line_selection}${cursor}
272 }</template>
273
274 <template name="opXorAssign" description="%Templates.opXorAssign" id="descent.ui.templates.opXorAssign" context="d" enabled="true" autoinsert="false">${type} opXorAssign(${type} ${other}) {
275     ${line_selection}${cursor}
276 }</template>
277
278 <template name="opShlAssign" description="%Templates.opShlAssign" id="descent.ui.templates.opShlAssign" context="d" enabled="true" autoinsert="false">${type} opShlAssign(${type} ${other}) {
279     ${line_selection}${cursor}
280 }</template>
281
282 <template name="opShrAssign" description="%Templates.opShrAssign" id="descent.ui.templates.opShrAssign" context="d" enabled="true" autoinsert="false">${type} opShrAssign(${type} ${other}) {
283     ${line_selection}${cursor}
284 }</template>
285
286 <template name="opUShrAssign" description="%Templates.opUShrAssign" id="descent.ui.templates.opUShrAssign" context="d" enabled="true" autoinsert="false">${type} opUShrAssign(${type} ${other}) {
287     ${line_selection}${cursor}
288 }</template>
289
290 <template name="opCatAssign" description="%Templates.opCatAssign" id="descent.ui.templates.opCatAssign" context="d" enabled="true" autoinsert="false">${type} opCatAssign(${type} ${other}) {
291     ${line_selection}${cursor}
292 }</template>
293
294 <template name="opIn" description="%Templates.opIn" id="descent.ui.templates.opIn" context="d" enabled="true" autoinsert="false">${type} opIn(${type} ${other}) {
295     ${line_selection}${cursor}
296 }</template>
297
298 <template name="opIn_r" description="%Templates.opIn_r" id="descent.ui.templates.opIn_r" context="d" enabled="true" autoinsert="false">${type} opIn_r(${type} ${other}) {
299     ${line_selection}${cursor}
300 }</template>
301
302 <template name="opAssign" description="%Templates.opAssign" id="descent.ui.templates.opAssign" context="d" enabled="true" autoinsert="false">${type} opAssign(${type} ${other}) {
303     ${line_selection}${cursor}
304 }</template>
305
306 <template name="opEquals" description="%Templates.opEquals" id="descent.ui.templates.opEquals" context="d" enabled="true" autoinsert="false">int opEquals(${Object} ${other}) {
307     ${line_selection}${cursor}
308 }</template>
309
310 <template name="opCmp" description="%Templates.opCmp" id="descent.ui.templates.opCmp" context="d" enabled="true" autoinsert="false">override int opCmp(${Object} ${other}) {
311     ${line_selection}${cursor}
312 }</template>
313
314 <template name="opCall" description="%Templates.opCall" id="descent.ui.templates.opCall" context="d" enabled="true" autoinsert="false">${ret} opCall(${type} ${arg}) {
315     ${line_selection}${cursor}
316 }</template>
317
318 <template name="opIndex" description="%Templates.opIndex" id="descent.ui.templates.opIndex" context="d" enabled="true" autoinsert="false">${ret} opIndex(${type} ${index}) {
319     ${line_selection}${cursor}
320 }</template>
321
322 <template name="opIndexAssign" description="%Templates.opIndexAssign" id="descent.ui.templates.opIndexAssign" context="d" enabled="true" autoinsert="false">${ret} opIndexAssign(${indexType} ${index}, ${valueType} ${value}) {
323     ${line_selection}${cursor}
324 }</template>
325
326 <template name="opSlice" description="%Templates.opSlice1" id="descent.ui.templates.opSlice1" context="d" enabled="true" autoinsert="false">${ret} opSlice() {
327     ${line_selection}${cursor}
328 }</template>
329
330 <template name="opSlice" description="%Templates.opSlice2" id="descent.ui.templates.opSlice2" context="d" enabled="true" autoinsert="false">${ret} opSlice(${type} ${index}) {
331     ${line_selection}${cursor}
332 }</template>
333
334 <template name="opSliceAssign" description="%Templates.opSliceAssign1" id="descent.ui.templates.opSliceAssign1" context="d" enabled="true" autoinsert="false">${ret} opSliceAssign(${type} ${value}) {
335     ${line_selection}${cursor}
336 }</template>
337
338 <template name="opSliceAssign" description="%Templates.opSliceAssign2" id="descent.ui.templates.opSliceAssign2" context="d" enabled="true" autoinsert="false">${ret} opSliceAssign(${indexType} ${index}, ${valueType} ${value}) {
339     ${line_selection}${cursor}
340 }</template>
341
342 <template name="opApply" description="%Templates.opApply" id="descent.ui.templates.opApply" context="d" enabled="true" autoinsert="false">int opApply(int delegate(${type}) dg) {
343     ${line_selection}${cursor}
344 }</template>
345
346 <template name="opApplyReverse" description="%Templates.opApplyReverse" id="descent.ui.templates.opApplyReverse" context="d" enabled="true" autoinsert="false">int opApplyReverse(int delegate(ref ${type}) dg) {
347     ${line_selection}${cursor}
348 }</template>
349
350 <template name="opDot" description="%Templates.opDot" id="descent.ui.templates.opDot" context="d" enabled="true" autoinsert="false">${type} opDot() {
351     ${line_selection}${cursor}
352 }</template>
353
354 </templates>
Note: See TracBrowser for help on using the browser.