X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/default-templates.xml b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/default-templates.xml
index cd33d19..d635aae 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/default-templates.xml
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/corext/template/default-templates.xml
@@ -1,186 +1,65 @@
-
-
-
-
-
-
- for (int ${index} = 0; ${index} < ${array}.length; ${index}++) {
- ${cursor}
+class ${class_name} {
+ function ${class_name}() {
+ ${cursor}
+ }
}
+class ${class_name} {
+ var $$${attribute};
+ function ${class_name}() {
+ ${cursor}
+ }
+
+ function set_${attribute}( $$${attr} ) {
+ $$this->${attribute} = $$${attr};
+ }
- for (int ${index} = 0; ${index} < ${array}.length; ${index}++) {
- ${array_type} ${array_element} = ${array}[${index}];
- ${cursor}
+ function get_${attribute}() {
+ return $$this->${attribute};
+ }
}
-
- for (Iterator ${iterator} = ${collection}.iterator(); ${iterator}.hasNext(); ) {
- ${type} ${element} = (${type}) ${iterator}.next();
+for ($$${index} = 0; $$${index} < sizeof($$${array}); $$${index}++) {
${cursor}
}
-
- while (${enumeration}.hasMoreElements()) {
- ${type} ${element} = (${type}) ${enumeration}.nextElement();
+for ($$${index} = 0; $$${index} < sizeof($$${array}); $$${index}++) {
+ $$${array_element} = $$${array}[$$${index}];
${cursor}
}
-
- while (${iterator}.hasNext()) {
- ${type} ${element} = (${type}) ${iterator}.next();
+function ${function_name} () {
${cursor}
}
-
- do {
+function ${function_name} () {
+ return (${cursor});
+}
+while (${condition}) {
${cursor}
-} while (${condition});
-
- switch (${key}) {
+}
+switch (${key}) {
case ${value}:
${cursor}
break;
default:
break;
-}
-
- if (${condition}) {
+}if (${condition}) {
${cursor}
-}
-
- if (${condition}) {
+}if (${condition}) {
${cursor}
} else {
-}
-
- else if (${condition}) {
- ${cursor}
-}
-
- else {
- ${cursor}
-}
-
- try {
+}elseif (${condition}) {
${cursor}
-} catch (${Exception} e) {
-}
-
- catch (${Exception} e) {
- ${cursor}
-}
-
-
-public static void main(String[] args) {
- ${cursor}
-}
-
-
-public ${return_type} ${name}(${arguments}) {
+}else {
${cursor}
}
-
- protected ${return_type} ${name}(${arguments}) {
- ${cursor}
-}
-
- private ${return_type} ${name}(${arguments}) {
- ${cursor}
-}
-
- private static ${return_type} ${name}(${arguments}) {
- ${cursor}
-}
-
- if (${name} instanceof ${type}) {
- ${type} ${new_name} = (${type})${name};
- ${cursor}
-}
-
- ${type} ${new_name} = (${type}) ${name};
-
-
- ${type} ${name} = new ${type}(${arguments});
-
-
- if (${name} == null) {
- ${name} = new ${type}(${arguments});
- ${cursor}
-}
-
-return ${name};
-
-
- (${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]);
-
- /**
- * Created on ${date}
+/**
+ * Created on ${date} by ${user}
*
- * To change this generated comment edit the template variable "filecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of file comments go to
- * Window>Preferences>Java>Code Generation.
- */
-
-/**
+ *//**
* @author ${user}
*
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-
- System.out.println(${cursor});
-
- System.err.println(${cursor});
-
-
-
- <code>${cursor}</code>
-
- <code>null</code>
-
- <pre>${cursor}</pre>
-
- <b>${cursor}</b>
-
- <i>${cursor}</i>
-
- @author ${user}
-
-
+ */
+ echo "${string}";
+ ${cursor}
+
\ No newline at end of file