private static @Nullable VirtualFile getJarRoot(PsiFile input) {
    final VirtualFile file = input.getVirtualFile();
    if (file == null || !file.isValid() || !(file.getFileType() instanceof ArchiveFileType)) {
      return null;
    }
    return JarFileSystem.getInstance().getJarRootForLocalFile(file);
  }
private static @Nullable VirtualFile getJarRoot(PsiFile input)