void (AnActionButton button) { initPopupActions(); final JBPopup popup = JBPopupFactory.getInstance().createListPopup( new BaseListPopupStep<>(null, myPopupActions) { @Override public Icon getIconFor(AddItemPopupAction<?> aValue) { return aValue.getIcon(); } @Override public boolean hasSubstep(AddItemPopupAction<?> selectedValue) { return selectedValue.hasSubStep(); } @Override public boolean isMnemonicsNavigationEnabled() { return true; } @Override public PopupStep onChosen(final AddItemPopupAction<?> selectedValue, final boolean finalChoice) { if (selectedValue.hasSubStep()) { return selectedValue.createSubStep(); } return doFinalStep(() -> selectedValue.execute()); } @Override @NotNull public String getTextFor(AddItemPopupAction<?> value) { return "&" + value.getIndex() + " " + value.getTitle(); } }); final RelativePoint point = button.getPreferredPopupPoint(); popup.show(point); }