From: jsurfer Date: Tue, 5 Oct 2004 18:39:48 +0000 (+0000) Subject: fixed bug #1037094 (foreach) X-Git-Url: http://git.phpeclipse.com fixed bug #1037094 (foreach) --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/CodeFormatter.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/CodeFormatter.java index 420ed30..27e8037 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/CodeFormatter.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/formatter/CodeFormatter.java @@ -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; } /**