void (@NotNull List<VcsDirectoryMapping> mappings) { myRootUpdateQueue.cancelAllUpdates(); List<VcsDirectoryMapping> newMappings = List.copyOf(ContainerUtil.sorted(removeDuplicates(mappings), MAPPINGS_COMPARATOR)); synchronized (myUpdateLock) { boolean mappingsChanged = !myMappings.equals(newMappings); if (!mappingsChanged) return; // mappings are up-to-date myMappings = newMappings; dumpMappingsToLog(); } updateActiveVcses(false); if (ApplicationManager.getApplication().isDispatchThread() && ContainerUtil.exists(newMappings, it -> it.isDefaultMapping())) { updateMappedRootsFast(); scheduleMappedRootsUpdate(); } else { updateMappedRoots(false); } notifyMappingsChanged(); }