static void addMatchingProviders(@NotNull PsiElement position,
                                   @NotNull ProviderInfo<ElementPattern<?>> @Nullable [] providerList,
                                   @NotNull Collection<? super ProviderInfo<ProcessingContext>> output,
                                   @NotNull PsiReferenceService.Hints hints) {
    if (providerList == null) return;
    SharedProcessingContext sharedProcessingContext = new SharedProcessingContext();

    for (ProviderInfo<ElementPattern<?>> info : providerList) {
      if (hints != PsiReferenceService.Hints.NO_HINTS && !info.provider.acceptsHints(position, hints)) {
        continue;
      }

      ProcessingContext context = new ProcessingContext(sharedProcessingContext);
      boolean suitable = false;
      try {
        suitable = info.processingContext.accepts(position, context);
      }
      catch (IndexNotReadyException ignored) {
      }
      if (suitable) {
        output.add(new ProviderInfo<>(info.provider, context, info.priority));
      }
    }
  }
static void addMatchingProviders(@NotNull PsiElement position,
                                   @NotNull ProviderInfo<ElementPattern<?>> @Nullable [] providerList,
                                   @NotNull Collection<? super ProviderInfo<ProcessingContext>> output,
                                   @NotNull PsiReferenceService.Hints hints)