@Override
      public void update(@NotNull AnActionEvent 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());
        }
      }
@Override
      public void update(@NotNull AnActionEvent e)