class SettingsPresenter {

    Promise<Object> setupSections(final ProjectScreenModel model) {

        // Sections can be removed inside setupSection method, so we create
        // a new ArrayList containing a copy of the original sections
        final List<Section<ProjectScreenModel>> sections = new ArrayList<>(sectionManager.getSections());

        return promises.all(sections, (final Section<ProjectScreenModel> section) -> setupSection(model, section)).then(i -> {
            if (sectionManager.isEmpty()) {
                return promises.reject("No sections available");
            } else {
                return promises.resolve();
            }
        });
    }

    @Inject public  SettingsPresenter(final View view,
                             final Promises promises,
                             final Event<NotificationEvent> notificationEvent,
                             final @Customizable SettingsSections<ProjectScreenModel> settingsSections,
                             final SavePopUpPresenter savePopUpPresenter,
                             final Caller<ProjectScreenService> projectScreenService,
                             final WorkspaceProjectContext projectContext,
                             final ManagedInstance<ObservablePath> observablePaths,
                             final ConflictingRepositoriesPopup conflictingRepositoriesPopup,
                             final SectionManager<ProjectScreenModel> sectionManager,
                             final ProjectController projectController);

}