GlobalSearchScope (@NotNull GlobalSearchScope scope) { if (scope instanceof FileLanguageGlobalScope) { FileLanguageGlobalScope other = (FileLanguageGlobalScope)scope; if (myBaseScope == other.myBaseScope) { Collection<LanguageMatcher> intersection = ContainerUtil.union(myLanguageMatchers, other.myLanguageMatchers); return new FileLanguageGlobalScope(myProject, myBaseScope, intersection); } } return super.uniteWith(scope); }