@Test public void testToDMNModelExpressionKindFEEL() { setup(false); cellValueSupplier = () -> Optional.of(new ExpressionCellValue(Optional.of(literalExpressionEditor))); mapper.toDMNModel(0, 0, cellValueSupplier); assertEquals(literalExpression, function.getExpression()); }
@Override @SuppressWarnings("unchecked") public void toDMNModel(final int rowIndex, final int columnIndex, final Supplier<Optional<GridCellValue<?>>> cell) { dmnModel.get().ifPresent(function -> { cell.get().ifPresent(v -> { final ExpressionCellValue ecv = (ExpressionCellValue) v; ecv.getValue().ifPresent(beg -> function.setExpression(beg.getExpression().get().orElse(null))); }); }); }
FunctionUIModelMapper extends BaseUIModelMapper<FunctionDefinition> { @Override @SuppressWarnings("unchecked") public void toDMNModel(final int rowIndex, final int columnIndex, final Supplier<Optional<GridCellValue<?>>> cell) { dmnModel.get().ifPresent(function -> { cell.get().ifPresent(v -> { final ExpressionCellValue ecv = (ExpressionCellValue) v; ecv.getValue().ifPresent(beg -> function.setExpression(beg.getExpression().get().orElse(null))); }); }); } }
FunctionUIModelMapper extends BaseUIModelMapper<FunctionDefinition> { @Override @SuppressWarnings("unchecked") public void toDMNModel(final int rowIndex, final int columnIndex, final Supplier<Optional<GridCellValue<?>>> cell) { dmnModel.get().ifPresent(function -> { cell.get().ifPresent(v -> { final ExpressionCellValue ecv = (ExpressionCellValue) v; ecv.getValue().ifPresent(beg -> function.setExpression(beg.getExpression().get().orElse(null))); }); }); } FunctionUIModelMapper(final GridWidget gridWidget,
                                 final Supplier<GridData> uiModel,
                                 final Supplier<Optional<FunctionDefinition>> dmnModel,
                                 final Supplier<Boolean> isOnlyVisualChangeAllowedSupplier,
                                 final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                 final Supplier<ExpressionEditorDefinitions> supplementaryEditorDefinitionsSupplier,
                                 final ListSelectorView.Presenter listSelector,
                                 final int nesting); }
FunctionUIModelMapper extends BaseUIModelMapper<FunctionDefinition> { @Override @SuppressWarnings("unchecked") public void toDMNModel(final int rowIndex, final int columnIndex, final Supplier<Optional<GridCellValue<?>>> cell) { dmnModel.get().ifPresent(function -> { cell.get().ifPresent(v -> { final ExpressionCellValue ecv = (ExpressionCellValue) v; ecv.getValue().ifPresent(beg -> function.setExpression(beg.getExpression().get().orElse(null))); }); }); } FunctionUIModelMapper(final GridWidget gridWidget,
                                 final Supplier<GridData> uiModel,
                                 final Supplier<Optional<FunctionDefinition>> dmnModel,
                                 final Supplier<Boolean> isOnlyVisualChangeAllowedSupplier,
                                 final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                 final Supplier<ExpressionEditorDefinitions> supplementaryEditorDefinitionsSupplier,
                                 final ListSelectorView.Presenter listSelector,
                                 final int nesting); @Override void fromDMNModel(final int rowIndex,
                             final int columnIndex); @Override @SuppressWarnings("unchecked") void toDMNModel(final int rowIndex,
                           final int columnIndex,
                           final Supplier<Optional<GridCellValue<?>>> cell); }
FunctionUIModelMapper extends BaseUIModelMapper<FunctionDefinition> { @Override @SuppressWarnings("unchecked") public void toDMNModel(final int rowIndex, final int columnIndex, final Supplier<Optional<GridCellValue<?>>> cell) { dmnModel.get().ifPresent(function -> { cell.get().ifPresent(v -> { final ExpressionCellValue ecv = (ExpressionCellValue) v; ecv.getValue().ifPresent(beg -> function.setExpression(beg.getExpression().get().orElse(null))); }); }); } FunctionUIModelMapper(final GridWidget gridWidget,
                                 final Supplier<GridData> uiModel,
                                 final Supplier<Optional<FunctionDefinition>> dmnModel,
                                 final Supplier<Boolean> isOnlyVisualChangeAllowedSupplier,
                                 final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                 final Supplier<ExpressionEditorDefinitions> supplementaryEditorDefinitionsSupplier,
                                 final ListSelectorView.Presenter listSelector,
                                 final int nesting); @Override void fromDMNModel(final int rowIndex,
                             final int columnIndex); @Override @SuppressWarnings("unchecked") void toDMNModel(final int rowIndex,
                           final int columnIndex,
                           final Supplier<Optional<GridCellValue<?>>> cell);  }