class AppFormerJsActivityLoader implements PlaceManagerImpl.AppFormerActivityLoader {

    protected void finishLoadingMatchingEditors(final List<Promise<Void>> loadingMatchingEditors,
                                                final Runnable successCallback) {

        this.promises.resolve().then(i -> promises.all(loadingMatchingEditors, identity()).then(s -> {
            successCallback.run();
            return this.promises.resolve();
        })).catch_(e -> {
            //If something goes wrong, it's a no-op.
            return this.promises.resolve();
        });
    }

    @Inject public  AppFormerJsActivityLoader(final Promises promises,
                                     final ActivityManager activityManager,
                                     final ActivityBeansCache activityBeansCache,
                                     final PlaceManager placeManager,
                                     final LazyLoadingScreen lazyLoadingScreen,
                                     final Event<ActivityLazyLoaded> activityLazyLoadedEvent,
                                     final @Shadowed Instance<JsWorkbenchEditorActivity> jsWorkbenchEditorActivityInstance,
                                     final AppFormerComponentsRegistry appFormerComponentsRegistry);

}