@RequiresEdt
    private static void recreateMyPopup(@NotNull IntentionHintComponent.IntentionPopup popup, @NotNull ListPopupStep<IntentionActionWithTextCaching> step) {
      if (popup.myListPopup != null) {
        Disposer.dispose(popup.myListPopup);
      }
      if (popup.myDisposed || popup.myEditor.isDisposed()) {
        popup.myListPopup = null;
        return;
      }
      popup.myListPopup = JBPopupFactory.getInstance().createListPopup(step);
      popup.myPreviewHandler = popup.getPreviewHandler();
      if (popup.myListPopup instanceof WizardPopup wizardPopup) {
        Shortcut[] shortcuts = KeymapUtil.getActiveKeymapShortcuts(IdeActions.ACTION_SHOW_INTENTION_ACTIONS).getShortcuts();
        for (Shortcut shortcut : shortcuts) {
          if (shortcut instanceof KeyboardShortcut keyboardShortcut && keyboardShortcut.getSecondKeyStroke() == null) {
            wizardPopup.registerAction(
              "activateSelectedElement", keyboardShortcut.getFirstKeyStroke(),
              createAction(e -> popup.myListPopup.handleSelect(true))
            );
          }
        }

        popup.registerIntentionShortcuts();
      }

      HighlightingContext context = new HighlightingContext(popup);

      ListPopupImpl list = ObjectUtils.tryCast(popup.myListPopup, ListPopupImpl.class);

      ListSelectionListener selectionListener = e -> {
        Object source = e.getSource();

        if (source instanceof JList<?> curList) {
          Object selectedItem = curList.getSelectedValue();
          if (selectedItem instanceof IntentionActionWithTextCaching actionWithCaching) {
            highlightOnHover(actionWithCaching, context, popup);
            return;
          }
        }
        context.dropHighlight();
      };
      popup.myListPopup.addListSelectionListener(selectionListener);

      popup.myListPopup.addListener(new JBPopupListener() {
        @Override
        public void beforeShown(@NotNull LightweightWindowEvent event) {
          Object selectedValue = list == null ? null : list.getList().getSelectedValue();
          if (selectedValue instanceof IntentionActionWithTextCaching actionWithTextCaching) {
            highlightOnHover(actionWithTextCaching, context, popup);
          }
        }

        @Override
        public void onClosed(@NotNull LightweightWindowEvent event) {
          context.dropHighlight();
          popup.myPopupShown = false;
        }
      });

      if (popup.myEditor.isOneLineMode()) {
        // hide popup on combobox popup show
        JComboBox<?> comboBox = findAncestorCombo(popup.myEditor);
        if (comboBox != null) {
          popup.myOuterComboboxPopupListener = new PopupMenuListenerAdapter() {
            @Override
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
              popup.myHint.hide();
            }
          };

          comboBox.addPopupMenuListener(popup.myOuterComboboxPopupListener);
        }
      }

      Disposer.register(popup, popup.myListPopup);
      Disposer.register(popup.myListPopup, ThreadingAssertions::assertEventDispatchThread);
    }
@RequiresEdt
    private static void recreateMyPopup(@NotNull IntentionHintComponent.IntentionPopup popup, @NotNull ListPopupStep<IntentionActionWithTextCaching> step)