@Test public void testDeleteParameterBinding() { setupGrid(0); grid.deleteParameterBinding(0); verify(sessionCommandManager).execute(eq(canvasHandler), deleteParameterBindingCommandCaptor.capture()); final DeleteParameterBindingCommand deleteParameterBindingCommand = deleteParameterBindingCommandCaptor.getValue(); deleteParameterBindingCommand.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(); }
void deleteParameterBinding(final int index) { getExpression().get().ifPresent(invocation -> { sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new DeleteParameterBindingCommand(invocation, model, index, () -> resize(BaseExpressionGrid.RESIZE_EXISTING))); }); }
InvocationGrid extends BaseExpressionGrid<Invocation, InvocationGridData, InvocationUIModelMapper> implements HasListSelectorControl { void deleteParameterBinding(final int index) { getExpression().get().ifPresent(invocation -> { sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new DeleteParameterBindingCommand(invocation, model, index, () -> resize(BaseExpressionGrid.RESIZE_EXISTING))); }); } }
InvocationGrid extends BaseExpressionGrid<Invocation, InvocationGridData, InvocationUIModelMapper> implements HasListSelectorControl { void deleteParameterBinding(final int index) { getExpression().get().ifPresent(invocation -> { sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new DeleteParameterBindingCommand(invocation, model, index, () -> resize(BaseExpressionGrid.RESIZE_EXISTING))); }); } InvocationGrid(final GridCellTuple parent,
                          final Optional<String> nodeUUID,
                          final HasExpression hasExpression,
                          final Optional<HasName> hasName,
                          final DMNGridPanel gridPanel,
                          final DMNGridLayer gridLayer,
                          final InvocationGridData gridData,
                          final DefinitionUtils definitionUtils,
                          final SessionManager sessionManager,
                          final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                          final DefaultCanvasCommandFactory canvasCommandFactory,
                          final Event<ExpressionEditorChanged> editorSelectedEvent,
                          final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                          final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                          final CellEditorControlsView.Presenter cellEditorControls,
                          final ListSelectorView.Presenter listSelector,
                          final TranslationService translationService,
                          final boolean isOnlyVisualChangeAllowed,
                          final int nesting,
                          final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                          final ValueAndDataTypePopoverView.Presenter headerEditor,
                          final ReadOnlyProvider readOnlyProvider); }
InvocationGrid extends BaseExpressionGrid<Invocation, InvocationGridData, InvocationUIModelMapper> implements HasListSelectorControl { void deleteParameterBinding(final int index) { getExpression().get().ifPresent(invocation -> { sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new DeleteParameterBindingCommand(invocation, model, index, () -> resize(BaseExpressionGrid.RESIZE_EXISTING))); }); } InvocationGrid(final GridCellTuple parent,
                          final Optional<String> nodeUUID,
                          final HasExpression hasExpression,
                          final Optional<HasName> hasName,
                          final DMNGridPanel gridPanel,
                          final DMNGridLayer gridLayer,
                          final InvocationGridData gridData,
                          final DefinitionUtils definitionUtils,
                          final SessionManager sessionManager,
                          final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                          final DefaultCanvasCommandFactory canvasCommandFactory,
                          final Event<ExpressionEditorChanged> editorSelectedEvent,
                          final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                          final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                          final CellEditorControlsView.Presenter cellEditorControls,
                          final ListSelectorView.Presenter listSelector,
                          final TranslationService translationService,
                          final boolean isOnlyVisualChangeAllowed,
                          final int nesting,
                          final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                          final ValueAndDataTypePopoverView.Presenter headerEditor,
                          final ReadOnlyProvider readOnlyProvider); @Override InvocationUIModelMapper makeUiModelMapper(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override @SuppressWarnings("unused") List<ListSelectorItem> getItems(final int uiRowIndex,
                                           final int uiColumnIndex); @Override void onItemSelected(final ListSelectorItem item); @Override void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex); @Override void doAfterHeaderSelectionChange(final int uiHeaderRowIndex,
                                             final int uiHeaderColumnIndex); }
InvocationGrid extends BaseExpressionGrid<Invocation, InvocationGridData, InvocationUIModelMapper> implements HasListSelectorControl { void deleteParameterBinding(final int index) { getExpression().get().ifPresent(invocation -> { sessionCommandManager.execute((AbstractCanvasHandler) sessionManager.getCurrentSession().getCanvasHandler(), new DeleteParameterBindingCommand(invocation, model, index, () -> resize(BaseExpressionGrid.RESIZE_EXISTING))); }); } InvocationGrid(final GridCellTuple parent,
                          final Optional<String> nodeUUID,
                          final HasExpression hasExpression,
                          final Optional<HasName> hasName,
                          final DMNGridPanel gridPanel,
                          final DMNGridLayer gridLayer,
                          final InvocationGridData gridData,
                          final DefinitionUtils definitionUtils,
                          final SessionManager sessionManager,
                          final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                          final DefaultCanvasCommandFactory canvasCommandFactory,
                          final Event<ExpressionEditorChanged> editorSelectedEvent,
                          final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                          final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                          final CellEditorControlsView.Presenter cellEditorControls,
                          final ListSelectorView.Presenter listSelector,
                          final TranslationService translationService,
                          final boolean isOnlyVisualChangeAllowed,
                          final int nesting,
                          final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                          final ValueAndDataTypePopoverView.Presenter headerEditor,
                          final ReadOnlyProvider readOnlyProvider); @Override InvocationUIModelMapper makeUiModelMapper(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override @SuppressWarnings("unused") List<ListSelectorItem> getItems(final int uiRowIndex,
                                           final int uiColumnIndex); @Override void onItemSelected(final ListSelectorItem item); @Override void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex); @Override void doAfterHeaderSelectionChange(final int uiHeaderRowIndex,
                                             final int uiHeaderColumnIndex);  }