void (@NotNull AnActionEvent e) { if (myProjectPaths == null) return; DefaultActionGroup actionGroup = new DefaultActionGroup(); for (@NlsSafe String path : myProjectPaths) { actionGroup.add(new AnAction(path) { @Override public void actionPerformed(@NotNull AnActionEvent e) { ProjectUtil.openOrImport(Path.of(path)); projectOpened(); } }); } JBPopupFactory.getInstance() .createActionGroupPopup(IdeBundle.message("popup.title.open.project"), actionGroup, e.getDataContext(), JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false).showUnderneathOf(Objects.requireNonNull(e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT))); }