void () { CodeStyleSettings settings = getCodeStyleSettings(); settings.getCommonSettings(JavaLanguage.INSTANCE).BRACE_STYLE = CommonCodeStyleSettings.NEXT_LINE; doTextTest("java", """ class Foo { void foo() { switch (a) {<caret> } } }""", """ class Foo { void foo() { switch (a) { <caret> } } }"""); doTextTest("java", """ class Foo { void foo() { switch (a) { case 1: { }<caret> } } }""", """ class Foo { void foo() { switch (a) { case 1: { } <caret> } } }"""); doTextTest("java", """ class Foo { void foo() { switch (a) { case 1: foo();<caret> } } }""", """ class Foo { void foo() { switch (a) { case 1: foo(); <caret> } } }"""); doTextTest("java", """ class Foo { void foo() { switch (a) { case 1: foo(); break;<caret> } } }""", """ class Foo { void foo() { switch (a) { case 1: foo(); break; <caret> } } }"""); doTextTest("java", """ class Foo { void foo() { switch (a) { case 1: foo(); return;<caret> } } }""", """ class Foo { void foo() { switch (a) { case 1: foo(); return; <caret> } } }"""); }