private boolean _handleSelect(boolean handleFinalChoices, @Nullable InputEvent e) {
    if (myList.getSelectedIndex() == -1) return false;

    if (getSpeedSearch().isHoldingFilter() && myList.getModel().getSize() == 0) return false;

    java.util.List<Object> selection = myList.getSelectedValuesList();
    if (selection.isEmpty()) return false;
    ListPopupStep<Object> listStep = getListStep();
    Object selectedValue = selection.get(0);

    boolean selectable = listStep.isSelectable(selectedValue);
    boolean preferExecution = listStep.isFinal(selectedValue) && selectable && handleFinalChoices;
    if (!myExecuteExpandedItemOnClick && !preferExecution && myList.getSelectedIndex() == getIndexForShowingChild()) {
      if (myChild != null && !myChild.isVisible()) setIndexForShowingChild(-1);
      return false;
    }
    if (!selectable) return false;

    if ((listStep instanceof MultiSelectionListPopupStep<Object> o && !o.hasSubstep(selection)
         || !listStep.hasSubstep(selectedValue)) &&
        !handleFinalChoices) {
      return false;
    }

    disposeChildren();

    if (myListModel.getSize() == 0) {
      disposePopup(e);
      return true;
    }

    valuesSelected(selection);

    Object onlyItem = ContainerUtil.getOnlyItem(selection);
    if (e instanceof MouseEvent me && onlyItem != null) {
      myMouseMotionListener.updateSelectedButtonIndex(me.getPoint());
    }

    Integer inlineButtonIndex = myList.getSelectedButtonIndex();
    if (inlineButtonIndex != null) {
      KeepPopupOnPerform keepPopup = myInlineActionsSupport.getKeepPopupOnPerform(selectedValue, inlineButtonIndex);
      if (!Utils.isKeepPopupOpen(keepPopup, e)) {
        disposePopup(e);
      }
      myInlineActionsSupport.performAction(selectedValue, inlineButtonIndex, e);
      return true;
    }

    PopupStep<?> nextStep;
    try (AccessToken ignore = PopupImplUtil.prohibitFocusEventsInHandleSelect();
         AccessToken ignore2 = SlowOperations.startSection(SlowOperations.ACTION_PERFORM)) {
      if (listStep instanceof MultiSelectionListPopupStep<Object> o) {
        nextStep = o.onChosen(selection, handleFinalChoices);
      }
      else if (e != null && listStep instanceof ListPopupStepEx<Object> o) {
        nextStep = o.onChosen(selectedValue, handleFinalChoices, e);
      }
      else {
        nextStep = listStep.onChosen(selectedValue, handleFinalChoices);
      }
    }

    if (nextStep == PopupStep.FINAL_CHOICE &&
        onlyItem instanceof PopupFactoryImpl.ActionItem item &&
        Utils.isKeepPopupOpen(item.getKeepPopupOnPerform(), e)) {
      ActionPopupStep actionPopupStep = ObjectUtils.tryCast(getListStep(), ActionPopupStep.class);
      if (actionPopupStep != null && actionPopupStep.isSelectable(item)) {
        actionPopupStep.updateStepItems(getList());
        return false;
      }
    }

    return handleNextStep(nextStep, onlyItem, e);
  }
private boolean _handleSelect(boolean handleFinalChoices, @Nullable InputEvent e)