GlobalSearchScope (final Module[] modules, final ScopeForModuleEvaluator evaluator) { GlobalSearchScope[] scopes = ContainerUtil.map2Array(modules, GlobalSearchScope.class, module -> evaluator.evaluate(module)); return GlobalSearchScope.union(scopes); }