Search in sources :

Example 6 with Expression

use of org.kie.workbench.common.dmn.api.definition.v1_1.Expression in project xtext-core by eclipse.

the class Expression_Not_LessImpl method basicSetLeft.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs) {
    Expression oldLeft = left;
    left = newLeft;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug385636Package.EXPRESSION_NOT_LESS__LEFT, oldLeft, newLeft);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Expression(org.eclipse.xtext.resource.bug385636.Expression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 7 with Expression

use of org.kie.workbench.common.dmn.api.definition.v1_1.Expression in project xtext-core by eclipse.

the class Expression_SmallerImpl method basicSetLeft.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetLeft(Expression newLeft, NotificationChain msgs) {
    Expression oldLeft = left;
    left = newLeft;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug385636Package.EXPRESSION_SMALLER__LEFT, oldLeft, newLeft);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Expression(org.eclipse.xtext.resource.bug385636.Expression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 8 with Expression

use of org.kie.workbench.common.dmn.api.definition.v1_1.Expression in project drools by kiegroup.

the class DMNListConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    List list = (List) parent;
    for (Expression e : list.getExpression()) {
        writeChildrenNode(writer, context, e, MarshallingUtils.defineExpressionNodeName(e));
    }
}
Also used : Expression(org.kie.dmn.model.v1_1.Expression) List(org.kie.dmn.model.v1_1.List)

Example 9 with Expression

use of org.kie.workbench.common.dmn.api.definition.v1_1.Expression in project drools by kiegroup.

the class DMNEvaluatorCompiler method compileList.

private DMNExpressionEvaluator compileList(DMNCompilerContext ctx, DMNModelImpl model, DMNBaseNode node, String listName, org.kie.dmn.model.v1_1.List expression) {
    org.kie.dmn.model.v1_1.List listDef = expression;
    DMNListEvaluator listEval = new DMNListEvaluator(node.getName(), node.getSource(), listDef);
    for (Expression expr : listDef.getExpression()) {
        listEval.addElement(compileExpression(ctx, model, node, listName, expr));
    }
    return listEval;
}
Also used : LiteralExpression(org.kie.dmn.model.v1_1.LiteralExpression) CompiledExpression(org.kie.dmn.feel.lang.CompiledExpression) Expression(org.kie.dmn.model.v1_1.Expression) DMNListEvaluator(org.kie.dmn.core.ast.DMNListEvaluator)

Example 10 with Expression

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

the class BindingPropertyConverter method wbFromDMN.

public static Binding wbFromDMN(final org.kie.dmn.model.v1_1.Binding dmn) {
    if (dmn == null) {
        return null;
    }
    InformationItem convertedParameter = InformationItemPropertyConverter.wbFromDMN(dmn.getParameter());
    Expression convertedExpression = ExpressionPropertyConverter.wbFromDMN(dmn.getExpression());
    Binding result = new Binding();
    result.setParameter(convertedParameter);
    result.setExpression(convertedExpression);
    return result;
}
Also used : Binding(org.kie.workbench.common.dmn.api.definition.v1_1.Binding) Expression(org.kie.workbench.common.dmn.api.definition.v1_1.Expression) InformationItem(org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)

Aggregations

Expression (org.kie.workbench.common.dmn.api.definition.v1_1.Expression)19 BaseExpressionGrid (org.kie.workbench.common.dmn.client.widgets.grid.BaseExpressionGrid)15 Expression (org.apache.commons.jexl2.Expression)14 GridCellTuple (org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple)13 JexlContext (org.apache.commons.jexl2.JexlContext)12 Test (org.junit.Test)12 HasExpression (org.kie.workbench.common.dmn.api.definition.HasExpression)12 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)11 HasName (org.kie.workbench.common.dmn.api.definition.HasName)10 JexlEngine (org.apache.commons.jexl2.JexlEngine)9 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)9 BaseGridCellValue (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridCellValue)9 GridWidget (org.uberfire.ext.wires.core.grids.client.widget.grid.GridWidget)9 MapContext (org.apache.commons.jexl2.MapContext)8 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)7 Expression (org.eclipse.xtext.resource.bug385636.Expression)7 Optional (java.util.Optional)6 Before (org.junit.Before)6 Decision (org.kie.workbench.common.dmn.api.definition.v1_1.Decision)6 Name (org.kie.workbench.common.dmn.api.property.dmn.Name)6