Search in sources :

Example 1 with CanvasCommand

use of org.kie.workbench.common.stunner.core.client.command.CanvasCommand in project kie-wb-common by kiegroup.

the class LocationControlImplTest method testMove.

@Test
@SuppressWarnings("unchecked")
public void testMove() throws Exception {
    final WiresShapeView wiresShape = mock(WiresShapeView.class);
    final WiresShapeView childWiresShape = mock(WiresShapeView.class);
    final MagnetManager.Magnets magnets = mock(MagnetManager.Magnets.class);
    final WiresMagnet magnet = mock(WiresMagnet.class);
    final WiresConnection connection = mock(WiresConnection.class);
    final NFastArrayList<WiresConnection> connections = new NFastArrayList<>(connection);
    final WiresConnector connector = mock(WiresConnector.class);
    final String connectorUUID = UUID.uuid();
    final NFastArrayList<WiresShape> children = new NFastArrayList<>(childWiresShape);
    final Group connectorGroup = mock(Group.class);
    final Edge connectorEdge = mock(Edge.class);
    final com.ait.lienzo.client.core.types.Point2D controlPointLienzo = new com.ait.lienzo.client.core.types.Point2D(100, 100);
    final Point2DArray controlPointsLienzo = new Point2DArray(controlPointLienzo);
    final ViewConnector viewConnector = mock(ViewConnector.class);
    Group parentGroup = mock(Group.class);
    BoundingBox parentBB = new BoundingBox(0, 0, 200, 200);
    MultiPath head = mock(MultiPath.class);
    MultiPath tail = mock(MultiPath.class);
    when(childWiresShape.getMagnets()).thenReturn(magnets);
    when(childWiresShape.getParent()).thenReturn(wiresShape);
    when(wiresShape.getGroup()).thenReturn(parentGroup);
    when(parentGroup.getBoundingBox()).thenReturn(parentBB);
    when(wiresShape.getX()).thenReturn(0d);
    when(wiresShape.getY()).thenReturn(0d);
    when(magnets.size()).thenReturn(1);
    when(magnets.getMagnet(0)).thenReturn(magnet);
    when(magnet.getConnectionsSize()).thenReturn(connections.size());
    when(magnet.getConnections()).thenReturn(connections);
    when(connection.getConnector()).thenReturn(connector);
    when(connector.getGroup()).thenReturn(connectorGroup);
    when(connectorGroup.uuid()).thenReturn(connectorUUID);
    when(connector.getControlPoints()).thenReturn(controlPointsLienzo);
    when(connector.getHead()).thenReturn(head);
    when(connector.getTail()).thenReturn(tail);
    when(head.getLocation()).thenReturn(new com.ait.lienzo.client.core.types.Point2D(1, 1));
    when(tail.getLocation()).thenReturn(new com.ait.lienzo.client.core.types.Point2D(2, 2));
    when(wiresShape.getChildShapes()).thenReturn(children);
    when(shape.getShapeView()).thenReturn(wiresShape);
    when(graphIndex.getEdge(connectorUUID)).thenReturn(connectorEdge);
    when(connectorEdge.getContent()).thenReturn(viewConnector);
    when(connectorGroup.getUserData()).thenReturn(new WiresUtils.UserData(connectorUUID, ""));
    tested.init(canvasHandler);
    tested.register(element);
    Point2D location = new Point2D(45d, 65.5d);
    tested.move(new Element[] { element }, new Point2D[] { location });
    ArgumentCaptor<CanvasCommand> commandArgumentCaptor = forClass(CanvasCommand.class);
    verify(commandManager, times(1)).execute(eq(canvasHandler), commandArgumentCaptor.capture());
    ArgumentCaptor<ShapeLocationsChangedEvent> shapeLocationsChangedEventCaptor = forClass(ShapeLocationsChangedEvent.class);
    verify(shapeLocationsChangedEvent, times(1)).fire(shapeLocationsChangedEventCaptor.capture());
    assertTrue(shapeLocationsChangedEventCaptor.getValue() instanceof ShapeLocationsChangedEvent);
    // assert parent node move
    final CompositeCommand command = (CompositeCommand) commandArgumentCaptor.getValue();
    UpdateElementPositionCommand updateElementPositionCommand = (UpdateElementPositionCommand) command.getCommands().get(0);
    assertEquals(element, updateElementPositionCommand.getElement());
    assertEquals(location, updateElementPositionCommand.getLocation());
}
Also used : Group(com.ait.lienzo.client.core.shape.Group) CompositeCommand(org.kie.workbench.common.stunner.core.command.impl.CompositeCommand) Point2D(org.kie.workbench.common.stunner.core.graph.content.view.Point2D) MagnetManager(com.ait.lienzo.client.core.shape.wires.MagnetManager) NFastArrayList(com.ait.tooling.nativetools.client.collection.NFastArrayList) BoundingBox(com.ait.lienzo.client.core.types.BoundingBox) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) WiresUtils(org.kie.workbench.common.stunner.client.lienzo.canvas.wires.WiresUtils) MultiPath(com.ait.lienzo.client.core.shape.MultiPath) WiresConnector(com.ait.lienzo.client.core.shape.wires.WiresConnector) ViewConnector(org.kie.workbench.common.stunner.core.graph.content.view.ViewConnector) WiresConnection(com.ait.lienzo.client.core.shape.wires.WiresConnection) Point2DArray(com.ait.lienzo.client.core.types.Point2DArray) WiresShape(com.ait.lienzo.client.core.shape.wires.WiresShape) ShapeLocationsChangedEvent(org.kie.workbench.common.stunner.core.client.canvas.event.ShapeLocationsChangedEvent) WiresShapeView(org.kie.workbench.common.stunner.client.lienzo.shape.view.wires.WiresShapeView) WiresMagnet(com.ait.lienzo.client.core.shape.wires.WiresMagnet) UpdateElementPositionCommand(org.kie.workbench.common.stunner.core.client.canvas.command.UpdateElementPositionCommand) Edge(org.kie.workbench.common.stunner.core.graph.Edge) Test(org.junit.Test)

Example 2 with CanvasCommand

use of org.kie.workbench.common.stunner.core.client.command.CanvasCommand in project kie-wb-common by kiegroup.

the class LocationControlImplTest method testLocationAcceptor.

@Test
@SuppressWarnings("unchecked")
public void testLocationAcceptor() {
    tested.init(canvasHandler);
    tested.register(element);
    ArgumentCaptor<ILocationAcceptor> locationAcceptorArgumentCaptor = ArgumentCaptor.forClass(ILocationAcceptor.class);
    verify(wiresManager, times(1)).setLocationAcceptor(locationAcceptorArgumentCaptor.capture());
    final ILocationAcceptor locationAcceptor = locationAcceptorArgumentCaptor.getValue();
    final WiresShapeView wiresContainer = mock(WiresShapeView.class);
    when(wiresContainer.getUUID()).thenReturn(ELEMENT_UUID);
    final com.ait.lienzo.client.core.types.Point2D point = new com.ait.lienzo.client.core.types.Point2D(40d, 50d);
    locationAcceptor.accept(new WiresContainer[] { wiresContainer }, new com.ait.lienzo.client.core.types.Point2D[] { point });
    ArgumentCaptor<CanvasCommand> commandArgumentCaptor = forClass(CanvasCommand.class);
    verify(commandManager, times(1)).execute(eq(canvasHandler), commandArgumentCaptor.capture());
    final CompositeCommand command = (CompositeCommand) commandArgumentCaptor.getValue();
    UpdateElementPositionCommand updateElementPositionCommand = (UpdateElementPositionCommand) command.getCommands().get(0);
    assertEquals(element, updateElementPositionCommand.getElement());
    assertEquals(new Point2D(40d, 50d), updateElementPositionCommand.getLocation());
}
Also used : ILocationAcceptor(com.ait.lienzo.client.core.shape.wires.ILocationAcceptor) CompositeCommand(org.kie.workbench.common.stunner.core.command.impl.CompositeCommand) Point2D(org.kie.workbench.common.stunner.core.graph.content.view.Point2D) WiresShapeView(org.kie.workbench.common.stunner.client.lienzo.shape.view.wires.WiresShapeView) UpdateElementPositionCommand(org.kie.workbench.common.stunner.core.client.canvas.command.UpdateElementPositionCommand) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) Test(org.junit.Test)

Example 3 with CanvasCommand

use of org.kie.workbench.common.stunner.core.client.command.CanvasCommand in project kie-wb-common by kiegroup.

the class ResizeControlImplTest method testResize.

@Test
@SuppressWarnings("unchecked")
public void testResize() {
    tested.init(canvasHandler);
    assertFalse(tested.isRegistered(element));
    tested.register(element);
    verify(shapeView, times(1)).supports(eq(ViewEventType.RESIZE));
    ArgumentCaptor<ResizeHandler> resizeHandlerArgumentCaptor = ArgumentCaptor.forClass(ResizeHandler.class);
    verify(shapeView, times(1)).addHandler(eq(ViewEventType.RESIZE), resizeHandlerArgumentCaptor.capture());
    final CanvasCommand expectedCommand = mock(CanvasCommand.class);
    doAnswer(invocationOnMock -> expectedCommand).when(canvasCommandFactory).resize(eq(element), any(BoundingBox.class));
    ResizeHandler resizeHandler = resizeHandlerArgumentCaptor.getValue();
    double x = 121.45d;
    double y = 23.456d;
    double width = 100d;
    double height = 200d;
    ResizeEvent event = new ResizeEvent(x, y, x, y, width, height);
    resizeHandler.end(event);
    ArgumentCaptor<CanvasCommand> commandArgumentCaptor = ArgumentCaptor.forClass(CanvasCommand.class);
    verify(commandManager, times(1)).execute(eq(canvasHandler), commandArgumentCaptor.capture());
    CanvasCommand command = commandArgumentCaptor.getValue();
    assertNotNull(command);
    assertEquals(expectedCommand, command);
}
Also used : ResizeHandler(org.kie.workbench.common.stunner.core.client.shape.view.event.ResizeHandler) BoundingBox(org.kie.workbench.common.stunner.core.client.shape.view.BoundingBox) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) ResizeEvent(org.kie.workbench.common.stunner.core.client.shape.view.event.ResizeEvent) Test(org.junit.Test)

Example 4 with CanvasCommand

use of org.kie.workbench.common.stunner.core.client.command.CanvasCommand in project kie-wb-common by kiegroup.

the class NodeProxyTest method verifyCreateTargetNode.

@SuppressWarnings("all")
private void verifyCreateTargetNode(CanvasCommand<AbstractCanvasHandler> addConnectorCommand, CanvasCommand<AbstractCanvasHandler> addNodeCommand, CanvasCommand<AbstractCanvasHandler> setTargetNodeCommand) {
    tested.init();
    tested.start(1d, 2d);
    verify(proxy, times(1)).start(eq(1d), eq(2d));
    NodeShape targetNodeShape = view.getShapeBuilder().get();
    assertEquals(targetShape, targetNodeShape);
    ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class);
    verify(proxy, times(1)).execute(commandCaptor.capture());
    DeferredCompositeCommand command = (DeferredCompositeCommand) commandCaptor.getValue();
    List commands = command.getCommands();
    assertEquals(3, command.size());
    DeferredCommand c0 = (DeferredCommand) commands.get(0);
    assertEquals(addNodeCommand, c0.getCommand());
    DeferredCommand c1 = (DeferredCommand) commands.get(1);
    assertEquals(addConnectorCommand, c1.getCommand());
    DeferredCommand c2 = (DeferredCommand) commands.get(2);
    assertEquals(setTargetNodeCommand, c2.getCommand());
}
Also used : DeferredCompositeCommand(org.kie.workbench.common.stunner.core.command.impl.DeferredCompositeCommand) DeferredCompositeCommand(org.kie.workbench.common.stunner.core.command.impl.DeferredCompositeCommand) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) DeferredCommand(org.kie.workbench.common.stunner.core.command.impl.DeferredCommand) Command(org.kie.workbench.common.stunner.core.command.Command) AddNodeCommand(org.kie.workbench.common.stunner.core.graph.command.impl.AddNodeCommand) SetChildrenCommand(org.kie.workbench.common.stunner.core.graph.command.impl.SetChildrenCommand) NodeShape(org.kie.workbench.common.stunner.core.client.shape.NodeShape) List(java.util.List) DeferredCommand(org.kie.workbench.common.stunner.core.command.impl.DeferredCommand)

Example 5 with CanvasCommand

use of org.kie.workbench.common.stunner.core.client.command.CanvasCommand in project kie-wb-common by kiegroup.

the class DecisionTableGridTest method testSetTypeRefMultipleOutputClauses.

@Test
@SuppressWarnings("unchecked")
public void testSetTypeRefMultipleOutputClauses() {
    setupGrid(makeHasNameForDecision(), 0);
    final QName typeRef = new QName(QName.NULL_NS_URI, BuiltInType.DATE.getName());
    final QName defaultTypeRef = new QName();
    final Consumer<ValueAndDataTypeHeaderMetaData> test = (md) -> md.setTypeRef(typeRef);
    addOutputClause(3);
    final ArgumentCaptor<CanvasCommand> canvasCommandCaptor1 = ArgumentCaptor.forClass(CanvasCommand.class);
    hasExpression.getVariable().setTypeRef(defaultTypeRef);
    expression.get().getOutput().get(0).setTypeRef(defaultTypeRef);
    assertHeaderMetaDataTest(0, 2, test, canvasCommandCaptor1, SetTypeRefCommand.class);
    canvasCommandCaptor1.getValue().execute(canvasHandler);
    assertThat(hasExpression.getVariable().getTypeRef()).isEqualTo(typeRef);
    assertThat(expression.get().getOutput().get(0).getTypeRef()).isEqualTo(defaultTypeRef);
    final ArgumentCaptor<CanvasCommand> canvasCommandCaptor2 = ArgumentCaptor.forClass(CanvasCommand.class);
    hasExpression.getVariable().setTypeRef(defaultTypeRef);
    expression.get().getOutput().get(0).setTypeRef(defaultTypeRef);
    assertHeaderMetaDataTest(1, 2, test, canvasCommandCaptor2, SetTypeRefCommand.class);
    canvasCommandCaptor2.getValue().execute(canvasHandler);
    assertThat(hasExpression.getVariable().getTypeRef()).isEqualTo(defaultTypeRef);
    assertThat(expression.get().getOutput().get(0).getTypeRef()).isEqualTo(typeRef);
    final ArgumentCaptor<CanvasCommand> canvasCommandCaptor3 = ArgumentCaptor.forClass(CanvasCommand.class);
    hasExpression.getVariable().setTypeRef(defaultTypeRef);
    expression.get().getOutput().get(1).setTypeRef(defaultTypeRef);
    assertHeaderMetaDataTest(0, 3, test, canvasCommandCaptor3, SetTypeRefCommand.class);
    canvasCommandCaptor3.getValue().execute(canvasHandler);
    assertThat(hasExpression.getVariable().getTypeRef()).isEqualTo(typeRef);
    assertThat(expression.get().getOutput().get(1).getTypeRef()).isEqualTo(defaultTypeRef);
    final ArgumentCaptor<CanvasCommand> canvasCommandCaptor4 = ArgumentCaptor.forClass(CanvasCommand.class);
    hasExpression.getVariable().setTypeRef(defaultTypeRef);
    expression.get().getOutput().get(1).setTypeRef(defaultTypeRef);
    assertHeaderMetaDataTest(1, 3, test, canvasCommandCaptor4, SetTypeRefCommand.class);
    canvasCommandCaptor4.getValue().execute(canvasHandler);
    assertThat(hasExpression.getVariable().getTypeRef()).isEqualTo(defaultTypeRef);
    assertThat(expression.get().getOutput().get(1).getTypeRef()).isEqualTo(typeRef);
}
Also used : TextAreaSingletonDOMElementFactory(org.kie.workbench.common.dmn.client.widgets.grid.columns.factory.TextAreaSingletonDOMElementFactory) UpdateElementPropertyCommand(org.kie.workbench.common.stunner.core.client.canvas.command.UpdateElementPropertyCommand) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ManagedInstance(org.jboss.errai.ioc.client.api.ManagedInstance) ListSelectorView(org.kie.workbench.common.dmn.client.widgets.grid.controls.list.ListSelectorView) DMNGridLayer(org.kie.workbench.common.dmn.client.widgets.layer.DMNGridLayer) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn) SetTypeRefCommand(org.kie.workbench.common.dmn.client.commands.general.SetTypeRefCommand) InformationItemPrimary(org.kie.workbench.common.dmn.api.definition.model.InformationItemPrimary) GridLayerRedrawManager(org.uberfire.ext.wires.core.grids.client.widget.layer.impl.GridLayerRedrawManager) GridFactoryCommandUtils(org.kie.workbench.common.dmn.client.editors.expressions.types.GridFactoryCommandUtils) DeleteDecisionRuleCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.DeleteDecisionRuleCommand) Mockito.doAnswer(org.mockito.Mockito.doAnswer) DeleteOutputClauseCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.DeleteOutputClauseCommand) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) SetCellValueCommand(org.kie.workbench.common.dmn.client.commands.general.SetCellValueCommand) Index(org.kie.workbench.common.stunner.core.graph.processing.index.Index) NOPDomainObject(org.kie.workbench.common.dmn.api.definition.NOPDomainObject) HitPolicy(org.kie.workbench.common.dmn.api.definition.model.HitPolicy) OutputClause(org.kie.workbench.common.dmn.api.definition.model.OutputClause) DeleteCellValueCommand(org.kie.workbench.common.dmn.client.commands.general.DeleteCellValueCommand) HasName(org.kie.workbench.common.dmn.api.definition.HasName) QName(org.kie.workbench.common.dmn.api.property.dmn.QName) AddInputClauseCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddInputClauseCommand) SetHitPolicyCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.SetHitPolicyCommand) GridBodyCellEditContext(org.uberfire.ext.wires.core.grids.client.widget.context.GridBodyCellEditContext) DMNDiagramUtils(org.kie.workbench.common.dmn.api.graph.DMNDiagramUtils) GraphCommandExecutionContext(org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext) ValueAndDataTypePopoverView(org.kie.workbench.common.dmn.client.editors.types.ValueAndDataTypePopoverView) Mockito.mock(org.mockito.Mockito.mock) SetHasValueCommand(org.kie.workbench.common.dmn.client.commands.general.SetHasValueCommand) ValueAndDataTypeHeaderMetaData(org.kie.workbench.common.dmn.client.widgets.grid.columns.ValueAndDataTypeHeaderMetaData) Mock(org.mockito.Mock) HitPolicyPopoverView(org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.hitpolicy.HitPolicyPopoverView) RunWith(org.junit.runner.RunWith) AbsolutePanel(com.google.gwt.user.client.ui.AbsolutePanel) Mockito.spy(org.mockito.Mockito.spy) DMNSession(org.kie.workbench.common.dmn.client.session.DMNSession) Name(org.kie.workbench.common.dmn.api.property.dmn.Name) DMNGridColumn(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridColumn) GridCellTuple(org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple) Context(org.kie.workbench.common.dmn.api.definition.model.Context) Command(org.uberfire.mvp.Command) Before(org.junit.Before) TranslationService(org.jboss.errai.ui.client.local.spi.TranslationService) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) GridData(org.uberfire.ext.wires.core.grids.client.model.GridData) SessionCommandManager(org.kie.workbench.common.stunner.core.client.command.SessionCommandManager) DeleteInputClauseCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.DeleteInputClauseCommand) Graph(org.kie.workbench.common.stunner.core.graph.Graph) Mockito.never(org.mockito.Mockito.never) DomainObjectSelectionEvent(org.kie.workbench.common.stunner.core.client.canvas.event.selection.DomainObjectSelectionEvent) Assert.assertNull(org.junit.Assert.assertNull) GridCellValueTuple(org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellValueTuple) Mockito.reset(org.mockito.Mockito.reset) Assert.assertEquals(org.junit.Assert.assertEquals) DMNGraphUtils(org.kie.workbench.common.dmn.client.graph.DMNGraphUtils) CellEditorControlsView(org.kie.workbench.common.dmn.client.widgets.grid.controls.container.CellEditorControlsView) DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) BaseExpressionGrid(org.kie.workbench.common.dmn.client.widgets.grid.BaseExpressionGrid) AddDecisionRuleCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddDecisionRuleCommand) ItemDefinitionUtils(org.kie.workbench.common.dmn.client.editors.types.common.ItemDefinitionUtils) Mockito.atLeast(org.mockito.Mockito.atLeast) AddOutputClauseCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.AddOutputClauseCommand) ContextEntry(org.kie.workbench.common.dmn.api.definition.model.ContextEntry) DecisionRule(org.kie.workbench.common.dmn.api.definition.model.DecisionRule) AbstractCanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler) AbstractCanvasGraphCommand(org.kie.workbench.common.stunner.core.client.canvas.command.AbstractCanvasGraphCommand) DomainObject(org.kie.workbench.common.stunner.core.domainobject.DomainObject) GridWidget(org.uberfire.ext.wires.core.grids.client.widget.grid.GridWidget) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) List(java.util.List) DMNDiagramsSession(org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramsSession) HasValueAndTypeRef(org.kie.workbench.common.dmn.client.editors.types.HasValueAndTypeRef) BaseGridCellValue(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridCellValue) DefaultCanvasCommandFactory(org.kie.workbench.common.dmn.client.commands.factory.DefaultCanvasCommandFactory) InformationItem(org.kie.workbench.common.dmn.api.definition.model.InformationItem) BuiltInType(org.kie.workbench.common.dmn.api.property.dmn.types.BuiltInType) Optional(java.util.Optional) EventSourceMock(org.uberfire.mocks.EventSourceMock) SetBuiltinAggregatorCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.dtable.SetBuiltinAggregatorCommand) DecisionTable(org.kie.workbench.common.dmn.api.definition.model.DecisionTable) DeleteHasValueCommand(org.kie.workbench.common.dmn.client.commands.general.DeleteHasValueCommand) Node(org.kie.workbench.common.stunner.core.graph.Node) IntStream(java.util.stream.IntStream) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Viewport(com.ait.lienzo.client.core.shape.Viewport) HasListSelectorControl(org.kie.workbench.common.dmn.client.widgets.grid.controls.list.HasListSelectorControl) CanvasCommandResultBuilder(org.kie.workbench.common.stunner.core.client.command.CanvasCommandResultBuilder) BuiltinAggregator(org.kie.workbench.common.dmn.api.definition.model.BuiltinAggregator) Function(java.util.function.Function) Captor(org.mockito.Captor) ExpressionEditorChanged(org.kie.workbench.common.dmn.client.widgets.grid.model.ExpressionEditorChanged) RefreshFormPropertiesEvent(org.kie.workbench.common.stunner.forms.client.event.RefreshFormPropertiesEvent) BaseBounds(org.uberfire.ext.wires.core.grids.client.model.impl.BaseBounds) Transform(com.ait.lienzo.client.core.types.Transform) LienzoMockitoTestRunner(com.ait.lienzo.test.LienzoMockitoTestRunner) ArgumentCaptor(org.mockito.ArgumentCaptor) ReadOnlyProvider(org.kie.workbench.common.stunner.core.client.ReadOnlyProvider) Element(org.kie.workbench.common.stunner.core.graph.Element) SessionManager(org.kie.workbench.common.stunner.core.client.api.SessionManager) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) DMNEditorConstants(org.kie.workbench.common.dmn.client.resources.i18n.DMNEditorConstants) DMNGridPanel(org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel) InputClauseLiteralExpression(org.kie.workbench.common.dmn.api.definition.model.InputClauseLiteralExpression) CanvasViolation(org.kie.workbench.common.stunner.core.client.command.CanvasViolation) Iterator(java.util.Iterator) Mockito.when(org.mockito.Mockito.when) Definition(org.kie.workbench.common.stunner.core.graph.content.definition.Definition) Mockito.verify(org.mockito.Mockito.verify) Consumer(java.util.function.Consumer) Mockito(org.mockito.Mockito) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Text(org.kie.workbench.common.dmn.api.property.dmn.Text) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) CompositeCommand(org.kie.workbench.common.stunner.core.command.impl.CompositeCommand) Collections(java.util.Collections) QName(org.kie.workbench.common.dmn.api.property.dmn.QName) ValueAndDataTypeHeaderMetaData(org.kie.workbench.common.dmn.client.widgets.grid.columns.ValueAndDataTypeHeaderMetaData) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) Test(org.junit.Test)

Aggregations

CanvasCommand (org.kie.workbench.common.stunner.core.client.command.CanvasCommand)7 Test (org.junit.Test)6 List (java.util.List)3 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)3 CanvasViolation (org.kie.workbench.common.stunner.core.client.command.CanvasViolation)3 Viewport (com.ait.lienzo.client.core.shape.Viewport)2 Transform (com.ait.lienzo.client.core.types.Transform)2 LienzoMockitoTestRunner (com.ait.lienzo.test.LienzoMockitoTestRunner)2 AbsolutePanel (com.google.gwt.user.client.ui.AbsolutePanel)2 Collections (java.util.Collections)2 Iterator (java.util.Iterator)2 Optional (java.util.Optional)2 Consumer (java.util.function.Consumer)2 Function (java.util.function.Function)2 IntStream (java.util.stream.IntStream)2 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)2 ManagedInstance (org.jboss.errai.ioc.client.api.ManagedInstance)2 TranslationService (org.jboss.errai.ui.client.local.spi.TranslationService)2 Assert.assertEquals (org.junit.Assert.assertEquals)2 Assert.assertNull (org.junit.Assert.assertNull)2