SearchScope (@NotNull SearchScope originalScope, FileType @NotNull ... fileTypes) { if (originalScope instanceof GlobalSearchScope) { return GlobalSearchScope.getScopeRestrictedByFileTypes( (GlobalSearchScope)originalScope, fileTypes ); } return LocalSearchScope.getScopeRestrictedByFileTypes( (LocalSearchScope)originalScope, fileTypes ); }