boolean (MavenProject mavenProject, boolean forceRead) { var timestamp = calculateTimestamp(mavenProject); boolean timeStampChanged = !timestamp.equals(tree.myTimestamps.get(mavenProject.getFile())); boolean readPom = forceRead || timeStampChanged; if (readPom) { MavenId oldProjectId = mavenProject.isNew() ? null : mavenProject.getMavenId(); MavenId oldParentId = mavenProject.getParentId(); var readChanges = mavenProject.read(generalSettings, explicitProfiles, reader, tree.myProjectLocator); tree.withWriteLock(() -> { tree.clearIDMaps(oldProjectId); tree.myVirtualFileToProjectMapping.put(mavenProject.getFile(), mavenProject); tree.fillIDMaps(mavenProject); }); if (Comparing.equal(oldParentId, mavenProject.getParentId())) { tree.myTimestamps.put(mavenProject.getFile(), timestamp); } else { // ensure timestamp reflects actual parent's timestamp var newTimestamp = calculateTimestamp(mavenProject); tree.myTimestamps.put(mavenProject.getFile(), newTimestamp); } var forcedChanges = forceRead ? MavenProjectChanges.ALL : MavenProjectChanges.NONE; var changes = MavenProjectChangesBuilder.merged(forcedChanges, readChanges); updateContext.updated(mavenProject, changes); } return readPom; }