private @NotNull Processor<VirtualFile> wrapUsageProcessor(@NotNull FindUsagesProcessPresentation processPresentation,
                                                             @NotNull Processor<? super UsageInfo> usageConsumer) {
    AtomicInteger occurrenceCount = new AtomicInteger();
    Map<VirtualFile, Set<UsageInfo>> usagesBeingProcessed = new ConcurrentHashMap<>();
    AtomicBoolean reportedFirst = new AtomicBoolean();

    StringSearcher searcher = myFindModel.isRegularExpressions() || StringUtil.isEmpty(myFindModel.getStringToFind()) ? null :
                              new StringSearcher(myFindModel.getStringToFind(), myFindModel.isCaseSensitive(), true);

    ClientId currentClientId = ClientId.getCurrent();

    return virtualFile -> {
      try (AccessToken ignored = ClientId.withClientId(currentClientId)) {
        return processFindInFilesUsagesInFile(processPresentation, usageConsumer, occurrenceCount,
                                              usagesBeingProcessed, reportedFirst, searcher,
                                              virtualFile);
      }
    };
  }
private @NotNull Processor<VirtualFile> wrapUsageProcessor(@NotNull FindUsagesProcessPresentation processPresentation,
                                                             @NotNull Processor<? super UsageInfo> usageConsumer)