static boolean isImplicitlyImported(@Nullable String className, @NotNull PsiJavaFile file) {
    if (className == null) return false;
    for (String packageName : file.getImplicitlyImportedPackages()) {
      if (hasPackage(className, packageName)) return true;
    }
    return false;
  }
static boolean isImplicitlyImported(@Nullable String className, @NotNull PsiJavaFile file)