void (@NotNull AnActionEvent e) { final List<String> names = getSelectedPatchNames(); if (names.isEmpty()) return; if (Messages.showOkCancelDialog(myRepository.getProject(), HgBundle.message("action.hg4idea.mq.delete.confirmation", names.size()), HgBundle.message("delete.confirmation.title"), Messages.getWarningIcon()) == Messages.OK) { Runnable deleteTask = () -> { ProgressManager.getInstance().getProgressIndicator().setText(HgBundle.message("action.hg4idea.mq.delete.progress")); new HgQDeleteCommand(myRepository).executeInCurrentThread(names); }; updatePatchSeriesInBackground(deleteTask); } }