void () { getCurrentCodeStyleSettings().getCommonSettings(JavaLanguage.INSTANCE).getIndentOptions().KEEP_INDENTS_ON_EMPTY_LINES = true; init( """ public class Main { public static void main(String[] args) { <selection>if (args.length > 2) { \s \s System.out.println("Too many args"); }</selection> } } """, JavaFileType.INSTANCE); executeAction(IdeActions.ACTION_EDITOR_AUTO_INDENT_LINES); checkResultByText( """ public class Main { public static void main(String[] args) { if (args.length > 2) { \s \s System.out.println("Too many args"); } } } """); }