private static @Nullable VirtualFile getRootForPath(@Nullable FilePath file, @NotNull ProjectLevelVcsManager vcsManager) {
    return file == null ? null : vcsManager.getVcsRootFor(file);
  }
private static @Nullable VirtualFile getRootForPath(@Nullable FilePath file, @NotNull ProjectLevelVcsManager vcsManager)