GlobalSearchScope (@NotNull Collection<? extends WordRequestInfo> requests) { Set<GlobalSearchScope> scopes = ContainerUtil.map2LinkedSet(requests, r -> (GlobalSearchScope)r.getSearchScope()); return GlobalSearchScope.union(scopes.toArray(GlobalSearchScope.EMPTY_ARRAY)); }