public boolean isTaskOfPhase(@NotNull TaskData taskData, @NotNull Phase phase) {
    final ExternalProjectsStateProvider stateProvider = ExternalProjectsManagerImpl.getInstance(myProject).getStateProvider();
    final TaskActivationState taskActivationState =
      stateProvider.getTasksActivation(taskData.getOwner(), taskData.getLinkedExternalProjectPath());
    if (taskActivationState == null) {
      return false;
    }

    return taskActivationState.getTasks(phase).contains(taskData.getName());
  }
public boolean isTaskOfPhase(@NotNull TaskData taskData, @NotNull Phase phase)