private @NotNull AdditionalIndexableFileSet.AdditionalIndexableRoots collectFilesAndDirectories() {
    Set<VirtualFile> files = new HashSet<>();
    Set<VirtualFile> directories = new HashSet<>();
    for (IndexableSetContributor contributor : myExtensions.get()) {
      for (VirtualFile root : IndexableSetContributor.getRootsToIndex(contributor)) {
        if (root.isDirectory()) {
          directories.add(root);
        }
        else {
          files.add(root);
        }
      }
      if (myProject != null) {
        Set<VirtualFile> projectRoots = IndexableSetContributor.getProjectRootsToIndex(contributor, myProject);
        for (VirtualFile root : projectRoots) {
          if (root.isDirectory()) {
            directories.add(root);
          }
          else {
            files.add(root);
          }
        }
      }
    }
    return new AdditionalIndexableRoots(files, directories);
  }
private @NotNull AdditionalIndexableFileSet.AdditionalIndexableRoots collectFilesAndDirectories()