use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToAddAsset.
public void goToAddAsset() {
final PlaceRequest addAssetScreen = new DefaultPlaceRequest(LibraryPlaces.ADD_ASSET_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(addAssetScreen);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToProject.
private void goToProject(final Command callback) {
setupLibraryBreadCrumbs(projectContext.getActiveWorkspaceProject().orElseThrow(() -> new IllegalStateException("Cannot go to project when no project is active.")));
final PartDefinitionImpl part = new PartDefinitionImpl(new DefaultPlaceRequest(LibraryPlaces.PROJECT_SCREEN));
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
if (callback != null) {
callback.execute();
}
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToTrySamples.
public void goToTrySamples() {
if (closeAllPlacesOrNothing()) {
final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.IMPORT_SAMPLE_PROJECTS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
setupLibraryBreadCrumbsForTrySamples();
}
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToOrgUnitsMetrics.
public void goToOrgUnitsMetrics() {
final PlaceRequest metricsScreen = new DefaultPlaceRequest(LibraryPlaces.ORG_UNITS_METRICS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(metricsScreen);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
setupLibraryBreadCrumbsForOrgUnitsMetrics();
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectProjectSettingsTest.
@Test
public void onSelectProjectSettingsTest() {
doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.PROJECT_SETTINGS);
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(libraryPlaces).hideDocks();
verify(libraryPlaces).setupLibraryBreadCrumbsForAsset(null);
}
Aggregations