private static List<PsiErrorElement> findErrors(PsiFile file) {
    final Collection<PsiErrorElement> errors = PsiTreeUtil.findChildrenOfType(file, PsiErrorElement.class);
    final List<PsiErrorElement> errorList = new ArrayList<>(errors);
    errorList.sort(ERROR_COMPARATOR);
    file.putUserData(ERRORS, errorList);
    return errorList;
  }
private static List<PsiErrorElement> findErrors(PsiFile file)