boolean (@NotNull Project project, @NotNull Document document) { PsiFile file = PsiDocumentManager.getInstance(project).getCachedPsiFile(document); if (file != null) { CommonCodeStyleSettings settings = CodeStyle.getLanguageSettings(file); CommonCodeStyleSettings.IndentOptions indentOptions = settings.getIndentOptions(); return indentOptions != null && indentOptions.KEEP_INDENTS_ON_EMPTY_LINES; } return false; }