SearchScope (@NotNull Project project, @NotNull SearchScope originalScope, @NotNull LanguageMatcher matcher) { if (originalScope instanceof GlobalSearchScope) { return new FileLanguageGlobalScope(project, (GlobalSearchScope)originalScope, matcher); } else { return LocalSearchScope.getScopeRestrictedByFileLanguage((LocalSearchScope)originalScope, matcher); } }