JBPopup () { DataContext context = DataManager.getInstance().getDataContext(myDropDown); DefaultActionGroup group = new DefaultActionGroup(ContainerUtil.map(myFragment.getVariants(), v -> new DumbAwareAction(myFragment.getVariantName(v)) { @Override public void actionPerformed(@NotNull AnActionEvent e) { myFragment.setSelectedVariant(v); IdeFocusManager.findInstanceByComponent(myButton).requestFocus(myButton, true); } })); return JBPopupFactory.getInstance().createActionGroupPopup(null, group, context, JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true); }