blic void setBalloon(@NotNull Balloon balloon) {
    var oldBalloon = myBalloonRef.getAndSet(new WeakReference<>(balloon));
    hideBalloon(oldBalloon);
    balloon.addListener(new JBPopupListener() {
      @Override
      public void onClosed(@NotNull LightweightWindowEvent event) {
        myBalloonRef.updateAndGet(prev -> SoftReference.dereference(prev) == balloon ? null : prev);
      }
    });
  }


blic void setBalloon(@NotNull Balloon balloon) {