boolean (boolean delegatedBuild, @NotNull String linkedProjectPath) { ExternalProjectInfo projectInfo = ProjectDataManager.getInstance().getExternalProjectData(project, GradleConstants.SYSTEM_ID, linkedProjectPath); if (projectInfo == null) return false; String buildNumber = projectInfo.getBuildNumber(); if (buildNumber == null) return false; final DataNode<ProjectData> projectStructure = projectInfo.getExternalProjectStructure(); if (projectStructure == null) return false; String title = ExternalSystemBundle.message("progress.refresh.text", projectStructure.getData().getExternalName(), projectInfo.getProjectSystemId().getReadableName()); ProgressManager.getInstance().run(new Task.Backgroundable(project, title, false) { @Override public void run(@NotNull ProgressIndicator indicator) { UnindexedFilesScannerExecutor.getInstance(project).suspendScanningAndIndexingThenRun(title, () -> { for (DataNode<ModuleData> moduleDataNode : findAll(projectStructure, ProjectKeys.MODULE)) { moduleDataNode.getData().useExternalCompilerOutput(delegatedBuild); for (DataNode<GradleSourceSetData> sourceSetDataNode : findAll(moduleDataNode, GradleSourceSetData.KEY)) { sourceSetDataNode.getData().useExternalCompilerOutput(delegatedBuild); } configureExcludeOutDir(moduleDataNode, delegatedBuild); } ProjectDataManager.getInstance().importData(projectStructure, project); }); } }); return true; }