new foreach in template fixes #667 submitted by pteague
authorEdward Mann <phpeclipse.dev@edmann.com>
Wed, 20 Feb 2008 19:37:47 +0000 (19:37 +0000)
committerEdward Mann <phpeclipse.dev@edmann.com>
Wed, 20 Feb 2008 19:37:47 +0000 (19:37 +0000)
net.sourceforge.phpeclipse/templates/default-templates.xml

index b8842d0..90c8e86 100644 (file)
        $$${array_element} = $$${array}[$$${index}];
        ${cursor}
 }</template>
+<template name="foreach" description="iterate over array - value" id="net.sourceforge.phpdt.php.foreach1" context="php" enabled="true">foreach ( $$${array} as $$${value} ) {
+       ${cursor}
+}</template>
+<template name="foreach" description="iterate over array - key/value" id="net.sourceforge.phpdt.php.foreach2" context="php" enabled="true">foreach ( $$${array} as $$${key} =&gt; $$${value} ) {
+       ${cursor}
+}</template>
+<template name="try-catch" description="try-catch block - default" id="net.sourceforge.phpdt.php.try1" context="php" enabled="true">try {
+       ${try}
+}</template>
 <template name="try-catch" description="try-catch block - default" id="net.sourceforge.phpdt.php.try1" context="php" enabled="true">try {
        ${try}
 }