public static @NotNull GlobalSearchScope directoryScope(@NotNull PsiDirectory directory, boolean withSubdirectories) {
    return GlobalSearchScopesCore.directoryScope(directory, withSubdirectories);
  }
public static @NotNull GlobalSearchScope directoryScope(@NotNull PsiDirectory directory, boolean withSubdirectories)