class AddProjectButtonPresenter {

    void addNewProjectHandler(final NewWorkspaceProjectHandler newWorkspaceProjectHandler) {
        newWorkspaceProjectHandler.setOpenEditorOnCreation(false);
        newWorkspaceProjectHandler.setCreationSuccessCallback(project -> {
            if (project != null) {
                libraryPlaces.goToProject(project);
            }
        });

        final MenuResourceHandlerWidget menuResourceHandlerWidget = menuResourceHandlerWidgets.get();
        menuResourceHandlerWidget.init(newWorkspaceProjectHandler.getDescription(),
                                       () -> libraryPlaces.closeAllPlacesOrNothing(() -> {
                                                                                       libraryPlaces.goToLibrary();
                                                                                       newWorkspaceProjectHandler.getCommand(newResourcePresenter).execute();
                                                                                   }));
        view.addOtherProject(menuResourceHandlerWidget);
    }

    @Inject public  AddProjectButtonPresenter(final View view,
                                     final ManagedInstance<AddProjectPopUpPresenter> addProjectPopUpPresenters,
                                     final ManagedInstance<MenuResourceHandlerWidget> menuResourceHandlerWidgets,
                                     final ManagedInstance<NewWorkspaceProjectHandler> newProjectHandlers,
                                     final NewResourcePresenter newResourcePresenter,
                                     final ProjectController projectController,
                                     final TranslationService translationService,
                                     final LibraryPlaces libraryPlaces);

}