@Nullable
  private static String getLineIndent(@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);
  }
@Nullable
  private static String getLineIndent(@Nullable Project project, @NotNull final Document document, int offset)