GlobalSearchScope (Module[] modules) { if (modules == null || modules.length == 0) return null; GlobalSearchScope[] scopes = ContainerUtil.map2Array(modules, GlobalSearchScope.class, module -> GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module)); return GlobalSearchScope.union(scopes); }