void (@NotNull String path, @Nullable String activeVcsName) { if (LOG.isDebugEnabled()) { LOG.debug("setMapping path = '" + path + "' vcs = " + activeVcsName, new Throwable()); } final VcsDirectoryMapping newMapping = new VcsDirectoryMapping(path, activeVcsName); List<VcsDirectoryMapping> newMappings = new ArrayList<>(myMappings); newMappings.removeIf(mapping -> Objects.equals(mapping.getDirectory(), newMapping.getDirectory())); newMappings.add(newMapping); updateVcsMappings(newMappings); }