@Override
  protected void showPopup(AnActionEvent e, ListPopup popup) {
    UIThemeLookAndFeelInfo initialLaf = LafManager.getInstance().getCurrentUIThemeLookAndFeel();

    switchAlarm.cancelAllRequests();
    if (Registry.is("ide.instant.theme.switch")) {
      popup.addListSelectionListener(event -> {
        Object item = ((JList<?>)event.getSource()).getSelectedValue();
        if (item instanceof AnActionHolder) {
          AnAction anAction = ((AnActionHolder)item).getAction();
          if (anAction instanceof LafChangeAction) {
            switchAlarm.cancelAllRequests();
            switchAlarm.addRequest(() -> {
              LafChangeAction action = (LafChangeAction)anAction;
              switchLafAndUpdateUI(LafManager.getInstance(), action.myLookAndFeelInfo, false);
            }, Registry.get("ide.instant.theme.switch.delay").asInteger());
          }
        }
      });
    }

    popup.addListener(new JBPopupListener() {
      @Override
      public void onClosed(@NotNull LightweightWindowEvent event) {
        switchAlarm.cancelAllRequests();
        if (Registry.is("ide.instant.theme.switch") && !event.isOk()) {
          switchLafAndUpdateUI(LafManager.getInstance(), initialLaf, false);
        }
      }
    });

    super.showPopup(e, popup);
  }
@Override
  protected void showPopup(AnActionEvent e, ListPopup popup)