@Override
  public void appendReferencePresentation(RefEntity refElement, @NotNull StringBuilder buf, boolean capitalize) {
    String message;
    if (refElement instanceof RefImplicitConstructor) {
      message = JavaBundle.message("inspection.export.results.implicit.constructor");
      refElement = ((RefImplicitConstructor)refElement).getOwnerClass();
    }
    else if (refElement instanceof RefParameter) {
      message = AnalysisBundle.message("inspection.export.results.parameter");
    }
    else if (refElement instanceof RefField field) {
      message = field.isEnumConstant() 
                ? AnalysisBundle.message("inspection.export.results.enum.constant")
                : AnalysisBundle.message("inspection.export.results.field");
    }
    else if (refElement instanceof RefMethod method) {
      message = AnalysisBundle.message(
        method.isConstructor() ? "inspection.export.results.constructor" : "inspection.export.results.method");
    }
    else if (refElement instanceof RefClass refClass) {
      if (refClass.isInterface()) {
        message = refClass.isAnnotationType()
                  ? AnalysisBundle.message("inspection.export.results.annotation.type")
                  : AnalysisBundle.message("inspection.export.results.interface");
      }
      else if (refClass.isEnum()) {
        message = AnalysisBundle.message("inspection.export.results.enum.class");
      }
      else if (refClass.isRecord()) {
        message = AnalysisBundle.message("inspection.export.results.record.class");
      }
      else if (refClass.isAbstract()) {
        message = AnalysisBundle.message("inspection.export.results.abstract.class");
      }
      else {
        message = AnalysisBundle.message("inspection.export.results.class");
      }
    }
    else if (refElement instanceof RefFunctionalExpression functionalExpression) {
      message = functionalExpression.isMethodReference()
                ? AnalysisBundle.message("inspection.export.results.method.reference")
                : AnalysisBundle.message("inspection.export.results.lambda.expression");
    }
    else {
      message = "";
    }
    buf.append(capitalize ? Strings.capitalize(message) : message).append(HTMLComposerImpl.NBSP);
    buf.append(HTMLComposerImpl.CODE_OPENING);
    buf.append(HTMLComposerImpl.A_HREF_OPENING);
    buf.append(((RefElementImpl)refElement).getURL());
    if (refElement instanceof RefClass) {
      buf.append("\" qualifiedname=\"").append(XmlStringUtil.escapeString(refElement.getQualifiedName()));
    }
    buf.append("\">");

    if (refElement instanceof RefClass refClass && refClass.isAnonymous() ||
        refElement instanceof RefFunctionalExpression) {
      buf.append(XmlStringUtil.escapeString(AnalysisBundle.message("inspection.reference.anonymous")));
    }
    else if (refElement instanceof RefJavaElement && ((RefJavaElement)refElement).isSyntheticJSP()) {
      buf.append(XmlStringUtil.escapeString(refElement.getName()));
    }
    else if (refElement instanceof RefMethod refMethod) {
      UMethod uMethod = refMethod.getUastElement();
      buf.append(uMethod.getName());
      appendMethodParameters(buf, uMethod.getJavaPsi(), false);
    }
    else {
      buf.append(refElement.getName());
    }

    buf.append(HTMLComposerImpl.A_CLOSING);
    buf.append(HTMLComposerImpl.CODE_CLOSING);

    final RefEntity owner = refElement.getOwner();
    if (owner != null) {
      if (refElement instanceof RefFunctionalExpression ||
          refElement instanceof RefParameter ||
          (refElement instanceof RefClass refClass && refClass.isAnonymous())) {
        buf.append(" ").append(AnalysisBundle.message("inspection.export.results.anonymous.ref.in.owner")).append(" ");
        myComposer.appendElementReference(buf, (RefElement) owner, false);
      }
      else {
        buf.append(" ").append(AnalysisBundle.message("inspection.export.results.anonymous.ref.in.owner")).append(" ");
        buf.append(HTMLComposerImpl.CODE_OPENING);
        if (owner instanceof RefElementImpl) {
          buf.append(HTMLComposerImpl.A_HREF_OPENING);
          buf.append(((RefElementImpl)owner).getURL());
          buf.append("\" qualifiedname=\"").append(XmlStringUtil.escapeString(owner.getQualifiedName()));
          buf.append("\">");
        }
        buf.append(owner.getName());
        if (owner instanceof RefElementImpl) {
          buf.append(HTMLComposerImpl.A_CLOSING);
        }
        buf.append(HTMLComposerImpl.CODE_CLOSING);
      }
    }
  }
@Override
  public void appendReferencePresentation(RefEntity refElement, @NotNull StringBuilder buf, boolean capitalize)