@Override
  public void appendElementReference(@NotNull StringBuilder buf, RefElement refElement, boolean isPackageIncluded) {
    final HTMLComposerExtension<?> extension = getLanguageExtension(refElement);

    if (extension != null) {
      extension.appendReferencePresentation(refElement, buf, isPackageIncluded);
    } else if (refElement instanceof RefFile || refElement instanceof RefDirectory) {
      buf.append(A_HREF_OPENING).append(((RefElementImpl)refElement).getURL()).append("\">");

      String refElementName = refElement.getName();
      final PsiElement element = refElement.getPsiElement();
      if (element != null) {
        VirtualFile file = PsiUtilCore.getVirtualFile(element);
        if (file != null) {
          refElementName = ProjectUtilCore.displayUrlRelativeToProject(file, file.getPresentableUrl(), element.getProject(), true, false);
        }
      }
      buf.append(refElementName);
      buf.append(A_CLOSING);
    }
  }
@Override
  public void appendElementReference(@NotNull StringBuilder buf, RefElement refElement, boolean isPackageIncluded)