class ProjectBranchBreadcrumb implements BreadcrumbPresenter {

    public void newBranchEvent(@Observes final NewBranchEvent newBranchEvent) {
        final String userIdentifier = newBranchEvent.getUserIdentifier();
        final Repository repository = newBranchEvent.getRepository();

        if (libraryPlaces.isThisUserAccessingThisRepository(userIdentifier, repository)) {
            libraryPlaces.goToProject(libraryPlaces.getActiveWorkspace(), repository.getBranch(newBranchEvent.getNewBranchName()).get());
        }
    }

    @Inject public  ProjectBranchBreadcrumb(final View view,
                                   final LibraryPlaces libraryPlaces,
                                   final Event<NotificationEvent> notificationEvent,
                                   final ProjectController projectController,
                                   final Promises promises);

}