public void registerCloseDock(@Observes UberfireDocksInteractionEvent event) { if (event.getType() == UberfireDocksInteractionEvent.InteractionType.CLOSED) { currentBookmarkableURLStatus = BookmarkableUrlHelper.registerClosedDock(currentBookmarkableURLStatus, event.getTargetDock()); updateHistoryBar(); } }
public void registerOpenDock(@Observes UberfireDocksInteractionEvent event) { if (event.getType() == UberfireDocksInteractionEvent.InteractionType.OPENED) { currentBookmarkableURLStatus = BookmarkableUrlHelper.registerOpenedDock(currentBookmarkableURLStatus, event.getTargetDock()); updateHistoryBar(); } }
public void registerClose(Activity activity, PlaceRequest place) { if (place.isUpdateLocationBarAllowed()) { if (place instanceof PathPlaceRequest) { // handle editors currentBookmarkableURLStatus = BookmarkableUrlHelper.registerCloseEditor(currentBookmarkableURLStatus, place); } else { final String id = place.getIdentifier(); if (activity.isType(ActivityResourceType.SCREEN.name())) { final String token = BookmarkableUrlHelper.getUrlToken(currentBookmarkableURLStatus, id); currentBookmarkableURLStatus = BookmarkableUrlHelper.registerClose(currentBookmarkableURLStatus, token); } } updateHistoryBar(); } }
/** * register opened screen of perspective * @param activity * @param place */ public void registerOpen(Activity activity, PlaceRequest place) { if (place.isUpdateLocationBarAllowed()) { if (activity.isType(ActivityResourceType.PERSPECTIVE.name())) { currentBookmarkableURLStatus = BookmarkableUrlHelper.registerOpenedPerspective(currentBookmarkableURLStatus, place); } else if (activity.isType(ActivityResourceType.SCREEN.name())) { currentBookmarkableURLStatus = BookmarkableUrlHelper.registerOpenedScreen(currentBookmarkableURLStatus, place); } else if (activity.isType(ActivityResourceType.EDITOR.name())) { currentBookmarkableURLStatus = BookmarkableUrlHelper.registerOpenedScreen(currentBookmarkableURLStatus, place); } updateHistoryBar(); } }