int (PsiElement statement) { CodeStyleSettings settings = CodeStyle.getSettings(statement.getContainingFile()); final CommonCodeStyleSettings codeStyleSettings = settings.getCommonSettings(JavaLanguage.INSTANCE); if (statement instanceof PsiIfStatement) { return codeStyleSettings.IF_BRACE_FORCE; } if (statement instanceof PsiWhileStatement) { return codeStyleSettings.WHILE_BRACE_FORCE; } if (statement instanceof PsiForStatement) { return codeStyleSettings.FOR_BRACE_FORCE; } if (statement instanceof PsiDoWhileStatement) { return codeStyleSettings.DOWHILE_BRACE_FORCE; } return CommonCodeStyleSettings.DO_NOT_FORCE; }