X-Git-Url: http://git.phpeclipse.com 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 98f4f2c..8d764c4 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 @@ -445,17 +445,17 @@ public class CodeFormatter implements ITerminalSymbols, ICodeFormatter { */ // Do not add a new line between ELSE and IF, if the option elseIfOnSameLine is true. // Fix for 1ETLWPZ: IVJCOM:ALL - incorrect "else if" formatting - if (pendingNewlineAfterParen - && previousCompilableToken == TokenNameelse - && token == TokenNameif - && options.compactElseIfMode) { - pendingNewlineAfterParen = false; - pendingNewLines = 0; - indentationLevel += pop(TokenNameelse); - // because else if is now one single statement, - // the indentation level after it is increased by one and not by 2 - // (else = 1 indent, if = 1 indent, but else if = 1 indent, not 2). - } +// if (pendingNewlineAfterParen +// && previousCompilableToken == TokenNameelse +// && token == TokenNameif +// && options.compactElseIfMode) { +// pendingNewlineAfterParen = false; +// pendingNewLines = 0; +// indentationLevel += pop(TokenNameelse); +// // because else if is now one single statement, +// // the indentation level after it is increased by one and not by 2 +// // (else = 1 indent, if = 1 indent, but else if = 1 indent, not 2). +// } // Add a newline & indent to the formatted source string if // a for/if-else/while statement was scanned and there is no block // following it. @@ -1121,7 +1121,7 @@ public class CodeFormatter implements ITerminalSymbols, ICodeFormatter { return new ConfigurableOption[] { new ConfigurableOption(componentName, "newline.openingBrace", locale, options.newLineBeforeOpeningBraceMode ? 0 : 1), //$NON-NLS-1$ new ConfigurableOption(componentName, "newline.controlStatement", locale, options.newlineInControlStatementMode ? 0 : 1), //$NON-NLS-1$ new ConfigurableOption(componentName, "newline.clearAll", locale, options.clearAllBlankLinesMode ? 0 : 1), //$NON-NLS-1$ - new ConfigurableOption(componentName, "newline.elseIf", locale, options.compactElseIfMode ? 0 : 1), //$NON-NLS-1$ +// new ConfigurableOption(componentName, "newline.elseIf", locale, options.compactElseIfMode ? 0 : 1), //$NON-NLS-1$ new ConfigurableOption(componentName, "newline.emptyBlock", locale, options.newLineInEmptyBlockMode ? 0 : 1), //$NON-NLS-1$ new ConfigurableOption(componentName, "line.split", locale, options.maxLineLength), //$NON-NLS-1$ new ConfigurableOption(componentName, "style.compactAssignment", locale, options.compactAssignmentMode ? 0 : 1), //$NON-NLS-1$