private static @NotNull HighlightInfo.Builder createErrorElementInfoWithoutFixes(@NotNull PsiErrorElement element) {
    TextRange range = element.getTextRange();
    String errorDescription = element.getErrorDescription();
    if (!range.isEmpty()) {
      return HighlightInfo
        .newHighlightInfo(HighlightInfoType.ERROR)
        .range(element)
        .descriptionAndTooltip(errorDescription);
    }
    int offset = range.getStartOffset();
    PsiFile containingFile = element.getContainingFile();
    int fileLength = containingFile.getTextLength();
    FileViewProvider viewProvider = containingFile.getViewProvider();
    PsiElement elementAtOffset = viewProvider.findElementAt(offset, LanguageUtil.getRootLanguage(element));
    String text = elementAtOffset == null ? null : elementAtOffset.getText();
    if (offset < fileLength && text != null && !StringUtil.startsWithChar(text, '\n') && !StringUtil.startsWithChar(text, '\r')) {
      return HighlightInfo
        .newHighlightInfo(HighlightInfoType.ERROR)
        .range(offset, offset + 1)
        .descriptionAndTooltip(errorDescription);
    }
    int start = offset;
    int end = offset == 0 ? Math.min(offset + 1, fileLength) : offset;
    return HighlightInfo
      .newHighlightInfo(HighlightInfoType.ERROR)
      .range(element, start, end)
      .descriptionAndTooltip(errorDescription)
      .endOfLine();
  }
private static @NotNull HighlightInfo.Builder createErrorElementInfoWithoutFixes(@NotNull PsiErrorElement element)