fixed bug #1037094 (foreach)
authorjsurfer <jsurfer>
Tue, 5 Oct 2004 18:39:48 +0000 (18:39 +0000)
committerjsurfer <jsurfer>
Tue, 5 Oct 2004 18:39:48 +0000 (18:39 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/CodeFormatter.java

index 420ed30..27e8037 100644 (file)
@@ -612,6 +612,7 @@ public class CodeFormatter implements ITerminalSymbols, ICodeFormatter {
           break;
         case TokenNameswitch:
         case TokenNamefor:
+        case TokenNameforeach:
         case TokenNameif:
         case TokenNamewhile:
           if (openParenthesisCount == openParenthesis.length) {
@@ -722,6 +723,7 @@ public class CodeFormatter implements ITerminalSymbols, ICodeFormatter {
             if (constructionsCount > 0) {
               switch (constructions[constructionsCount - 1]) {
               case TokenNamefor:
+              case TokenNameforeach:
               //indentationLevel += popExclusiveUntilBlock();
               //break;
               case TokenNameswitch:
@@ -1906,7 +1908,8 @@ public class CodeFormatter implements ITerminalSymbols, ICodeFormatter {
     //return (currentToken == TokenNameCOMMA || currentToken ==
     // TokenNameSEMICOLON);
     return currentToken != TokenNameif && currentToken != TokenNameLPAREN && currentToken != TokenNameNOT
-        && currentToken != TokenNamewhile && currentToken != TokenNamefor && currentToken != TokenNameswitch;
+        && currentToken != TokenNamewhile && currentToken != TokenNamefor && currentToken != TokenNameforeach 
+        && currentToken != TokenNameswitch;
   }
 
   /**