Search in sources :

Example 81 with Expression

use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.

the class PromisifyExpressionImpl method basicSetExpression.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) {
    Expression oldExpression = expression;
    expression = newExpression;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.PROMISIFY_EXPRESSION__EXPRESSION, oldExpression, newExpression);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : PromisifyExpression(org.eclipse.n4js.n4JS.PromisifyExpression) Expression(org.eclipse.n4js.n4JS.Expression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 82 with Expression

use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.

the class PropertyMethodDeclarationImpl method existsExplicitSuperCall.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean existsExplicitSuperCall() {
    final Function1<ExpressionStatement, Expression> _function = new Function1<ExpressionStatement, Expression>() {

        public Expression apply(final ExpressionStatement it) {
            return it.getExpression();
        }
    };
    final Function1<ParameterizedCallExpression, Boolean> _function_1 = new Function1<ParameterizedCallExpression, Boolean>() {

        public Boolean apply(final ParameterizedCallExpression it) {
            Expression _target = it.getTarget();
            return Boolean.valueOf((_target instanceof SuperLiteral));
        }
    };
    final boolean existsSuperCall = IteratorExtensions.<ParameterizedCallExpression>exists(Iterators.<ParameterizedCallExpression>filter(IteratorExtensions.<ExpressionStatement, Expression>map(Iterators.<ExpressionStatement>filter(EcoreUtilN4.<Statement>getAllDirectlyFoundContentsOfType(this.getBody(), Statement.class), ExpressionStatement.class), _function), ParameterizedCallExpression.class), _function_1);
    return existsSuperCall;
}
Also used : Expression(org.eclipse.n4js.n4JS.Expression) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) Statement(org.eclipse.n4js.n4JS.Statement) ExpressionStatement(org.eclipse.n4js.n4JS.ExpressionStatement) ExpressionStatement(org.eclipse.n4js.n4JS.ExpressionStatement) Function1(org.eclipse.xtext.xbase.lib.Functions.Function1) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) SuperLiteral(org.eclipse.n4js.n4JS.SuperLiteral)

Example 83 with Expression

use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.

the class N4MethodDeclarationImpl method existsExplicitSuperCall.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public boolean existsExplicitSuperCall() {
    final Function1<ExpressionStatement, Expression> _function = new Function1<ExpressionStatement, Expression>() {

        public Expression apply(final ExpressionStatement it) {
            return it.getExpression();
        }
    };
    final Function1<ParameterizedCallExpression, Boolean> _function_1 = new Function1<ParameterizedCallExpression, Boolean>() {

        public Boolean apply(final ParameterizedCallExpression it) {
            Expression _target = it.getTarget();
            return Boolean.valueOf((_target instanceof SuperLiteral));
        }
    };
    final boolean existsSuperCall = IteratorExtensions.<ParameterizedCallExpression>exists(Iterators.<ParameterizedCallExpression>filter(IteratorExtensions.<ExpressionStatement, Expression>map(Iterators.<ExpressionStatement>filter(EcoreUtilN4.<Statement>getAllDirectlyFoundContentsOfType(this.getBody(), Statement.class), ExpressionStatement.class), _function), ParameterizedCallExpression.class), _function_1);
    return existsSuperCall;
}
Also used : Expression(org.eclipse.n4js.n4JS.Expression) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) Statement(org.eclipse.n4js.n4JS.Statement) ExpressionStatement(org.eclipse.n4js.n4JS.ExpressionStatement) ExpressionStatement(org.eclipse.n4js.n4JS.ExpressionStatement) Function1(org.eclipse.xtext.xbase.lib.Functions.Function1) ParameterizedCallExpression(org.eclipse.n4js.n4JS.ParameterizedCallExpression) SuperLiteral(org.eclipse.n4js.n4JS.SuperLiteral)

Example 84 with Expression

use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.

the class NewExpressionImpl method basicSetCallee.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetCallee(Expression newCallee, NotificationChain msgs) {
    Expression oldCallee = callee;
    callee = newCallee;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.NEW_EXPRESSION__CALLEE, oldCallee, newCallee);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : NewExpression(org.eclipse.n4js.n4JS.NewExpression) Expression(org.eclipse.n4js.n4JS.Expression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 85 with Expression

use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.

the class ParenExpressionImpl method basicSetExpression.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) {
    Expression oldExpression = expression;
    expression = newExpression;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.PAREN_EXPRESSION__EXPRESSION, oldExpression, newExpression);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ParenExpression(org.eclipse.n4js.n4JS.ParenExpression) Expression(org.eclipse.n4js.n4JS.Expression) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

Expression (org.eclipse.n4js.n4JS.Expression)111 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)58 ConditionalExpression (org.eclipse.n4js.n4JS.ConditionalExpression)40 BinaryLogicalExpression (org.eclipse.n4js.n4JS.BinaryLogicalExpression)38 ParameterizedCallExpression (org.eclipse.n4js.n4JS.ParameterizedCallExpression)37 AssignmentExpression (org.eclipse.n4js.n4JS.AssignmentExpression)35 ParameterizedPropertyAccessExpression (org.eclipse.n4js.n4JS.ParameterizedPropertyAccessExpression)33 EqualityExpression (org.eclipse.n4js.n4JS.EqualityExpression)31 ParenExpression (org.eclipse.n4js.n4JS.ParenExpression)31 RelationalExpression (org.eclipse.n4js.n4JS.RelationalExpression)31 UnaryExpression (org.eclipse.n4js.n4JS.UnaryExpression)31 AdditiveExpression (org.eclipse.n4js.n4JS.AdditiveExpression)27 BinaryBitwiseExpression (org.eclipse.n4js.n4JS.BinaryBitwiseExpression)27 IndexedAccessExpression (org.eclipse.n4js.n4JS.IndexedAccessExpression)27 MultiplicativeExpression (org.eclipse.n4js.n4JS.MultiplicativeExpression)27 ShiftExpression (org.eclipse.n4js.n4JS.ShiftExpression)27 AwaitExpression (org.eclipse.n4js.n4JS.AwaitExpression)26 CastExpression (org.eclipse.n4js.n4JS.CastExpression)26 FunctionExpression (org.eclipse.n4js.n4JS.FunctionExpression)26 NewExpression (org.eclipse.n4js.n4JS.NewExpression)26