From 328acbc94304d0e6e7122120e5818e5ed7c3999d Mon Sep 17 00:00:00 2001 From: jsurfer Date: Tue, 5 Oct 2004 18:39:48 +0000 Subject: [PATCH] fixed bug #1037094 (foreach) --- .../phpdt/internal/formatter/CodeFormatter.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) 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; } /** -- 1.7.1