public static void setMasterPopup(@NotNull Component owner, @Nullable JBPopup master) {
    if (owner instanceof JComponent) {
      HelpTooltip tooltip = (HelpTooltip)((JComponent)owner).getClientProperty(TOOLTIP_PROPERTY);
      if (tooltip != null && tooltip.myPopup != master) {
        WeakReference<JBPopup> popupRef = new WeakReference<>(master);
        tooltip.masterPopupOpenCondition = () -> {
          JBPopup popup = SoftReference.dereference(popupRef);
          return popup == null || !popup.isVisible();
        };
      }
    }
  }
public static void setMasterPopup(@NotNull Component owner, @Nullable JBPopup master)