use of org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddOutputClauseCommand in project kie-wb-common by kiegroup.
the class DecisionTableGrid method addOutputClause.
void addOutputClause(final int index) {
expression.ifPresent(dtable -> {
final OutputClause clause = new OutputClause();
clause.setName("output");
sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new AddOutputClauseCommand(dtable, clause, model, makeOutputClauseColumn(clause), index, uiModelMapper, () -> synchroniseViewWhenExpressionEditorChanged(this)));
});
}
use of org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddOutputClauseCommand in project kie-wb-common by kiegroup.
the class DecisionTableGridTest method testAddOutputClause.
@Test
public void testAddOutputClause() {
setupGrid(makeHasNameForDecision(), 0);
grid.addOutputClause(2);
verify(sessionCommandManager).execute(eq(canvasHandler), addOutputClauseCommandCaptor.capture());
final AddOutputClauseCommand addOutputClauseCommand = addOutputClauseCommandCaptor.getValue();
addOutputClauseCommand.execute(canvasHandler);
verify(parent).proposeContainingColumnWidth(eq(grid.getWidth() + grid.getPadding() * 2));
verifyGridPanelRefresh();
}
Aggregations