use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.
the class BinaryLogicalExpressionImpl method basicSetLhs.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetLhs(Expression newLhs, NotificationChain msgs) {
Expression oldLhs = lhs;
lhs = newLhs;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.BINARY_LOGICAL_EXPRESSION__LHS, oldLhs, newLhs);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.
the class CaseClauseImpl 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.CASE_CLAUSE__EXPRESSION, oldExpression, newExpression);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.
the class FormalParameterImpl method basicSetInitializer.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetInitializer(Expression newInitializer, NotificationChain msgs) {
Expression oldInitializer = initializer;
initializer = newInitializer;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.FORMAL_PARAMETER__INITIALIZER, oldInitializer, newInitializer);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.
the class PrettyPrinterSwitch method caseTemplateSegment.
@Override
public Boolean caseTemplateSegment(TemplateSegment original) {
if (out.getIndentLevel() != 0) {
// resetting the indent level, we can here simply rely on our parent having already done this.
throw new IllegalStateException("parent TemplateLiteral did not reset the indent level to 0");
}
final TemplateLiteral parent = (TemplateLiteral) original.eContainer();
final List<Expression> segments = parent.getSegments();
final int len = segments.size();
final Expression first = segments.get(0);
final Expression last = segments.get(len - 1);
if (original == first) {
write("`");
} else {
write("}");
}
if (original.getRawValue() != null) {
write(original.getRawValue());
} else {
write(quote(original.getValueAsString()));
}
if (original == last) {
write("`");
} else {
write("${");
}
return DONE;
}
use of org.eclipse.n4js.n4JS.Expression in project n4js by eclipse.
the class ParameterizedPropertyAccessExpressionImpl method basicSetTarget.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetTarget(Expression newTarget, NotificationChain msgs) {
Expression oldTarget = target;
target = newTarget;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.PARAMETERIZED_PROPERTY_ACCESS_EXPRESSION__TARGET, oldTarget, newTarget);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations