void (@NotNull BuildController controller, @NotNull GradleBuild gradleBuild) { try { forEachModelFetchPhase((__, modelProviders) -> { for (BasicGradleProject gradleProject : gradleBuild.getProjects()) { for (ProjectImportModelProvider modelProvider : modelProviders) { addProjectModels(controller, gradleProject, modelProvider); } } for (ProjectImportModelProvider modelProvider : modelProviders) { addBuildModels(controller, gradleBuild, modelProvider); } }); } catch (Exception e) { // do not fail project import in a preview mode if (!myIsPreviewMode) { throw new ExternalSystemException(e); } } }