private static void surroundWithHref(@NotNull StringBuilder anchor, PsiElement element, final boolean isValue) {
    if (element != null) {
      final PsiElement parent = element.getParent();
      PsiElement elementToLink = isValue ? parent.getFirstChild() : parent.getLastChild();
      if (elementToLink != null) {
        HTMLComposer.appendAfterHeaderIndention(anchor);
        HTMLComposer.appendAfterHeaderIndention(anchor);
        String link = "";
        final PsiFile file = element.getContainingFile();
        if (file != null) {
          final VirtualFile virtualFile = file.getVirtualFile();
          if (virtualFile != null) {
            link = virtualFile.getUrl() + "#" + elementToLink.getTextRange().getStartOffset();
          }
        }
        HtmlChunk.link(link, elementToLink.getText().replaceAll("\\$", "\\\\\\$")).appendTo(anchor);
        compoundLineLink(anchor, element);
        anchor.append("<br>");
      }
    }
    else {
      HtmlChunk.tag("font")
        .style("font-family:verdana; font-weight:bold; color:#FF0000")
        .addText(PropertiesBundle.message("inspection.export.results.invalidated.item")).appendTo(anchor);
    }
  }
private static void surroundWithHref(@NotNull StringBuilder anchor, PsiElement element, final boolean isValue)