public static <K> boolean doProcessAllKeys(@NotNull ID<K, ?> indexId,
                                             @NotNull Processor<? super K> processor,
                                             @NotNull GlobalSearchScope scope,
                                             @Nullable IdFilter idFilter) {
    Project project = scope.getProject();
    InThisThreadProcessor threadProcessor = new InThisThreadProcessor();
    Function<VirtualFile, ? extends Map<K, ?>> indexer = getIndexer(indexId, project, false);
    return processFilesInScope(indexId, scope, false, idFilter, file -> {
      Map<K, ?> map = indexer.apply(file);
      if (map == null) return true;
      return threadProcessor.process(() -> ContainerUtil.process(map.keySet(), processor));
    }) && threadProcessor.processQueue();
  }
public static <K> boolean doProcessAllKeys(@NotNull ID<K, ?> indexId,
                                             @NotNull Processor<? super K> processor,
                                             @NotNull GlobalSearchScope scope,
                                             @Nullable IdFilter idFilter)