-
Notifications
You must be signed in to change notification settings - Fork 1
/
pdt_templates.xml
166 lines (162 loc) · 15.1 KB
/
pdt_templates.xml
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="ae">$$this->assertEquals(${expected}, ${actual});</template><template autoinsert="false" context="php" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.annotationbody" name="annotationbody">
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="at">$$this->assertTrue(${condition});</template><template autoinsert="true" context="php" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block
${exception_var}.printStackTrace();</template><template autoinsert="false" context="php" deleted="false" description="class statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.class" name="class">class ${class_name} {
function ${function_name}() {
${cursor};
}
}
</template><template autoinsert="false" context="php" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.classbody" name="classbody">
</template><template autoinsert="false" context="php" deleted="false" description="Clone an object" enabled="true" id="org.eclipse.php.ui.editor.templates.php.cln" name="cln">${dollar}${new_obj} = clone ${dollar}${variable};
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="class statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.cls" name="cls">class ${class_name} {
function ${function_name}() {
${cursor};
}
}
</template><template autoinsert="true" context="php" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.constructorbody" name="constructorbody">public function __construct()
{
${cursor}
}</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.constructorcomment" name="constructorcomment">/**
* ${tags}
*/</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.delegatecomment" name="delegatecomment">/**
* ${tags}
* ${see_to_target}
*/</template><template autoinsert="false" context="php" deleted="false" description="echo a string" enabled="true" id="org.eclipse.php.ui.editor.templates.php.echo" name="eco">echo("${}");
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="elseif statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.elif" name="elif">elseif (${condition}) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="else statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.else" name="els">else {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.enumbody" name="enumbody">
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="expectWill">$$${VariableName}->expects($$this->once())
->method('${MethodName}')
->will($$this->returnValue($$${ReturnVariable}));</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="expectwith">$$${VariableName}->expects($$this->once())
->method('${MethodName}')
->with($$this->equalTo($$${CompareVariable}));</template><template autoinsert="true" context="php" deleted="false" description="expect with will" enabled="true" name="expectww">$$${VariableName}->expects($$this->once())
->method('${MethodName}')
->with($$this->equalTo($$${CompareVariable}))
->will($$this->returnValue($$${ReturnVariable}));</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.fieldcomment" name="fieldcomment">/**
* @var ${field_type}
*/</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for variables" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.varcomment" name="fieldcomment">/* @var ${field_type} */</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for created PHP files" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.filecomment" name="filecomment">/**
*
*/</template><template autoinsert="false" context="php" deleted="false" description="function statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.fnc" name="fnc">public function ${function_name}() {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="for statement" enabled="true" id="org.eclipse.jdt.ui.templates.for" name="for">for (${dollar}${index} = 0; ${dollar}${index} < ${number_variable}; ${dollar}${index}++) {
${line_selection}${cursor}
}</template><template autoinsert="false" context="php" deleted="false" description="foreach statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.foreach" name="fore">foreach (${dollar}${array_variable} as ${dollar}${variable}) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="foreach with key statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.foreachkey" name="forek">foreach (${dollar}${array_variable} as ${dollar}${number_variable} => ${dollar}${variable}) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="function statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.function" name="function">function ${function_name}() {
${cursor};
}
</template><template autoinsert="true" context="php" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for getter methods" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.gettercomment" name="gettercomment">/**
* @return the ${bare_field_name}
*/</template><template autoinsert="false" context="php" deleted="false" description="if statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.if" name="if">if (${condition}) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="instanceof statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.instanceof" name="inst">if (${dollar}${variable} instanceof ${class}) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.interfacebody" name="interfacebody">
</template><template autoinsert="false" context="php" deleted="false" description="iterates a directory" enabled="true" id="org.eclipse.php.ui.editor.templates.php.itdir" name="itdir">${dollar}${dirh} = opendir(${dirname});
if (${dollar}${dirh}) {
while (${dollar}${dir_element} = readdir(${dollar}${dirh})) {
${cursor};
}
unset(${dollar}${dir_element});
closedir(${dollar}${dirh});
}
</template><template autoinsert="false" context="php" deleted="false" description="iterates an array" enabled="true" id="org.eclipse.php.ui.editor.templates.php.arrayIterator" name="iter">for (${dollar}${number_variable} = 0 ; ${dollar}${number_variable} < count(${dollar}${array_variable}) ; ${dollar}${number_variable}++) {
${cursor};
}
</template><template autoinsert="true" context="php" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.methodbody" name="methodbody">// ${todo} Auto-generated method stub
${body_statement}</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.methodcomment" name="methodcomment">/**
* ${tags}
*/</template><template autoinsert="true" context="php" deleted="false" description="create mock" enabled="true" name="mock">$$${VariableName} = $$this->getMock('${MockedType}');</template><template autoinsert="false" context="php" deleted="false" description="mysql_fetch_array() loop" enabled="true" id="org.eclipse.php.ui.editor.templates.php.mySql.fa" name="my_fa">while (${dollar}${row} = mysql_fetch_array(${dollar}${query})) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="mysql_fetch_object() loop" enabled="true" id="org.eclipse.php.ui.editor.templates.php.mySql.fo" name="my_fo">while (${dollar}${row} = mysql_fetch_object(${dollar}${query})) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="mysql_fetch_row() loop" enabled="true" id="org.eclipse.php.ui.editor.templates.php.mySql.fr" name="my_fr">while (${dollar}${row} = mysql_fetch_row(${dollar}${query})) {
${cursor};
}
</template><template autoinsert="false" context="php" deleted="false" description="Trap code output" enabled="true" id="org.eclipse.php.ui.editor.templates.php.my_gc" name="my_gc">ob_start();
${cursor};
${dollar}${contents} = ob_get_contents();
ob_end_clean();
</template><template autoinsert="true" context="newPhp" deleted="false" description="html 4.01 frameset" enabled="true" id="org.eclipse.php.ui.editor.templates.newPhp.html.frameset" name="New PHP file - HTML frameset"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}">
<title>Insert title here</title>
</head>
<frameset>
<frame>
<frame>
<noframes>
<body>
<p>This page uses frames. The current browser you are using does not support frames.</p>
<?php
${cursor}
?>
</body>
</noframes>
</frameset>
</html></template><template autoinsert="true" context="newPhp" deleted="false" description="Simple php file" enabled="true" id="org.eclipse.php.ui.editor.templates.newPhp.author" name="New simple PHP file"><?php
${cursor}
?></template><template autoinsert="true" context="php" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.newtype" name="newtype">${filecomment}
${package_declaration}
${typecomment}
${type_declaration}</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.overridecomment" name="overridecomment">/* (non-PHPdoc)
* ${see_to_overridden}
*/</template><template autoinsert="false" context="php" deleted="false" description="Call parent's clone" enabled="true" id="org.eclipse.php.ui.editor.templates.php.pclon" name="pclon">parent::__clone();
</template><template autoinsert="false" context="php" deleted="false" description="Call parent constructor" enabled="true" id="org.eclipse.php.ui.editor.templates.php.pcon" name="pcon">parent::__construct();
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="print an expression" enabled="true" id="org.eclipse.php.ui.editor.templates.php.print" name="pr">print ${};
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="prints the current class name" enabled="true" id="org.eclipse.php.ui.editor.templates.php.print.className" name="prc">print("${class_container}");
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="prints the current function name" enabled="true" id="org.eclipse.php.ui.editor.templates.php.print.functionName" name="prf">print("${function_container}");
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="print with new line" enabled="true" id="org.eclipse.php.ui.editor.templates.php.print.newline" name="prln">print ${}."\n";
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="print a string" enabled="true" id="org.eclipse.php.ui.editor.templates.php.print.string" name="prs">print "${}";
${cursor}</template><template autoinsert="false" context="php" deleted="false" description="print a value" enabled="true" id="org.eclipse.php.ui.editor.templates.php.print.variable" name="prv">print("\${dollar}${variable} = ". ${dollar}${variable});
${cursor}</template><template autoinsert="true" context="php" deleted="false" description="public function" enabled="true" name="pubf">public function ${function_name}()
{
${cursor}
}</template><template autoinsert="true" context="php" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.setterbody" name="setterbody">${field} = ${param};</template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for setter methods" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.settercomment" name="settercomment">/**
* @param ${param} the ${bare_field_name} to set
*/</template><template autoinsert="false" context="php" deleted="false" description="switch statement" enabled="true" id="org.eclipse.php.ui.editor.templates.php.switch" name="swi">switch (${dollar}${variable}) {
case ${value}:
${cursor};
break;
default:
;
break;
}
</template><template autoinsert="true" context="php" deleted="false" description="test" enabled="true" name="test">public function test${TestName}()
{
${cursor}
}</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="tf">class ${file} extends TestBase
{
public function setup()
{
parent::setup();
}
public function teardown()
{
parent::teardown();
}
${cursor}
}</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="this">$$this-></template><template autoinsert="true" context="phpcomment" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.typecomment" name="typecomment">/**
* @author ${user}
*
* ${tags}
*/</template><template autoinsert="false" context="php" deleted="false" description="while loop" enabled="true" id="org.eclipse.php.ui.editor.templates.php.while" name="while">while (${condition}) {
${cursor};
}
</template></templates>