IDEA-4384 Refactorings should obey "align when multiline"

1. Method parameters/method call arguments are reformatted during method return type/name/modifiers change now (corresponding logic is added at PSI level);
2. Corresponding tests are added;
This commit is contained in:
Denis Zhdanov
2010-10-11 13:04:36 +04:00
parent 5884dd45d7
commit 1012dd0da2
19 changed files with 259 additions and 7 deletions

View File

@@ -39,7 +39,15 @@ public class RenameMethodMultiTest extends MultiFileTestCase {
doTest("pack1.A", "void staticMethod(int i)", "renamedStaticMethod");
}
public void testAlignedMultilineParameters() throws Exception {
getCurrentCodeStyleSettings().ALIGN_MULTILINE_PARAMETERS = true;
getCurrentCodeStyleSettings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
doTest("void test123(int i, int j)", "test123asd");
}
private void doTest(final String methodSignature, final String newName) throws Exception {
doTest(getTestName(false), methodSignature, newName);
}
private void doTest(final String className, final String methodSignature, final String newName) throws Exception {
doTest(new PerformAction() {