IDEA-68003 Java Formatter: Correct formatting of anonymous classes at method call arguments

1. Returned old indent processing for 'child block that doesn't start new line from parent block' use-case;
2. Corrected java blocks indent construction;
This commit is contained in:
Denis Zhdanov
2011-04-14 15:45:42 +04:00
parent 3975825eb4
commit 1bd5fb51dc
4 changed files with 66 additions and 33 deletions
@@ -1372,7 +1372,7 @@ public abstract class AbstractJavaBlock extends AbstractBlock implements JavaBlo
);
}
final boolean rBrace = isRBrace(child);
Indent childIndent = rBrace ? Indent.getNoneIndent() : getCodeBlockInternalIndent(childrenIndent, true);
Indent childIndent = rBrace ? Indent.getNoneIndent() : getCodeBlockInternalIndent(childrenIndent, false);
if (!rBrace && child.getElementType() == JavaElementType.CODE_BLOCK
&& (getBraceStyle() == CommonCodeStyleSettings.NEXT_LINE_SHIFTED
|| getBraceStyle() == CommonCodeStyleSettings.NEXT_LINE_SHIFTED2))