IDEA-79806 Apply aligning of chained method calls in columns to fields

This commit is contained in:
Denis.Zhdanov
2012-01-13 14:05:30 +04:00
parent 04a201bba4
commit 9928d716dc
2 changed files with 38 additions and 5 deletions
@@ -36,6 +36,18 @@ public class JavaFormatterAlignmentTest extends AbstractJavaFormatterTest {
doTest();
}
public void testMethodAndChainedField() throws Exception {
// Inspired by IDEA-79806
getSettings().ALIGN_MULTILINE_CHAINED_METHODS = true;
doMethodTest(
"Holder.INSTANCE\n" +
" .foo();",
"Holder.INSTANCE\n" +
" .foo();"
);
}
public void testMultipleMethodAnnotationsCommentedInTheMiddle() throws Exception {
getSettings().BLANK_LINES_AFTER_CLASS_HEADER = 1;
getSettings().getRootSettings().getIndentOptions(StdFileTypes.JAVA).INDENT_SIZE = 4;