class LibraryPlaces implements WorkspaceProjectContextChangeHandler {

    public void onSelectPlaceEvent(@Observes final PlaceGainFocusEvent placeGainFocusEvent) {
        if (isLibraryPerspectiveOpen() && !closingLibraryPlaces) {
            final PlaceRequest place = placeGainFocusEvent.getPlace();

            if (place instanceof PathPlaceRequest) {
                libraryBreadcrumbs.setupForAsset(getActiveWorkspace(),
                                                 ((PathPlaceRequest) place).getPath());
            } else if (!place.getIdentifier().equals(ALERTS) && isLibraryPlace(place)) {
                if (projectContext.getActiveWorkspaceProject().isPresent()
                        && place.getIdentifier().equals(LibraryPlaces.PROJECT_SCREEN)) {
                    libraryBreadcrumbs.setupForProject(getActiveWorkspace());
                } else if (projectContext.getActiveOrganizationalUnit().isPresent()
                        && place.getIdentifier().equals(LibraryPlaces.LIBRARY_SCREEN)) {
                    libraryBreadcrumbs.setupForSpace(getActiveSpace());
                }
            }
        }
    }

    public  LibraryPlaces();
    @Inject public  LibraryPlaces(final UberfireBreadcrumbs breadcrumbs,
                         final TranslationService ts,
                         final Event<AssetDetailEvent> assetDetailEvent,
                         final Caller<LibraryService> libraryService,
                         final Caller<WorkspaceProjectService> projectService,
                         final Caller<KieModuleService> moduleService,
                         final PlaceManager placeManager,
                         final WorkspaceProjectContext projectContext,
                         final Event<WorkspaceProjectContextChangeEvent> projectContextChangeEvent,
                         final Event<NotificationEvent> notificationEvent,
                         final TranslationUtils translationUtils,
                         final Caller<VFSService> vfsService,
                         final ManagedInstance<ImportRepositoryPopUpPresenter> importRepositoryPopUpPresenters,
                         final @Routed Event<ProjectAssetListUpdated> assetListUpdatedEvent,
                         final CloseUnsavedProjectAssetsPopUpPresenter closeUnsavedProjectAssetsPopUpPresenter,
                         final @Source(Source.Kind.EXTERNAL) Event<ImportProjectsSetupEvent> importProjectsSetupEvent,
                         final LibraryBreadcrumbs libraryBreadcrumbs,
                         final SessionInfo sessionInfo,
                         final Caller<RepositoryService> repositoryService,
                         final Promises promises,
                         final OrganizationalUnitController organizationalUnitController,
                         final Caller<OrganizationalUnitService> organizationalUnitService,
                         final Logger logger,
                         final Cookie cookie);

}