Search in sources :

Example 31 with List

use of org.kie.workbench.common.dmn.api.definition.v1_1.List in project kie-wb-common by kiegroup.

the class MoveColumnsCommand method newGraphCommand.

@Override
protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) {
    return new AbstractGraphCommand() {

        @Override
        protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) {
            return isColumnInValidSection() ? GraphCommandResultBuilder.SUCCESS : GraphCommandResultBuilder.FAILED;
        }

        private boolean isColumnInValidSection() {
            final DecisionTableSection section = DecisionTableUIModelMapperHelper.getSection(dtable, index);
            return section == DecisionTableSection.INPUT_CLAUSES || section == DecisionTableSection.OUTPUT_CLAUSES;
        }

        @Override
        public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) {
            return moveClauses(index);
        }

        @Override
        public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) {
            return moveClauses(oldIndex);
        }

        private CommandResult<RuleViolation> moveClauses(final int index) {
            final DecisionTableSection section = DecisionTableUIModelMapperHelper.getSection(dtable, index);
            if (section == DecisionTableSection.INPUT_CLAUSES) {
                final int oldIndex = uiModel.getColumns().indexOf(columns.get(0));
                final int relativeIndex = DecisionTableUIModelMapperHelper.getInputEntryIndex(dtable, index);
                final int relativeOldIndex = DecisionTableUIModelMapperHelper.getInputEntryIndex(dtable, oldIndex);
                final List<Integer> inputClauseIndexesToMove = columns.stream().map(c -> uiModel.getColumns().indexOf(c)).map(i -> DecisionTableUIModelMapperHelper.getInputEntryIndex(dtable, i)).collect(Collectors.toList());
                moveClauses(relativeIndex, relativeOldIndex, dtable.getInput(), inputClauseIndexesToMove);
                final List<List<UnaryTests>> decisionRulesInputEntries = dtable.getRule().stream().map(DecisionRule::getInputEntry).collect(Collectors.toList());
                updateDecisionRules(relativeIndex, relativeOldIndex, decisionRulesInputEntries, inputClauseIndexesToMove);
                return GraphCommandResultBuilder.SUCCESS;
            } else if (section == DecisionTableSection.OUTPUT_CLAUSES) {
                final int oldIndex = uiModel.getColumns().indexOf(columns.get(0));
                final int relativeIndex = DecisionTableUIModelMapperHelper.getOutputEntryIndex(dtable, index);
                final int relativeOldIndex = DecisionTableUIModelMapperHelper.getOutputEntryIndex(dtable, oldIndex);
                final List<Integer> outputClauseIndexesToMove = columns.stream().map(c -> uiModel.getColumns().indexOf(c)).map(i -> DecisionTableUIModelMapperHelper.getOutputEntryIndex(dtable, i)).collect(Collectors.toList());
                moveClauses(relativeIndex, relativeOldIndex, dtable.getOutput(), outputClauseIndexesToMove);
                final List<List<LiteralExpression>> decisionRulesOutputEntries = dtable.getRule().stream().map(DecisionRule::getOutputEntry).collect(Collectors.toList());
                updateDecisionRules(relativeIndex, relativeOldIndex, decisionRulesOutputEntries, outputClauseIndexesToMove);
                return GraphCommandResultBuilder.SUCCESS;
            } else {
                return GraphCommandResultBuilder.FAILED;
            }
        }

        private <T> void moveClauses(final int relativeIndex, final int relativeOldIndex, final List<T> clauses, final List<Integer> clauseIndexesToMove) {
            final List<T> clausesToMove = clauseIndexesToMove.stream().map(clauses::get).collect(Collectors.toList());
            clauses.removeAll(clausesToMove);
            if (relativeIndex < relativeOldIndex) {
                clauses.addAll(relativeIndex, clausesToMove);
            } else if (relativeIndex > relativeOldIndex) {
                clauses.addAll(relativeIndex - clausesToMove.size() + 1, clausesToMove);
            }
        }

        private <T> void updateDecisionRules(final int relativeIndex, final int relativeOldIndex, final List<List<T>> clauses, final List<Integer> clauseIndexesToMove) {
            clauses.forEach(row -> moveClauses(relativeIndex, relativeOldIndex, row, clauseIndexesToMove));
        }
    };
}
Also used : DMNGridData(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData) DecisionTable(org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTable) DecisionTableUIModelMapperHelper(org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.DecisionTableUIModelMapperHelper) CanvasViolation(org.kie.workbench.common.stunner.core.client.command.CanvasViolation) DecisionRule(org.kie.workbench.common.dmn.api.definition.v1_1.DecisionRule) LiteralExpression(org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression) VetoExecutionCommand(org.kie.workbench.common.dmn.client.commands.VetoExecutionCommand) CanvasCommandResultBuilder(org.kie.workbench.common.stunner.core.client.command.CanvasCommandResultBuilder) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn) AbstractCanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler) AbstractCanvasCommand(org.kie.workbench.common.stunner.core.client.canvas.command.AbstractCanvasCommand) Collectors(java.util.stream.Collectors) AbstractCanvasGraphCommand(org.kie.workbench.common.stunner.core.client.canvas.command.AbstractCanvasGraphCommand) ArrayList(java.util.ArrayList) List(java.util.List) RuleViolation(org.kie.workbench.common.stunner.core.rule.RuleViolation) AbstractGraphCommand(org.kie.workbench.common.stunner.core.graph.command.impl.AbstractGraphCommand) UnaryTests(org.kie.workbench.common.dmn.api.definition.v1_1.UnaryTests) Command(org.kie.workbench.common.stunner.core.command.Command) GraphCommandExecutionContext(org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext) GraphCommandResultBuilder(org.kie.workbench.common.stunner.core.graph.command.GraphCommandResultBuilder) VetoUndoCommand(org.kie.workbench.common.dmn.client.commands.VetoUndoCommand) CommandResult(org.kie.workbench.common.stunner.core.command.CommandResult) DecisionTableSection(org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.DecisionTableUIModelMapperHelper.DecisionTableSection) DecisionTableSection(org.kie.workbench.common.dmn.client.editors.expressions.types.dtable.DecisionTableUIModelMapperHelper.DecisionTableSection) LiteralExpression(org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression) RuleViolation(org.kie.workbench.common.stunner.core.rule.RuleViolation) DecisionRule(org.kie.workbench.common.dmn.api.definition.v1_1.DecisionRule) AbstractGraphCommand(org.kie.workbench.common.stunner.core.graph.command.impl.AbstractGraphCommand) GraphCommandExecutionContext(org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext) ArrayList(java.util.ArrayList) List(java.util.List)

Example 32 with List

use of org.kie.workbench.common.dmn.api.definition.v1_1.List in project kie-wb-common by kiegroup.

the class MoveColumnsCommand method newGraphCommand.

@Override
protected Command<GraphCommandExecutionContext, RuleViolation> newGraphCommand(final AbstractCanvasHandler context) {
    return new AbstractGraphCommand() {

        @Override
        protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) {
            return isColumnInValidSection() ? GraphCommandResultBuilder.SUCCESS : GraphCommandResultBuilder.FAILED;
        }

        private boolean isColumnInValidSection() {
            final RelationSection section = RelationUIModelMapperHelper.getSection(relation, index);
            return section == RelationSection.INFORMATION_ITEM;
        }

        @Override
        public CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context) {
            return moveInformationItems(index);
        }

        @Override
        public CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context) {
            return moveInformationItems(oldIndex);
        }

        private CommandResult<RuleViolation> moveInformationItems(final int index) {
            final RelationSection section = RelationUIModelMapperHelper.getSection(relation, index);
            if (section == RelationSection.INFORMATION_ITEM) {
                final int oldIndex = uiModel.getColumns().indexOf(columns.get(0));
                final int relativeIndex = RelationUIModelMapperHelper.getInformationItemIndex(relation, index);
                final int relativeOldIndex = RelationUIModelMapperHelper.getInformationItemIndex(relation, oldIndex);
                final java.util.List<Integer> informationItemIndexesToMove = columns.stream().map(c -> uiModel.getColumns().indexOf(c)).map(i -> RelationUIModelMapperHelper.getInformationItemIndex(relation, i)).collect(Collectors.toList());
                moveInformationItems(relativeIndex, relativeOldIndex, relation.getColumn(), informationItemIndexesToMove);
                updateRowsData(relativeIndex, relativeOldIndex, relation.getRow(), informationItemIndexesToMove);
                return GraphCommandResultBuilder.SUCCESS;
            } else {
                return GraphCommandResultBuilder.FAILED;
            }
        }

        private <T> void moveInformationItems(final int relativeIndex, final int relativeOldIndex, final java.util.List<T> informationItems, final java.util.List<Integer> informationItemIndexesToMove) {
            final java.util.List<T> informationItemsToMove = informationItemIndexesToMove.stream().map(informationItems::get).collect(Collectors.toList());
            informationItems.removeAll(informationItemsToMove);
            if (relativeIndex < relativeOldIndex) {
                informationItems.addAll(relativeIndex, informationItemsToMove);
            } else if (relativeIndex > relativeOldIndex) {
                informationItems.addAll(relativeIndex - informationItemsToMove.size() + 1, informationItemsToMove);
            }
        }

        private void updateRowsData(final int relativeIndex, final int relativeOldIndex, final java.util.List<List> rows, final java.util.List<Integer> informationItemIndexesToMove) {
            rows.forEach(row -> moveInformationItems(relativeIndex, relativeOldIndex, row.getExpression(), informationItemIndexesToMove));
        }
    };
}
Also used : RelationSection(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapperHelper.RelationSection) DMNGridData(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData) RelationUIModelMapperHelper(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapperHelper) CanvasViolation(org.kie.workbench.common.stunner.core.client.command.CanvasViolation) VetoExecutionCommand(org.kie.workbench.common.dmn.client.commands.VetoExecutionCommand) CanvasCommandResultBuilder(org.kie.workbench.common.stunner.core.client.command.CanvasCommandResultBuilder) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn) AbstractCanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler) AbstractCanvasCommand(org.kie.workbench.common.stunner.core.client.canvas.command.AbstractCanvasCommand) Collectors(java.util.stream.Collectors) AbstractCanvasGraphCommand(org.kie.workbench.common.stunner.core.client.canvas.command.AbstractCanvasGraphCommand) ArrayList(java.util.ArrayList) CommandUtils(org.kie.workbench.common.dmn.client.commands.util.CommandUtils) RuleViolation(org.kie.workbench.common.stunner.core.rule.RuleViolation) List(org.kie.workbench.common.dmn.api.definition.v1_1.List) AbstractGraphCommand(org.kie.workbench.common.stunner.core.graph.command.impl.AbstractGraphCommand) Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) Command(org.kie.workbench.common.stunner.core.command.Command) GraphCommandExecutionContext(org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext) GraphCommandResultBuilder(org.kie.workbench.common.stunner.core.graph.command.GraphCommandResultBuilder) VetoUndoCommand(org.kie.workbench.common.dmn.client.commands.VetoUndoCommand) CommandResult(org.kie.workbench.common.stunner.core.command.CommandResult) RuleViolation(org.kie.workbench.common.stunner.core.rule.RuleViolation) AbstractGraphCommand(org.kie.workbench.common.stunner.core.graph.command.impl.AbstractGraphCommand) GraphCommandExecutionContext(org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext) ArrayList(java.util.ArrayList) List(org.kie.workbench.common.dmn.api.definition.v1_1.List) RelationSection(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapperHelper.RelationSection)

Example 33 with List

use of org.kie.workbench.common.dmn.api.definition.v1_1.List in project kie-wb-common by kiegroup.

the class ContextGrid method getItems.

@Override
@SuppressWarnings("unused")
public List<ListSelectorItem> getItems(final int uiRowIndex, final int uiColumnIndex) {
    final List<ListSelectorItem> items = new ArrayList<>();
    if (uiRowIndex == model.getRowCount() - 1) {
        return items;
    }
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.ContextEditor_InsertContextEntryAbove), true, () -> {
        cellEditorControls.hide();
        expression.ifPresent(e -> addContextEntry(uiRowIndex));
    }));
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.ContextEditor_InsertContextEntryBelow), true, () -> {
        cellEditorControls.hide();
        expression.ifPresent(e -> addContextEntry(uiRowIndex + 1));
    }));
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.ContextEditor_DeleteContextEntry), model.getRowCount() > 2 && uiRowIndex < model.getRowCount() - 1, () -> {
        cellEditorControls.hide();
        deleteContextEntry(uiRowIndex);
    }));
    // If not ExpressionEditor column don't add extra items
    if (ContextUIModelMapperHelper.getSection(uiColumnIndex) != ContextUIModelMapperHelper.ContextSection.EXPRESSION) {
        return items;
    }
    // If cell editor is UndefinedExpressionGrid don't add extra items
    final GridCell<?> cell = model.getCell(uiRowIndex, uiColumnIndex);
    final ExpressionCellValue ecv = (ExpressionCellValue) cell.getValue();
    if (!ecv.getValue().isPresent()) {
        return items;
    }
    final BaseExpressionGrid grid = ecv.getValue().get();
    if (grid instanceof UndefinedExpressionGrid) {
        return items;
    }
    items.add(new ListSelectorDividerItem());
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.ExpressionEditor_Clear), true, () -> {
        cellEditorControls.hide();
        clearExpressionType(uiRowIndex);
    }));
    return items;
}
Also used : AddContextEntryCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.context.AddContextEntryCommand) CellEditorControlsView(org.kie.workbench.common.dmn.client.widgets.grid.controls.container.CellEditorControlsView) DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) HasListSelectorControl(org.kie.workbench.common.dmn.client.widgets.grid.controls.list.HasListSelectorControl) ListSelectorView(org.kie.workbench.common.dmn.client.widgets.grid.controls.list.ListSelectorView) BaseExpressionGrid(org.kie.workbench.common.dmn.client.widgets.grid.BaseExpressionGrid) DMNGridLayer(org.kie.workbench.common.dmn.client.widgets.layer.DMNGridLayer) GridWidgetHandlersOperation(org.uberfire.ext.wires.core.grids.client.widget.dnd.GridWidgetDnDHandlersState.GridWidgetHandlersOperation) ClearExpressionTypeCommand(org.kie.workbench.common.dmn.client.commands.general.ClearExpressionTypeCommand) ExpressionEditorDefinitions(org.kie.workbench.common.dmn.client.editors.expressions.types.ExpressionEditorDefinitions) Supplier(java.util.function.Supplier) BaseHeaderMetaData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData) ArrayList(java.util.ArrayList) DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow) GridRow(org.uberfire.ext.wires.core.grids.client.model.GridRow) RowNumberColumn(org.uberfire.ext.wires.core.grids.client.widget.grid.columns.RowNumberColumn) UndefinedExpressionGrid(org.kie.workbench.common.dmn.client.editors.expressions.types.undefined.UndefinedExpressionGrid) HasExpression(org.kie.workbench.common.dmn.api.definition.HasExpression) GridCellTuple(org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple) DeleteContextEntryCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.context.DeleteContextEntryCommand) SessionManager(org.kie.workbench.common.stunner.core.client.api.SessionManager) DMNEditorConstants(org.kie.workbench.common.dmn.client.resources.i18n.DMNEditorConstants) DMNGridPanel(org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel) EventPropagationMode(com.ait.lienzo.shared.core.types.EventPropagationMode) TranslationService(org.jboss.errai.ui.client.local.spi.TranslationService) CanvasCommandFactory(org.kie.workbench.common.stunner.core.client.command.CanvasCommandFactory) GridCell(org.uberfire.ext.wires.core.grids.client.model.GridCell) HasRowDragRestrictions(org.kie.workbench.common.dmn.client.widgets.grid.model.HasRowDragRestrictions) GridDataCache(org.kie.workbench.common.dmn.client.widgets.grid.model.GridDataCache) AbstractCanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler) SessionCommandManager(org.kie.workbench.common.stunner.core.client.command.SessionCommandManager) HasName(org.kie.workbench.common.dmn.api.definition.HasName) List(java.util.List) Context(org.kie.workbench.common.dmn.api.definition.v1_1.Context) Optional(java.util.Optional) ContextEntry(org.kie.workbench.common.dmn.api.definition.v1_1.ContextEntry) GridWidgetDnDHandlersState(org.uberfire.ext.wires.core.grids.client.widget.dnd.GridWidgetDnDHandlersState) InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) BaseExpressionGrid(org.kie.workbench.common.dmn.client.widgets.grid.BaseExpressionGrid) UndefinedExpressionGrid(org.kie.workbench.common.dmn.client.editors.expressions.types.undefined.UndefinedExpressionGrid) ArrayList(java.util.ArrayList)

Example 34 with List

use of org.kie.workbench.common.dmn.api.definition.v1_1.List in project kie-wb-common by kiegroup.

the class DecisionTableEditorDefinitionTest method testModelDefinition.

@Test
public void testModelDefinition() {
    final Optional<DecisionTable> oModel = definition.getModelClass();
    assertThat(oModel).isPresent();
    final DecisionTable model = oModel.get();
    assertThat(model.getHitPolicy()).isEqualTo(HitPolicy.ANY);
    assertThat(model.getPreferredOrientation()).isEqualTo(DecisionTableOrientation.RULE_AS_ROW);
    final List<InputClause> input = model.getInput();
    assertThat(input.size()).isEqualTo(1);
    assertThat(input.get(0).getInputExpression()).isInstanceOf(LiteralExpression.class);
    final List<OutputClause> output = model.getOutput();
    assertThat(output.size()).isEqualTo(1);
    final List<DecisionRule> rules = model.getRule();
    assertThat(rules.size()).isEqualTo(1);
    final DecisionRule rule = rules.get(0);
    assertThat(rule.getInputEntry().size()).isEqualTo(1);
    assertThat(rule.getInputEntry().get(0)).isInstanceOf(UnaryTests.class);
    assertThat(rule.getOutputEntry().size()).isEqualTo(1);
    assertThat(rule.getOutputEntry().get(0)).isInstanceOf(LiteralExpression.class);
    assertThat(rule.getDescription()).isNotNull();
}
Also used : OutputClause(org.kie.workbench.common.dmn.api.definition.v1_1.OutputClause) DecisionTable(org.kie.workbench.common.dmn.api.definition.v1_1.DecisionTable) InputClause(org.kie.workbench.common.dmn.api.definition.v1_1.InputClause) DecisionRule(org.kie.workbench.common.dmn.api.definition.v1_1.DecisionRule) Test(org.junit.Test)

Example 35 with List

use of org.kie.workbench.common.dmn.api.definition.v1_1.List in project kie-wb-common by kiegroup.

the class InvocationGrid method getItems.

@Override
@SuppressWarnings("unused")
public List<ListSelectorItem> getItems(final int uiRowIndex, final int uiColumnIndex) {
    final List<ListSelectorItem> items = new ArrayList<>();
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.InvocationEditor_InsertParameterAbove), true, () -> {
        cellEditorControls.hide();
        expression.ifPresent(e -> addParameterBinding(uiRowIndex));
    }));
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.InvocationEditor_InsertParameterBelow), true, () -> {
        cellEditorControls.hide();
        expression.ifPresent(e -> addParameterBinding(uiRowIndex + 1));
    }));
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.InvocationEditor_DeleteParameter), model.getRowCount() > 1, () -> {
        cellEditorControls.hide();
        deleteParameterBinding(uiRowIndex);
    }));
    // If not ExpressionEditor column don't add extra items
    if (uiColumnIndex != InvocationUIModelMapper.BINDING_EXPRESSION_COLUMN_INDEX) {
        return items;
    }
    // If cell editor is UndefinedExpressionGrid don't add extra items
    final GridCell<?> cell = model.getCell(uiRowIndex, uiColumnIndex);
    final ExpressionCellValue ecv = (ExpressionCellValue) cell.getValue();
    if (!ecv.getValue().isPresent()) {
        return items;
    }
    final BaseExpressionGrid grid = ecv.getValue().get();
    if (grid instanceof UndefinedExpressionGrid) {
        return items;
    }
    items.add(new ListSelectorDividerItem());
    items.add(ListSelectorTextItem.build(translationService.format(DMNEditorConstants.ExpressionEditor_Clear), true, () -> {
        cellEditorControls.hide();
        clearExpressionType(uiRowIndex);
    }));
    return items;
}
Also used : CellEditorControlsView(org.kie.workbench.common.dmn.client.widgets.grid.controls.container.CellEditorControlsView) Arrays(java.util.Arrays) DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) AddParameterBindingCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.invocation.AddParameterBindingCommand) HasListSelectorControl(org.kie.workbench.common.dmn.client.widgets.grid.controls.list.HasListSelectorControl) ListSelectorView(org.kie.workbench.common.dmn.client.widgets.grid.controls.list.ListSelectorView) LiteralExpression(org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression) BaseExpressionGrid(org.kie.workbench.common.dmn.client.widgets.grid.BaseExpressionGrid) DMNGridLayer(org.kie.workbench.common.dmn.client.widgets.layer.DMNGridLayer) Binding(org.kie.workbench.common.dmn.api.definition.v1_1.Binding) ClearExpressionTypeCommand(org.kie.workbench.common.dmn.client.commands.general.ClearExpressionTypeCommand) ExpressionEditorDefinitions(org.kie.workbench.common.dmn.client.editors.expressions.types.ExpressionEditorDefinitions) Supplier(java.util.function.Supplier) BaseHeaderMetaData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseHeaderMetaData) ArrayList(java.util.ArrayList) DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow) RowNumberColumn(org.uberfire.ext.wires.core.grids.client.widget.grid.columns.RowNumberColumn) Name(org.kie.workbench.common.dmn.api.property.dmn.Name) UndefinedExpressionGrid(org.kie.workbench.common.dmn.client.editors.expressions.types.undefined.UndefinedExpressionGrid) HasExpression(org.kie.workbench.common.dmn.api.definition.HasExpression) GridCellTuple(org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple) SessionManager(org.kie.workbench.common.stunner.core.client.api.SessionManager) DMNEditorConstants(org.kie.workbench.common.dmn.client.resources.i18n.DMNEditorConstants) DMNGridPanel(org.kie.workbench.common.dmn.client.widgets.panel.DMNGridPanel) EventPropagationMode(com.ait.lienzo.shared.core.types.EventPropagationMode) TranslationService(org.jboss.errai.ui.client.local.spi.TranslationService) CanvasCommandFactory(org.kie.workbench.common.stunner.core.client.command.CanvasCommandFactory) GridCell(org.uberfire.ext.wires.core.grids.client.model.GridCell) GridDataCache(org.kie.workbench.common.dmn.client.widgets.grid.model.GridDataCache) AbstractCanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler) SessionCommandManager(org.kie.workbench.common.stunner.core.client.command.SessionCommandManager) DeleteParameterBindingCommand(org.kie.workbench.common.dmn.client.commands.expressions.types.invocation.DeleteParameterBindingCommand) HasName(org.kie.workbench.common.dmn.api.definition.HasName) NameColumnHeaderMetaData(org.kie.workbench.common.dmn.client.editors.expressions.types.context.NameColumnHeaderMetaData) List(java.util.List) TextBoxSingletonDOMElementFactory(org.kie.workbench.common.dmn.client.widgets.grid.columns.factory.TextBoxSingletonDOMElementFactory) ExpressionCellValue(org.kie.workbench.common.dmn.client.editors.expressions.types.context.ExpressionCellValue) Optional(java.util.Optional) ExpressionEditorColumn(org.kie.workbench.common.dmn.client.editors.expressions.types.context.ExpressionEditorColumn) InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem) Invocation(org.kie.workbench.common.dmn.api.definition.v1_1.Invocation) BaseExpressionGrid(org.kie.workbench.common.dmn.client.widgets.grid.BaseExpressionGrid) UndefinedExpressionGrid(org.kie.workbench.common.dmn.client.editors.expressions.types.undefined.UndefinedExpressionGrid) ArrayList(java.util.ArrayList) ExpressionCellValue(org.kie.workbench.common.dmn.client.editors.expressions.types.context.ExpressionCellValue)

Aggregations

List (org.kie.workbench.common.dmn.api.definition.v1_1.List)26 Test (org.junit.Test)22 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)20 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)15 DMNGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)15 List (java.util.List)13 AbstractCanvasHandler (org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler)13 GraphCommandExecutionContext (org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext)11 RuleViolation (org.kie.workbench.common.stunner.core.rule.RuleViolation)11 CanvasViolation (org.kie.workbench.common.stunner.core.client.command.CanvasViolation)10 ArrayList (java.util.ArrayList)9 Optional (java.util.Optional)7 Relation (org.kie.workbench.common.dmn.api.definition.v1_1.Relation)7 Expression (org.kie.workbench.common.dmn.api.definition.v1_1.Expression)6 HasExpression (org.kie.workbench.common.dmn.api.definition.HasExpression)5 HasName (org.kie.workbench.common.dmn.api.definition.HasName)5 DRGElement (org.kie.workbench.common.dmn.api.definition.v1_1.DRGElement)5 GridDataCache (org.kie.workbench.common.dmn.client.widgets.grid.model.GridDataCache)5 Edge (org.kie.workbench.common.stunner.core.graph.Edge)5 View (org.kie.workbench.common.stunner.core.graph.content.view.View)5