public static @NotNull VirtualFile getRootFile(@NotNull VirtualFile file) {
    while (true) {
      VirtualFile parent = file.getParent();
      if (parent == null) {
        break;
      }
      file = parent;
    }
    return file;
  }
public static @NotNull VirtualFile getRootFile(@NotNull VirtualFile file)