void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); AnAction onlyAction = ActionGroupUtil.getSingleActiveAction(getGroup(), event); presentation.setText(onlyAction != null ? HtmlToolsBundle.message("html.action.open_in.list.prefix") + " " + onlyAction.getTemplatePresentation().getText() : HtmlToolsBundle.message("html.action.open_in.list.popup.title")); DataContext dataContext = event.getDataContext(); Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) { presentation.setEnabled(false); return; } Editor editor = CommonDataKeys.EDITOR.getData(dataContext); if (editor == null) { presentation.setEnabled(false); return; } presentation.setEnabled(!ActionGroupUtil.isGroupEmpty(getGroup(), event)); // }