private static void disableLink(@NotNull final HyperlinkEvent event, @Nullable final String linkText) {
    if (event.getSource() instanceof MyJEditorPane) {
      UIUtil.invokeLaterIfNeeded(() -> {
        final MyJEditorPane editorPane = (MyJEditorPane)event.getSource();
        editorPane.myElement.addDisabledLink(event.getDescription(), linkText);
        editorPane.myElement.updateStyle(editorPane, null, null, true, false);
      });
    }
  }
private static void disableLink(@NotNull final HyperlinkEvent event, @Nullable final String linkText)