public void addExternalRepository(@NotNull VirtualFile root, @NotNull Repository repository) {
    REPO_LOCK.writeLock().lock();
    try {
      myExternalRepositories.put(root, repository);
      updatePathToRootMap();
    }
    finally {
      REPO_LOCK.writeLock().unlock();
    }
  }
public void addExternalRepository(@NotNull VirtualFile root, @NotNull Repository repository)