use of org.uberfire.ext.preferences.client.event.PreferencesCentralInitializationEvent in project kie-wb-common by kiegroup.
the class LibraryPlaces method goToPreferences.
public void goToPreferences() {
final PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy = projectScopedResolutionStrategySupplier.get();
final PreferencesCentralInitializationEvent initEvent = new PreferencesCentralInitializationEvent("ProjectPreferences", customScopeResolutionStrategy, null);
final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(PreferencesRootScreen.IDENTIFIER);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
placeManager.goTo(part, libraryPerspective.getRootPanel());
preferencesCentralInitializationEvent.fire(initEvent);
setupLibraryBreadCrumbsForPreferences();
}
use of org.uberfire.ext.preferences.client.event.PreferencesCentralInitializationEvent 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();
}
Aggregations