use of org.kie.workbench.common.screens.datamodeller.events.DataObjectSelectedEvent in project kie-wb-common by kiegroup.
the class DataObjectBrowser method notifyObjectSelected.
private void notifyObjectSelected() {
dataModelerWBContextEvent.fire(new DataModelerWorkbenchContextChangeEvent());
dataModelerEvent.fire(new DataObjectSelectedEvent(getContext().getContextId(), DataModelerEvent.DATA_MODEL_BROWSER, getDataObject()));
}
use of org.kie.workbench.common.screens.datamodeller.events.DataObjectSelectedEvent in project kie-wb-common by kiegroup.
the class DataModelerScreenPresenterObserversTest method titleChangeOnObjectSelectionTest.
/**
* The following test checks that the title for the main properties panel on the view is properly set when the
* DataObject is selected.
*/
@Test
public void titleChangeOnObjectSelectionTest() {
// emulates the arrival of an event produced by some of the "domain editors" or the "data object browser"
// that are working on this context. Typically when the user clicks on the "object link" in the
// "data object browser" in order manage the data object properties.
presenter.onDataObjectSelectedEvent(new DataObjectSelectedEvent(dataModelerWBContext.getActiveContext().getContextId(), "", testObject1));
// expected title and tooltip given that TestObject1 was selected.
String title = testObject1Title;
String tooltip = testObject1Tooltip;
// Finally the domainContainerTitle must have been set two times, one when the data object was initially loaded.
// and now when the event arrived.
verify(view, times(2)).setDomainContainerTitle(title, tooltip);
}
Aggregations