use of org.uberfire.workbench.model.impl.PartDefinitionImpl 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.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method goToProjectTest.
@Test
public void goToProjectTest() {
final PlaceRequest projectScreen = new DefaultPlaceRequest(LibraryPlaces.PROJECT_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(projectScreen);
part.setSelectable(false);
libraryPlaces.goToProject();
verify(placeManager).goTo(eq(part), any(PanelDefinition.class));
verify(projectContextChangeEvent, never()).fire(any(WorkspaceProjectContextChangeEvent.class));
verify(libraryPlaces).setupLibraryBreadCrumbs(activeProject);
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method goToTrySamplesTest.
@Test
public void goToTrySamplesTest() {
doReturn(true).when(libraryPlaces).closeAllPlacesOrNothing();
final PlaceRequest trySamplesScreen = new DefaultPlaceRequest(LibraryPlaces.IMPORT_SAMPLE_PROJECTS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(trySamplesScreen);
part.setSelectable(false);
libraryPlaces.goToTrySamples();
verify(libraryPlaces).closeAllPlacesOrNothing();
verify(placeManager).goTo(eq(part), any(PanelDefinition.class));
verify(libraryPlaces).setupLibraryBreadCrumbsForTrySamples();
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method goToPreferencesTest.
@Test
public void goToPreferencesTest() {
final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo = mock(PreferenceScopeResolutionStrategyInfo.class);
doReturn(scopeResolutionStrategyInfo).when(projectScopedResolutionStrategySupplier).get();
final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(PreferencesRootScreen.IDENTIFIER);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
libraryPlaces.goToPreferences();
verify(placeManager).goTo(eq(part), any(PanelDefinition.class));
verify(preferencesCentralInitializationEvent).fire(new PreferencesCentralInitializationEvent("ProjectPreferences", scopeResolutionStrategyInfo, null));
verify(libraryPlaces).setupLibraryBreadCrumbsForPreferences();
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method goToLibraryWhenGoingBackFromProjectTest.
@Test
public void goToLibraryWhenGoingBackFromProjectTest() {
doReturn(Optional.of(activeOrganizationalUnit)).when(projectContext).getActiveOrganizationalUnit();
activeProject = new WorkspaceProject(activeOrganizationalUnit, activeRepository, activeBranch, activeModule);
doReturn(Optional.of(activeProject)).when(projectContext).getActiveWorkspaceProject();
doReturn(Optional.of(activeModule)).when(projectContext).getActiveModule();
final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
libraryPlaces.goToLibrary();
verify(libraryPlaces).closeLibraryPlaces();
verify(placeManager).goTo(eq(part), any(PanelDefinition.class));
verify(libraryPlaces).setupLibraryBreadCrumbsWithoutProject();
verify(projectContextChangeEvent, never()).fire(any(WorkspaceProjectContextChangeEvent.class));
}
Aggregations