use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToProjectMetrics.
public void goToProjectMetrics() {
final PlaceRequest metricsScreen = new DefaultPlaceRequest(LibraryPlaces.PROJECT_METRICS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(metricsScreen);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
setupLibraryBreadCrumbsForProjectMetrics();
projectMetricsEvent.fire(new WorkbenchProjectMetricsEvent(projectContext.getActiveWorkspaceProject().orElseThrow(() -> new IllegalStateException("Cannot fire event for project metrics without an active project."))));
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToOrganizationalUnits.
public void goToOrganizationalUnits() {
if (closeAllPlacesOrNothing()) {
PortablePreconditions.checkNotNull("libraryPerspective.closeAllPlacesOrNothing", libraryPerspective);
projectContextChangeEvent.fire(new WorkspaceProjectContextChangeEvent());
final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.ORGANIZATIONAL_UNITS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
setupLibraryBreadCrumbs();
}
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method showDocks.
public void showDocks() {
if (docksHidden) {
if (!docksReady) {
docks.setup(LibraryPlaces.LIBRARY_PERSPECTIVE, new DefaultPlaceRequest(PROJECT_EXPLORER));
docksReady = true;
}
docks.show();
docksHidden = false;
}
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method setupLibraryPerspective.
private void setupLibraryPerspective() {
OrganizationalUnit activeOu = projectContext.getActiveOrganizationalUnit().orElseThrow(() -> new IllegalStateException("Cannot setup library perspective without active space."));
PortablePreconditions.checkNotNull("libraryPerspective", libraryPerspective);
final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
if (!projectContext.getActiveWorkspaceProject().isPresent()) {
projectContextChangeEvent.fire(new WorkspaceProjectContextChangeEvent(activeOu));
}
closeLibraryPlaces();
placeManager.goTo(part, libraryPerspective.getRootPanel());
setupLibraryBreadCrumbsWithoutProject();
hideDocks();
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToSettings.
public void goToSettings() {
final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(PROJECT_SETTINGS);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
closeLibraryPlaces();
placeManager.goTo(part, libraryPerspective.getRootPanel());
}
Aggregations