@NotNull
  private static HyperlinkListener addHrefHandling(@Nullable HyperlinkListener listener,
                                                   @NotNull String hrefTarget,
                                                   @NotNull Runnable handler) {
    return new HyperlinkAdapter() {
      @Override
      protected void hyperlinkActivated(@NotNull HyperlinkEvent e) {
        if (e.getDescription().equals(hrefTarget)) {
          handler.run();
        }
        else if (listener != null) {
          listener.hyperlinkUpdate(e);
        }
      }
    };
  }
@NotNull
  private static HyperlinkListener addHrefHandling(@Nullable HyperlinkListener listener,
                                                   @NotNull String hrefTarget,
                                                   @NotNull Runnable handler)