MavenProjectsTreeUpdateResult (MavenProjectReader projectReader, Collection<VirtualFile> files, MavenExplicitProfiles explicitProfiles, MavenGeneralSettings generalSettings, ProgressIndicator process) { UpdateContext updateContext = new UpdateContext(); Set<MavenProject> inheritorsToUpdate = new HashSet<>(); for (VirtualFile each : files) { MavenProject mavenProject = findProject(each); if (mavenProject == null) continue; inheritorsToUpdate.addAll(findInheritors(mavenProject)); doDelete(findAggregator(mavenProject), mavenProject, updateContext); } inheritorsToUpdate.removeAll(updateContext.getDeletedProjects()); var updater = new MavenProjectsTreeUpdater(this, explicitProfiles, updateContext, projectReader, generalSettings, process, false); var updateSpecs = new ArrayList<UpdateSpec>(); for (MavenProject mavenProject : inheritorsToUpdate) { updateSpecs.add(new UpdateSpec(mavenProject.getFile(), false)); } updater.updateProjects(updateSpecs); for (MavenProject mavenProject : inheritorsToUpdate) { if (reconnectRoot(mavenProject)) { updateContext.updated(mavenProject, MavenProjectChanges.NONE); } } updateExplicitProfiles(); updateContext.fireUpdatedIfNecessary(); return updateContext.toUpdateResult(); }