@NotNull
  private Predicate<FileIndexingRequest> filesToBeIndexedForProjectCondition(Project project) {
    return indexingRequest -> {
      if (indexingRequest.isDeleteRequest() || !indexingRequest.getFile().isValid()) {
        return true;
      }

      for (Pair<IndexableFileSet, Project> set : myIndexableSets) {
        final Project proj = set.second;
        if (proj != null && !proj.equals(project)) {
          continue; // skip this set as associated with a different project
        }
        if (ReadAction.compute(() -> set.first.isInSet(indexingRequest.getFile()))) {
          return true;
        }
      }
      return false;
    };
  }
@NotNull
  private Predicate<FileIndexingRequest> filesToBeIndexedForProjectCondition(Project project)