Remove unnecessary explicit cast.
[phpeclipse.git] / net.sourceforge.phpeclipse / templates / default-templates.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <templates>
3 <template name="class" description="php4 class template with constructor" id="net.sourceforge.phpdt.php.class1" context="php" enabled="true"
4 >class ${class_name} {
5         function ${class_name}() {
6                 ${cursor}
7         }
8 }</template>
9 <template name="class" description="php4 class with attribute" id="net.sourceforge.phpdt.php.class2" context="php" enabled="true"
10 >class ${class_name} {
11         var $$${attribute};
12         
13         function ${class_name}() {
14                 ${cursor}
15         }
16         
17         function set_${attribute}( $$${attr} ) {
18                 $$this->${attribute} = $$${attr};
19         }
20         
21         function get_${attribute}() {
22                 return $$this->${attribute};
23         }
24 }</template>
25 <template name="class" description="php5 class template with constructor" id="net.sourceforge.phpdt.php.class3" context="php" enabled="true"
26 >class ${class_name} {
27         public function __construct() {
28                 ${cursor}
29         }
30 }</template>
31 <template name="class" description="php5 class template with constructor and destructor" id="net.sourceforge.phpdt.php.class4" context="php" enabled="true"
32 >class ${class_name} {
33         public function __construct() {
34                 ${cursor}
35         }
36         
37         public function __destruct() {
38         }
39 }</template>
40 <template name="class" description="php5 class with protected attribute" id="net.sourceforge.phpdt.php.class5" context="php" enabled="true"
41 >class ${class_name} {
42         protected $$${attribute};
43         
44         public function __construct() {
45                 ${cursor}
46         }
47         
48         public function __destruct() {
49         }
50         
51         public function set${Attribute}( $$${attr} ) {
52                 $$this->${attribute} = $$${attr};
53         }
54         
55         public function get${Attribute}() {
56                 return $$this->${attribute};
57         }
58 }</template>
59 <template name="class" description="php5 class with private attribute" id="net.sourceforge.phpdt.php.class6" context="php" enabled="true"
60 >class ${class_name} {
61         private $$${attribute};
62         
63         public function __construct() {
64                 ${cursor}
65         }
66         
67         public function __destruct() {
68         }
69         
70         public function set${Attribute}( $$${attr} ) {
71                 $$this->${attribute} = $$${attr};
72         }
73         
74         public function get${Attribute}() {
75                 return $$this->${attribute};
76         }
77 }</template>
78 <template name="for" description="iterate over array" id="net.sourceforge.phpdt.php.for1" context="php" enabled="true"
79 >for ( $$${index} = 0, $$${max_count} = sizeof( $$${array} ); $$${index} &lt; $$${max_count}; $$${index}++ ) {
80         ${cursor}
81 }</template>
82 <template name="for" description="iterate over array w/ temporary variable" id="net.sourceforge.phpdt.php.for2" context="php" enabled="true"
83 >for ($$${index} = 0, $$${max_count} = sizeof( $$${array} ); $$${index} &lt; $$${max_count}; $$${index}++) {
84         $$${array_element} = $$${array}[ $$${index} ];
85         ${cursor}
86 }</template>
87 <template name="foreach" description="iterate over array - value" id="net.sourceforge.phpdt.php.foreach1" context="php" enabled="true"
88 >foreach ( $$${array} as $$${value} ) {
89        ${cursor}
90 }</template>
91 <template name="foreach" description="iterate over array - key/value" id="net.sourceforge.phpdt.php.foreach2" context="php" enabled="true"
92 >foreach ( $$${array} as $$${key} =&gt; $$${value} ) {
93        ${cursor}
94 }</template>
95 <template name="try-catch" description="try-catch block - default" id="net.sourceforge.phpdt.php.try1" context="php" enabled="true"
96 >try {
97        ${try}
98 }</template>
99 <template name="try-catch" description="try-catch block - default" id="net.sourceforge.phpdt.php.try1" context="php" enabled="true"
100 >try {
101         ${try}
102 }
103 catch( Exception $$${e} ) {
104         ${catch}
105 }</template>
106 <template name="try-catch" description="try-catch block - custom Exception" id="net.sourceforge.phpdt.php.try2" context="php" enabled="true"
107 >try {
108         ${try}
109 }
110 catch( ${Exception} $$${e} ) {
111         ${catch}
112 }</template>
113 <template name="function" description="function template" id="net.sourceforge.phpdt.php.function1" context="php" enabled="true"
114 >function ${function_name}() {
115         ${cursor}
116 }</template>
117 <template name="function" description="function template with return" id="net.sourceforge.phpdt.php.function2" context="php" enabled="true"
118 >function ${function_name}() {
119         return ${cursor} ;
120 }</template>
121 <template name="function" description="function template with parameter" id="net.sourceforge.phpdt.php.function3" context="php" enabled="true"
122 >function ${function_name}( $$${param} ) {
123         ${cursor}
124 }</template>
125 <template name="function" description="function template with parameter and return" id="net.sourceforge.phpdt.php.function4" context="php" enabled="true"
126 >function ${function_name}( $$${param} ) {
127         return ${cursor} ;
128 }</template>
129 <template name="while" description="while iteration" id="net.sourceforge.phpdt.php.while" context="php" enabled="true"
130 >while ( ${condition} ) {
131         ${cursor}
132 }</template>
133 <template name="do" description="do iteration" id="net.sourceforge.phpdt.php.do" context="php" enabled="true"
134 >do {
135         ${line_selection}
136 } while ( ${condition} );</template>
137 <template name="switch" description="switch case statement" id="net.sourceforge.phpdt.php.switch" context="php" enabled="true"
138 >switch ( ${key} ) {
139         case ${value}:
140                 ${cursor}
141                 break;
142                 
143         default:
144                 break;
145 }</template>
146 <template name="if" description="if statement" id="net.sourceforge.phpdt.php.if" context="php" enabled="true"
147 >if ( ${condition} ) {
148         ${cursor}
149 }</template>
150 <template name="ifelse" description="if else statement" id="net.sourceforge.phpdt.php.ifelse" context="php" enabled="true"
151 >if ( ${condition} ) {
152         ${cursor}
153 }
154 else {
155         
156 }</template>
157 <template name="elseif" description="else if block" id="net.sourceforge.phpdt.php.elseif" context="php" enabled="true"
158 >elseif ( ${condition} ) {
159         ${cursor}
160 }</template>
161 <template name="else" description="else block" id="net.sourceforge.phpdt.php.else" context="php" enabled="true"
162 >else {
163         ${cursor}
164 }</template>
165 <template name="filecomment" description="file comment used by the class and interface wizards" id="net.sourceforge.phpdt.php.filecomment" context="php" enabled="true"
166 >/**
167  *      Created on ${date} by ${user}
168  *
169  */</template>
170 <template name="functioncomment" description="function comment" id="net.sourceforge.phpdt.php.functioncomment" context="php" enabled="true"
171 >/**
172  *      @author ${user}
173  *
174  */</template>
175  <template name="echo" description="echo a string" id="net.sourceforge.phpdt.php.echo" context="php" enabled="true"
176  >echo '${string}';</template>
177
178   <!-- phpdoc -->
179
180   <template description="&lt;code&gt;&lt;/code&gt;" name="&lt;code&gt;" id="net.sourceforge.phpdt.phpdoc.code1" context="phpdoc"
181   >&lt;code&gt;${cursor}&lt;/code&gt;</template>
182
183   <template description="&lt;code&gt;null&lt;/code&gt;" name="&lt;code&gt;" id="net.sourceforge.phpdt.phpdoc.code2" context="phpdoc"
184   >&lt;code&gt;null&lt;/code&gt;</template>
185
186   <template description="&lt;pre&gt;&lt;/pre&gt;" name="&lt;pre&gt;" id="net.sourceforge.phpdt.phpdoc.pre" context="phpdoc"
187   >&lt;pre&gt;${cursor}&lt;/pre&gt;</template>
188
189   <template description="&lt;b&gt;&lt;/b&gt;" name="&lt;b&gt;" id="net.sourceforge.phpdt.phpdoc.b" context="phpdoc"
190   >&lt;b&gt;${cursor}&lt;/b&gt;</template>
191
192   <template description="&lt;i&gt;&lt;/i&gt;" name="&lt;i&gt;" id="net.sourceforge.phpdt.phpdoc.i" context="phpdoc"
193   >&lt;i&gt;${cursor}&lt;/i&gt;</template>
194
195   <template name="@abstract" description="abstract" id="net.sourceforge.phpdt.phpdoc.abstract" context="phpdoc" enabled="true">@abstract</template>
196   <template name="@access" description="access private" id="net.sourceforge.phpdt.phpdoc.access1" context="phpdoc" enabled="true">@access private</template>
197   <template name="@access" description="access protected" id="net.sourceforge.phpdt.phpdoc.access2" context="phpdoc" enabled="true">@access protected</template>
198   <template name="@access" description="access public" id="net.sourceforge.phpdt.phpdoc.access3" context="phpdoc" enabled="true">@access public</template>
199   <template name="@author" description="author name" id="net.sourceforge.phpdt.phpdoc.author" context="phpdoc">@author ${user}</template>
200   <template name="@author" description="author name email" id="net.sourceforge.phpdt.phpdoc.author" context="phpdoc" enabled="true">@author ${user} &lt;${email}&gt;</template>
201   <template name="@category" description="category" id="net.sourceforge.phpdt.phpdoc.category" context="phpdoc" enabled="true">@category ${categoryname}</template>
202   <template name="@copyright" description="copyright" id="net.sourceforge.phpdt.phpdoc.copyright" context="phpdoc" enabled="true">@copyright Copyright &amp;copy; ${year}, ${user}</template>
203   <template name="@deprecated" description="deprecated version date" id="net.sourceforge.phpdt.phpdoc.deprected" context="phpdoc" enabled="true">@deprecated ${version} - ${date}</template>
204   <template name="@example" description="example path description" id="net.sourceforge.phpdt.phpdoc.example1" context="phpdoc" enabled="true">@example ${path} ${description}</template>
205   <template name="@final" description="final" id="net.sourceforge.phpdt.phpdoc.final" context="phpdoc" enabled="true">@final</template>
206   <template name="@filesource" description="filesource" id="net.sourceforge.phpdt.phpdoc.filesource" context="phpdoc" enabled="true">@filesource</template>
207   <template name="@global" description="global datatype globalvariable" id="net.sourceforge.phpdt.phpdoc.global1" context="phpdoc" enabled="true">@global ${datatype} $$GLOBALS['${globalvariable}']</template>
208   <template name="@global" description="global datatype description" id="net.sourceforge.phpdt.phpdoc.global2" context="phpdoc" enabled="true">@global ${datatype} ${description}</template>
209   <template name="@ignore" description="ignore" id="net.sourceforge.phpdt.phpdoc.ignore" context="phpdoc" enabled="true">@ignore</template>
210   <template name="@internal " description="internal comment" id="net.sourceforge.phpdt.phpdoc.internal" context="phpdoc" enabled="true">@internal ${comment}</template>
211   <template name="@license" description="license url name" id="net.sourceforge.phpdt.phpdoc.license" context="phpdoc" enabled="true">@license ${url} ${nameoflicense}</template>
212   <template name="@link" description="link url description" id="net.sourceforge.phpdt.phpdoc.link1" context="phpdoc" enabled="true">@link ${url} ${description}</template>
213   <template name="@method" description="method returntype description" id="net.sourceforge.phpdt.phpdoc.method" context="phpdoc" enabled="true">@method ${returntype} ${description}</template>
214   <template name="@name" description="name globalvariable" id="net.sourceforge.phpdt.phpdoc.name" context="phpdoc" enabled="true">@name ${globalvariable}</template>
215   <template name="@package" description="package packagename" id="net.sourceforge.phpdt.phpdoc.package" context="phpdoc" enabled="true">@package ${packagename}</template>
216   <template name="@param" description="param datatype paramname description" id="net.sourceforge.phpdt.phpdoc.param1" context="phpdoc" enabled="true">@param ${datatype} ${paramname} ${description}</template>
217   <template name="@param" description="param datatype paramname" id="net.sourceforge.phpdt.phpdoc.param2" context="phpdoc" enabled="true">@param ${datatype} ${paramname}</template>
218   <template name="@param" description="param datatype1|datatype2 paramname description" id="net.sourceforge.phpdt.phpdoc.param3" context="phpdoc" enabled="true">@param ${datatype1}|${datatype2} ${paramname} ${description}</template>
219   <template name="@property" description="property datatype description" id="net.sourceforge.phpdt.phpdoc.property1" context="phpdoc" enabled="true">@property ${datatype} ${paramname} ${description}</template>
220   <template name="@property-read" description="property-read datatype description" id="net.sourceforge.phpdt.phpdoc.property2" context="phpdoc" enabled="true">@property-read ${datatype} ${paramname} ${description}</template>
221   <template name="@property-write" description="property-write datatype description" id="net.sourceforge.phpdt.phpdoc.property3" context="phpdoc" enabled="true">@property-write ${datatype} ${paramname} ${description}</template>
222   <template name="@return" description="return datatype description" id="net.sourceforge.phpdt.phpdoc.return" context="phpdoc" enabled="true">@return ${datatype} ${description}</template>
223   <template name="@see" description="see element" id="net.sourceforge.phpdt.phpdoc" context="phpdoc.see" enabled="true">@see ${element}</template><template name="@since" description="since version date" id="net.sourceforge.phpdt.phpdoc" context="phpdoc" enabled="true">@since ${version} - ${date}</template>
224   <template name="@since" description="since version/info string [unspecified format]" id="net.sourceforge.phpdt.phpdoc.since" context="phpdoc" enabled="true">@since ${version}</template>
225   <template name="@static" description="static" id="net.sourceforge.phpdt.phpdoc.static" context="phpdoc" enabled="true">@static</template>
226   <template name="@staticvar" description="staticvar datatype description" id="net.sourceforge.phpdt.phpdoc.staticvar" context="phpdoc" enabled="true">@staticvar ${datatype} ${description}</template>
227   <template name="@subpackage" description="subpackage subpackagename" id="net.sourceforge.phpdt.phpdoc.subpackage" context="phpdoc" enabled="true">@subpackage ${subpackagename}</template>
228   <template name="@todo" description="@todo information_string" id="net.sourceforge.phpdt.phpdoc.todo" context="phpdoc" enabled="true">@todo ${information_string}</template>
229   <template name="@tutorial" description="tutorial string description" id="net.sourceforge.phpdt.phpdoc.tutorial" context="phpdoc" enabled="true">@tutorial ${string} ${description}</template>
230   <template name="@uses" description="uses element description" id="net.sourceforge.phpdt.phpdoc.uses" context="phpdoc" enabled="true">@uses ${element} ${description}</template>
231   <template name="@var" description="var datatype description" id="net.sourceforge.phpdt.phpdoc.var" context="phpdoc" enabled="true">@var ${datatype} ${description}</template>
232   <template name="@version" description="version versionstring" id="net.sourceforge.phpdt.phpdoc.version" context="phpdoc" enabled="true">@version ${versionstring}</template>
233
234   <template name="@example" description="inline {@example uri_or_path_to_file startline number_of_lines}" id="net.sourceforge.phpdt.phpdoc.example2" context="phpdoc" enabled="true"
235   >{@example ${uri_or_path_to_file} ${startline} ${number_of_lines}}</template>
236   <template name="@id" description="inline {@id sectionname}" id="net.sourceforge.phpdt.phpdoc.id" context="phpdoc" enabled="true">{@id ${sectionname}}</template>
237   <template name="@internal" description="inline {@internal any_text}}" id="net.sourceforge.phpdt.phpdoc.internal2" context="phpdoc" enabled="true">{@internal ${any_text}}}</template>
238   <template name="@inheritdoc" description="inline {@inheritdoc}" id="net.sourceforge.phpdt.phpdoc.inheritdoc" context="phpdoc" enabled="true">{@inheritdoc}</template>
239   <template name="@link" description="inline {@link URL description}" id="net.sourceforge.phpdt.phpdoc.link2" context="phpdoc" enabled="true">{@link ${URL} ${description}}</template>
240   <template name="@link" description="inline {@link element description}" id="net.sourceforge.phpdt.phpdoc.link3" context="phpdoc" enabled="true">{@link ${element} ${description}}</template>
241   <template name="@source" description="inline {@source}" id="net.sourceforge.phpdt.phpdoc.source1" context="phpdoc" enabled="true">{@source}</template>
242   <template name="@source" description="inline {@source startline}" id="net.sourceforge.phpdt.phpdoc.source2" context="phpdoc" enabled="true">{@source ${startline}}</template>
243   <template name="@source" description="inline {@source startline number_of_lines}" id="net.sourceforge.phpdt.phpdoc.source3" context="phpdoc" enabled="true">{@source ${startline} ${number_of_lines}}</template>
244 </templates>