@Override
  public Promise<Void> addDependency(@NotNull Collection<? extends Module> from,
                                     @NotNull ExternalLibraryDescriptor libraryDescriptor,
                                     @NotNull DependencyScope scope) {
    Promise<Void> promise = null;
    List<JavaProjectModelModifier> modifiers = getModelModifiers();
    for (int i = 0; i < modifiers.size() && promise == null; i++) {
      promise = modifiers.get(i).addExternalLibraryDependency(from, libraryDescriptor, scope);
    }

    promise = promise == null ? Promises.rejectedPromise() : promise;
    return promise.onSuccess(v -> {
      Library library = LibraryTablesRegistrar.getInstance().getLibraryTable(myProject)
        .getLibraryByName(libraryDescriptor.getPresentableName());
      from.forEach(m -> addJigsawModule(m, library, scope));
    });
  }
@Override
  public Promise<Void> addDependency(@NotNull Collection<? extends Module> from,
                                     @NotNull ExternalLibraryDescriptor libraryDescriptor,
                                     @NotNull DependencyScope scope)