use of org.kie.workbench.common.dmn.client.commands.general.ClearExpressionTypeCommand in project kie-wb-common by kiegroup.
the class ContextGridTest method testClearExpressionType.
@Test
public void testClearExpressionType() {
setupGrid(0);
grid.clearExpressionType(0);
verify(sessionCommandManager).execute(eq(canvasHandler), clearExpressionTypeCommandCaptor.capture());
final ClearExpressionTypeCommand clearExpressionTypeCommand = clearExpressionTypeCommandCaptor.getValue();
clearExpressionTypeCommand.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.general.ClearExpressionTypeCommand in project kie-wb-common by kiegroup.
the class ContextGrid method clearExpressionType.
void clearExpressionType(final int uiRowIndex) {
final GridCellTuple gc = new GridCellTuple(uiRowIndex, ContextUIModelMapperHelper.EXPRESSION_COLUMN_INDEX, this);
final HasExpression hasExpression = expression.get().getContextEntry().get(uiRowIndex);
sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new ClearExpressionTypeCommand(gc, hasExpression, uiModelMapper, () -> synchroniseViewWhenExpressionEditorChanged(this)));
}
use of org.kie.workbench.common.dmn.client.commands.general.ClearExpressionTypeCommand in project kie-wb-common by kiegroup.
the class InvocationGridTest method testClearExpressionType.
@Test
public void testClearExpressionType() {
setupGrid(0);
grid.clearExpressionType(0);
verify(sessionCommandManager).execute(eq(canvasHandler), clearExpressionTypeCommandCaptor.capture());
final ClearExpressionTypeCommand clearExpressionTypeCommand = clearExpressionTypeCommandCaptor.getValue();
clearExpressionTypeCommand.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.general.ClearExpressionTypeCommand in project kie-wb-common by kiegroup.
the class InvocationGrid method clearExpressionType.
void clearExpressionType(final int uiRowIndex) {
final GridCellTuple gc = new GridCellTuple(uiRowIndex, InvocationUIModelMapper.BINDING_EXPRESSION_COLUMN_INDEX, this);
final HasExpression hasExpression = expression.get().getBinding().get(uiRowIndex);
sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new ClearExpressionTypeCommand(gc, hasExpression, uiModelMapper, () -> synchroniseViewWhenExpressionEditorChanged(this)));
}
Aggregations