private static int getTabSize(@NotNull PsiElement element) {
    PsiFile file = element.getContainingFile();
    return file == null ? 1 : Math.max(1, CodeStyle.getIndentOptions(file).TAB_SIZE);
  }
private static int getTabSize(@NotNull PsiElement element)