private static @Nullable @NlsSafe String generateLink(@NotNull PsiElement element,
                                                        String label) {
    String refText = JavaDocUtil.getReferenceText(element.getProject(), element);
    if (refText != null) {
      StringBuilder linkBuilder = new StringBuilder();
      DocumentationManagerUtil.createHyperlink(linkBuilder, refText, label, false);
      return linkBuilder.toString();
    }
    return null;
  }
private static @Nullable @NlsSafe String generateLink(@NotNull PsiElement element,
                                                        String label)