void (final String testName, final String contents) { super.beforeActionStarted(testName, contents); final CommonCodeStyleSettings settings = CodeStyle.getSettings(getProject()).getCommonSettings(JavaLanguage.INSTANCE); myElseOnNewLine = settings.ELSE_ON_NEW_LINE; settings.ELSE_ON_NEW_LINE = !contents.contains("else on the same line"); }