boolean (boolean handleFinalChoices, @Nullable InputEvent e) { if (myList.getSelectedIndex() == -1) return false; if (getSpeedSearch().isHoldingFilter() && myList.getModel().getSize() == 0) return false; Object[] selectedValues = myList.getSelectedValues(); if (selectedValues.length == 0) return false; ListPopupStep<Object> listStep = getListStep(); Object selectedValue = selectedValues[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<?> && !((MultiSelectionListPopupStep<Object>)listStep).hasSubstep(Arrays.asList(selectedValues)) || !listStep.hasSubstep(selectedValue)) && !handleFinalChoices) return false; disposeChildren(); if (myListModel.getSize() == 0) { disposePopup(e); return true; } valuesSelected(selectedValues); Integer inlineButtonIndex = myList.getSelectedButtonIndex(); if (inlineButtonIndex != null) { InlineActionDescriptor actionDescriptor = myPopupInlineActionsSupport.getInlineAction(selectedValue, inlineButtonIndex, e); if (actionDescriptor.getClosesPopup()) { disposePopup(e); } actionDescriptor.executeAction(); return true; } PopupStep<?> nextStep; try (AccessToken ignore = PopupImplUtil.prohibitFocusEventsInHandleSelect(); AccessToken ignore2 = SlowOperations.startSection(SlowOperations.ACTION_PERFORM)) { if (listStep instanceof MultiSelectionListPopupStep<?>) { nextStep = ((MultiSelectionListPopupStep<Object>)listStep).onChosen(Arrays.asList(selectedValues), handleFinalChoices); } else if (e != null && listStep instanceof ListPopupStepEx<?>) { nextStep = ((ListPopupStepEx<Object>)listStep).onChosen(selectedValue, handleFinalChoices, e); } else { nextStep = listStep.onChosen(selectedValue, handleFinalChoices); } } return handleNextStep(nextStep, selectedValues.length == 1 ? selectedValue : null, e); }