private static boolean isFirstInFile(@NotNull PsiElement element) {
      if (element.getTextRange().getStartOffset() == 0) return true;
      final PsiWhiteSpace prevWhitespace = as(PsiTreeUtil.prevLeaf(element), PsiWhiteSpace.class);
      return prevWhitespace != null && prevWhitespace.getTextRange().getStartOffset() == 0;
    }
private static boolean isFirstInFile(@NotNull PsiElement element)