public boolean hasTaskOfTypeInProgress(@NotNull ExternalSystemTaskType type,@NotNull Project project){
  String projectId=ExternalSystemTaskId.getProjectId(project);
  for (  ExternalSystemTaskId id : myTasksInProgress.keySet()) {
    if (type.equals(id.getType()) && projectId.equals(id.getIdeProjectId())) {
      return true;
    }
  }
  return false;
}

public boolean hasTaskOfTypeInProgress ( @ NotNull ExternalSystemTaskType type , @ NotNull Project project ) { String projectId = ExternalSystemTaskId . getProjectId ( project ) ; for ( ExternalSystemTaskId id : myTasksInProgress . keySet ( ) ) { if ( type . equals ( id . getType ( ) ) && projectId . equals ( id . getIdeProjectId ( ) ) ) { return true ; } } return false ; }
allows to check if any task of the given type is being executed at the moment .
