use of org.kie.workbench.common.dmn.client.commands.expressions.types.invocation.AddParameterBindingCommand in project kie-wb-common by kiegroup.
the class InvocationGridTest method testAddParameterBinding.
@Test
public void testAddParameterBinding() {
setupGrid(0);
grid.addParameterBinding(0);
verify(sessionCommandManager).execute(eq(canvasHandler), addParameterBindingCommandCaptor.capture());
final AddParameterBindingCommand addParameterBindingCommand = addParameterBindingCommandCaptor.getValue();
addParameterBindingCommand.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();
}
use of org.kie.workbench.common.dmn.client.commands.expressions.types.invocation.AddParameterBindingCommand in project kie-wb-common by kiegroup.
the class InvocationGrid method addParameterBinding.
void addParameterBinding(final int index) {
expression.ifPresent(invocation -> {
final Binding binding = new Binding();
final InformationItem parameter = new InformationItem();
parameter.setName(new Name("p" + invocation.getBinding().size()));
binding.setParameter(parameter);
sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new AddParameterBindingCommand(invocation, binding, model, new DMNGridRow(), index, uiModelMapper, this::synchroniseView));
});
}
Aggregations