String (@Nullable Project project, @NotNull final Document document, int offset) { if (project == null) return null; PsiDocumentManager.getInstance(project).commitDocument(document); return CodeStyleManager.getInstance(project).getLineIndent(document, offset); }