boolean (@NotNull String qualifiedName, @NotNull GlobalSearchScope scope, @NotNull final 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)); }