use of org.kie.workbench.common.dmn.client.commands.expressions.types.context.AddContextEntryCommand in project kie-wb-common by kiegroup.
the class ContextGrid method addContextEntry.
void addContextEntry(final int index) {
expression.ifPresent(c -> {
final ContextEntry ce = new ContextEntry();
ce.setVariable(new InformationItem());
sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new AddContextEntryCommand(c, ce, model, new DMNGridRow(), index, uiModelMapper, this::synchroniseView));
});
}
use of org.kie.workbench.common.dmn.client.commands.expressions.types.context.AddContextEntryCommand in project kie-wb-common by kiegroup.
the class ContextGridTest method testAddContextEntry.
@Test
public void testAddContextEntry() {
setupGrid(0);
grid.addContextEntry(0);
verify(sessionCommandManager).execute(eq(canvasHandler), addContextEntryCommandCaptor.capture());
final AddContextEntryCommand addContextEntryCommand = addContextEntryCommandCaptor.getValue();
addContextEntryCommand.execute(canvasHandler);
verify(parent).onResize();
verify(gridPanel).refreshScrollPosition();
verify(gridPanel).updatePanelSize();
verify(gridLayer).batch(redrawCommandCaptor.capture());
final GridLayerRedrawManager.PrioritizedCommand redrawCommand = redrawCommandCaptor.getValue();
redrawCommand.execute();
verify(gridLayer).draw();
}
Aggregations