private static @Nullable VersionRootInfo getVersionRootInfo(@NotNull VirtualFile file) {
    VirtualFile root = VfsUtilCore.getRootFile(file);
    if (!(root.getFileType() instanceof ArchiveFileType)) return null;

    VirtualFile parent = file.getParent();
    while (parent != null && !parent.equals(root)) {
      LanguageLevel level = getVersionForVersionRoot(root, parent);
      if (level != null) {
        return new VersionRootInfo(level, parent, root);
      }
      parent = parent.getParent();
    }
    return null;
  }
private static @Nullable VersionRootInfo getVersionRootInfo(@NotNull VirtualFile file)