@NotNull
  public static List<ExcludePolicyDescriptor> collectDescriptors(@NotNull Project project) {
    Set<Sdk> sdks = new HashSet<>();
    for (Module module : ModuleManager.getInstance(project).getModules()) {
      Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
      if (sdk != null) {
        sdks.add(sdk);
      }
    }
    Set<VirtualFile> roots = new HashSet<>();
    for (Sdk sdk : sdks) {
      roots.addAll(Arrays.asList(sdk.getRootProvider().getFiles(OrderRootType.CLASSES)));
    }
    List<ExcludePolicyDescriptor> excludePolicies = new ArrayList<>();
    for (DirectoryIndexExcludePolicy policy : DirectoryIndexExcludePolicy.EP_NAME.getExtensions(project)) {
      excludePolicies.add(create(policy, sdks, roots));
    }
    return excludePolicies;
  }
@NotNull
  public static List<ExcludePolicyDescriptor> collectDescriptors(@NotNull Project project)