private boolean processDirectories(@NotNull String qualifiedName,
                                     @NotNull GlobalSearchScope scope,
                                     final @NotNull Processor<? super VirtualFile> processor) {
    //TODO use some generic approach
    if (scope instanceof EverythingGlobalScope) {
      scope = ALL_SCOPE;
    }
    @NotNull GlobalSearchScope finalScope = scope;
    return ContainerUtil.process(getCache(scope).getDirectoriesByPackageName(qualifiedName),
                                 file -> !finalScope.contains(file) || processor.process(file));
  }
private boolean processDirectories(@NotNull String qualifiedName,
                                     @NotNull GlobalSearchScope scope,
                                     final @NotNull Processor<? super VirtualFile> processor)