Set<ProjectImportModelProvider> (boolean isProjectsLoadedAction) { if (myUseProjectsLoadedPhase) { if (isProjectsLoadedAction) { return myModelProviders.stream() .filter(it -> it.getPhase().equals(GradleModelFetchPhase.PROJECT_LOADED_PHASE)) .collect(Collectors.toSet()); } return myModelProviders.stream() .filter(it -> !it.getPhase().equals(GradleModelFetchPhase.PROJECT_LOADED_PHASE)) .collect(Collectors.toSet()); } return myModelProviders; }