void (JList<InspectionPattern> list, @NotNull AnActionButton b) { final AnAction[] children = new AnAction[]{new AddTemplateAction(list, false), new AddTemplateAction(list, true)}; final RelativePoint point = b.getPreferredPopupPoint(); JBPopupFactory.getInstance().createActionGroupPopup(null, new DefaultActionGroup(children), DataManager.getInstance().getDataContext(b.getContextComponent()), JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true).show(point); }