Search in sources :

Example 6 with Expression

use of org.eclipse.bpmn2.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.eclipse.bpmn2.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.eclipse.bpmn2.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.eclipse.bpmn2.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.eclipse.bpmn2.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 Expression (org.apache.commons.jexl2.Expression)14 JexlContext (org.apache.commons.jexl2.JexlContext)12 JexlEngine (org.apache.commons.jexl2.JexlEngine)9 MapContext (org.apache.commons.jexl2.MapContext)8 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)7 Expression (org.eclipse.xtext.resource.bug385636.Expression)7 ExpressionCellValue (org.kie.workbench.common.dmn.client.editors.expressions.types.context.ExpressionCellValue)7 BaseExpressionGrid (org.kie.workbench.common.dmn.client.widgets.grid.BaseExpressionGrid)6 ArrayList (java.util.ArrayList)5 Expression (org.kie.dmn.model.v1_1.Expression)5 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)5 BaseGridCellValue (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridCellValue)5 Description (org.kie.workbench.common.dmn.api.property.dmn.Description)4 Id (org.kie.workbench.common.dmn.api.property.dmn.Id)4 ExpressionEditorDefinition (org.kie.workbench.common.dmn.client.editors.expressions.types.ExpressionEditorDefinition)4 GridCellTuple (org.kie.workbench.common.dmn.client.widgets.grid.model.GridCellTuple)4 CompiledExpression (org.kie.dmn.feel.lang.CompiledExpression)3 HasExpression (org.kie.workbench.common.dmn.api.definition.HasExpression)3 HashMap (java.util.HashMap)2