void () { CodeStyleSettings settings = CodeStyle.getSettings(getProject()); CommonCodeStyleSettings javaSettings = settings.getCommonSettings(JavaLanguage.INSTANCE); boolean oldSetting = javaSettings.KEEP_SIMPLE_METHODS_IN_ONE_LINE; try { javaSettings.KEEP_SIMPLE_METHODS_IN_ONE_LINE = true; super.doTest(); } finally { javaSettings.KEEP_SIMPLE_METHODS_IN_ONE_LINE = oldSetting; } }