String (@NotNull Editor editor, @Nullable Language language, int offset, boolean allowDocCommit) { Project project = editor.getProject(); if (project == null) return null; LineIndentProvider lineIndentProvider = LineIndentProviderEP.findLineIndentProvider(language); String indent = lineIndentProvider != null ? lineIndentProvider.getLineIndent(project, editor, language, offset) : null; if (Strings.areSameInstance(indent, LineIndentProvider.DO_NOT_ADJUST)) { return allowDocCommit ? null : indent; } return indent != null ? indent : allowDocCommit ? getLineIndent(project, editor.getDocument(), offset) : null; }