void () { List<AnAction> selection = myList.getSelectedValuesList(); if (selection == null || selection.isEmpty()) { return; } int rc = Messages.showOkCancelDialog( this, IdeBundle.message("dialog.message.remove.0.from.recent.projects.list", StringUtil.join(selection, action -> action.getTemplatePresentation().getText(), "'\n'")), IdeBundle.message("dialog.title.remove.recent.project"), CommonBundle.getOkButtonText(), CommonBundle.getCancelButtonText(), Messages.getQuestionIcon()); if (rc == Messages.OK) { for (AnAction projectAction : selection) { removeRecentProjectElement(projectAction); } ListUtil.removeSelectedItems(myList); } }