void (@NotNull AnActionEvent e) { super.updateButton(e); Presentation presentation = e.getPresentation(); if (ContainerUtil.and(getSelectedElements(), new FilteringIterator.InstanceOf<>(ExcludedRootElement.class))) { presentation.setText(JavaUiBundle.message("action.text.cancel.exclusion")); } else { presentation.setText(getTemplatePresentation().getText()); } }