@ApiStatus.Experimental
  @Contract(pure = true)
  public static @NotNull SearchScope restrictScopeToFileLanguage(@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);
    }
  }
@ApiStatus.Experimental
  @Contract(pure = true)
  public static @NotNull SearchScope restrictScopeToFileLanguage(@NotNull Project project,
                                                                 @NotNull SearchScope originalScope,
                                                                 @NotNull LanguageMatcher matcher)