@Override
  public void setSelected(@NotNull AnActionEvent e, boolean state) {
    final ProjectSystemId projectSystemId = getSystemId(e);
    final List<ExternalSystemNode<ExternalConfigPathAware>> projectNodes = getProjectNodes(e);
    if (projectNodes.isEmpty()) return;

    final Project project = getProject(e);
    ExternalSystemActionsCollector.trigger(project, projectSystemId, this, e);

    projectNodes.forEach(projectNode -> projectNode.setIgnored(state));

    Set<DataNode<ProjectData>> uniqueExternalProjects = projectNodes.stream()
      .map(
        projectNode -> {
          final String externalProjectPath = projectNode.getData().getLinkedExternalProjectPath();
          final ExternalProjectInfo externalProjectInfo =
            ExternalSystemUtil.getExternalProjectInfo(project, projectSystemId, externalProjectPath);
          final DataNode<ProjectData> projectDataNode =
            externalProjectInfo == null ? null : externalProjectInfo.getExternalProjectStructure();

          if (projectDataNode == null && LOG.isDebugEnabled()) {
            LOG.debug(String.format("external project data not found, path: %s, data: %s", externalProjectPath, externalProjectInfo));
          }
          return projectDataNode;
        }
      )
      .filter(Objects::nonNull)
      .collect(Collectors.toSet());

    // async import to not block UI on big projects
    ProgressManager.getInstance().run(new Task.Backgroundable(project, e.getPresentation().getText(), false) {
      @Override
      public void run(@NotNull ProgressIndicator indicator) {
        uniqueExternalProjects.forEach(
          externalProjectInfo -> ProjectDataManager.getInstance().importData(externalProjectInfo, project)
        );
      }
    });
  }
@Override
  public void setSelected(@NotNull AnActionEvent e, boolean state)