@Test public void testEnrich() { baseSupplementaryFunctionEditorDefinition.enrich(nodeUUID, hasExpression, expression); final List<ContextEntry> entry = expression.get().getContextEntry(); assertEquals(2, entry.size()); checkIfIsBuiltInTypeString(entry.get(0)); checkIfIsBuiltInTypeString(entry.get(1)); }
@Override public void enrich(final Optional<String> nodeUUID, final HasExpression hasExpression, final Optional<Context> expression) { expression.ifPresent(context -> getVariableNames().forEach(name -> { final ContextEntry contextEntry = new ContextEntry(); contextEntry.setVariable(createVariable(name)); contextEntry.setExpression(new LiteralExpression()); context.getContextEntry().add(contextEntry); contextEntry.setParent(context); })); }
BaseSupplementaryFunctionEditorDefinition extends BaseEditorDefinition<Context, FunctionSupplementaryGridData> { @Override public void enrich(final Optional<String> nodeUUID, final HasExpression hasExpression, final Optional<Context> expression) { expression.ifPresent(context -> getVariableNames().forEach(name -> { final ContextEntry contextEntry = new ContextEntry(); contextEntry.setVariable(createVariable(name)); contextEntry.setExpression(new LiteralExpression()); context.getContextEntry().add(contextEntry); contextEntry.setParent(context); })); } }
BaseSupplementaryFunctionEditorDefinition extends BaseEditorDefinition<Context, FunctionSupplementaryGridData> { @Override public void enrich(final Optional<String> nodeUUID, final HasExpression hasExpression, final Optional<Context> expression) { expression.ifPresent(context -> getVariableNames().forEach(name -> { final ContextEntry contextEntry = new ContextEntry(); contextEntry.setVariable(createVariable(name)); contextEntry.setExpression(new LiteralExpression()); context.getContextEntry().add(contextEntry); contextEntry.setParent(context); })); } protected  BaseSupplementaryFunctionEditorDefinition();  BaseSupplementaryFunctionEditorDefinition(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 ListSelectorView.Presenter listSelector,
                                                     final TranslationService translationService,
                                                     final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                                     final ReadOnlyProvider readOnlyProvider); }
BaseSupplementaryFunctionEditorDefinition extends BaseEditorDefinition<Context, FunctionSupplementaryGridData> { @Override public void enrich(final Optional<String> nodeUUID, final HasExpression hasExpression, final Optional<Context> expression) { expression.ifPresent(context -> getVariableNames().forEach(name -> { final ContextEntry contextEntry = new ContextEntry(); contextEntry.setVariable(createVariable(name)); contextEntry.setExpression(new LiteralExpression()); context.getContextEntry().add(contextEntry); contextEntry.setParent(context); })); } protected  BaseSupplementaryFunctionEditorDefinition();  BaseSupplementaryFunctionEditorDefinition(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 ListSelectorView.Presenter listSelector,
                                                     final TranslationService translationService,
                                                     final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                                     final ReadOnlyProvider readOnlyProvider); @Override Optional<Context> getModelClass(); @Override void enrich(final Optional<String> nodeUUID,
                       final HasExpression hasExpression,
                       final Optional<Context> expression); @Override Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>> getEditor(final GridCellTuple parent,
                                                                                                                         final Optional<String> nodeUUID,
                                                                                                                         final HasExpression hasExpression,
                                                                                                                         final Optional<HasName> hasName,
                                                                                                                         final boolean isOnlyVisualChangeAllowed,
                                                                                                                         final int nesting); }
BaseSupplementaryFunctionEditorDefinition extends BaseEditorDefinition<Context, FunctionSupplementaryGridData> { @Override public void enrich(final Optional<String> nodeUUID, final HasExpression hasExpression, final Optional<Context> expression) { expression.ifPresent(context -> getVariableNames().forEach(name -> { final ContextEntry contextEntry = new ContextEntry(); contextEntry.setVariable(createVariable(name)); contextEntry.setExpression(new LiteralExpression()); context.getContextEntry().add(contextEntry); contextEntry.setParent(context); })); } protected  BaseSupplementaryFunctionEditorDefinition();  BaseSupplementaryFunctionEditorDefinition(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 ListSelectorView.Presenter listSelector,
                                                     final TranslationService translationService,
                                                     final Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                                     final ReadOnlyProvider readOnlyProvider); @Override Optional<Context> getModelClass(); @Override void enrich(final Optional<String> nodeUUID,
                       final HasExpression hasExpression,
                       final Optional<Context> expression); @Override Optional<BaseExpressionGrid<? extends Expression, ? extends GridData, ? extends BaseUIModelMapper>> getEditor(final GridCellTuple parent,
                                                                                                                         final Optional<String> nodeUUID,
                                                                                                                         final HasExpression hasExpression,
                                                                                                                         final Optional<HasName> hasName,
                                                                                                                         final boolean isOnlyVisualChangeAllowed,
                                                                                                                         final int nesting);  }