mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-58664 Blank Lines Before method body also appear inside try/catch/finally's {}
Refined appliance conditions for 'blank lines before method body' setting
This commit is contained in:
+27
@@ -350,4 +350,31 @@ public class JavaFormatterBlankLinesTest extends AbstractJavaFormatterTest {
|
||||
"}"
|
||||
);
|
||||
}
|
||||
|
||||
public void testBeforeMethodBodyWithCodeBlockInside() {
|
||||
// Inspired by IDEA-54747
|
||||
getSettings().BLANK_LINES_BEFORE_METHOD_BODY = 3;
|
||||
doTextTest(
|
||||
"public class FormattingTest {\n" +
|
||||
" public void foo() {\n" +
|
||||
" System.out.println(\"\");\n" +
|
||||
" try {\n" +
|
||||
" } catch (Exception e) {\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
"}",
|
||||
|
||||
"public class FormattingTest {\n" +
|
||||
" public void foo() {\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
" System.out.println(\"\");\n" +
|
||||
" try {\n" +
|
||||
" } catch (Exception e) {\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
"}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user