static <K> @Nullable Boolean processAllKeys(@NotNull ID<K, ?> indexId,
                                              @NotNull Processor<? super K> processor,
                                              @NotNull GlobalSearchScope scope,
                                              @Nullable IdFilter idFilter) {
    if (indexId == FilenameIndex.NAME && FileBasedIndexExtension.USE_VFS_FOR_FILENAME_INDEX) {
      ensureUpToDate(indexId);
      //noinspection unchecked
      return FSRecords.processAllNames((Processor<CharSequence>)processor);
    }
    else if (indexId == FileTypeIndex.NAME && Registry.is("indexing.filetype.over.vfs")) {
      InThisThreadProcessor threadProcessor = new InThisThreadProcessor();
      return processFilesInScope(indexId, scope, true, idFilter, file -> {
        //noinspection unchecked
        K fileType = (K)file.getFileType();
        return threadProcessor.process(() -> processor.process(fileType));
      }) && threadProcessor.processQueue();
    }
    else if (indexId == IdIndex.NAME && Registry.is("indexing.id.over.vfs")) {
      return doProcessAllKeys(indexId, processor, scope, idFilter);
    }
    return null;
  }
static <K> @Nullable Boolean processAllKeys(@NotNull ID<K, ?> indexId,
                                              @NotNull Processor<? super K> processor,
                                              @NotNull GlobalSearchScope scope,
                                              @Nullable IdFilter idFilter)