@Override
  public @Nullable PsiPackage findPackage(@NotNull String packageName) {
    Query<VirtualFile> dirs = PackageIndex.getInstance(myManager.getProject()).getDirsByPackageName(packageName, true);
    if (dirs.findFirst() == null) return null;
    return new PsiPackageImpl(myManager, packageName);
  }
@Override
  public @Nullable PsiPackage findPackage(@NotNull String packageName)