use of org.eclipse.n4js.n4JS.BindingPattern in project n4js by eclipse.
the class BindingElementImpl method basicSetNestedPattern.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetNestedPattern(BindingPattern newNestedPattern, NotificationChain msgs) {
BindingPattern oldNestedPattern = nestedPattern;
nestedPattern = newNestedPattern;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.BINDING_ELEMENT__NESTED_PATTERN, oldNestedPattern, newNestedPattern);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.n4JS.BindingPattern in project n4js by eclipse.
the class VariableBindingImpl method basicSetPattern.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPattern(BindingPattern newPattern, NotificationChain msgs) {
BindingPattern oldPattern = pattern;
pattern = newPattern;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.VARIABLE_BINDING__PATTERN, oldPattern, newPattern);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.n4JS.BindingPattern in project n4js by eclipse.
the class CatchVariableImpl method basicSetBindingPattern.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetBindingPattern(BindingPattern newBindingPattern, NotificationChain msgs) {
BindingPattern oldBindingPattern = bindingPattern;
bindingPattern = newBindingPattern;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.CATCH_VARIABLE__BINDING_PATTERN, oldBindingPattern, newBindingPattern);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.n4JS.BindingPattern in project n4js by eclipse.
the class FormalParameterImpl method basicSetBindingPattern.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetBindingPattern(BindingPattern newBindingPattern, NotificationChain msgs) {
BindingPattern oldBindingPattern = bindingPattern;
bindingPattern = newBindingPattern;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.FORMAL_PARAMETER__BINDING_PATTERN, oldBindingPattern, newBindingPattern);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.n4js.n4JS.BindingPattern in project n4js by eclipse.
the class FGUtils method isCFContainer.
/**
* @return true iff the given {@link ControlFlowElement} is a container such as a function's body.
*/
public static boolean isCFContainer(EObject cfe) {
boolean isScript = cfe instanceof Script;
boolean isBlock = cfe instanceof Block;
boolean isExpression = cfe instanceof Expression;
boolean isBindingPattern = cfe instanceof BindingPattern;
if (!isScript && !isBlock && !isExpression && !isBindingPattern) {
return false;
}
EObject cfeContainer = cfe.eContainer();
EObject cfeContainer2 = (cfeContainer == null) ? null : cfeContainer.eContainer();
boolean containerIsFunctionDeclaration = cfeContainer instanceof FunctionDeclaration;
boolean containerIsFunctionDefinition = cfeContainer instanceof FunctionDefinition;
boolean containerIsFieldAccessor = cfeContainer instanceof FieldAccessor;
boolean containerIsFormalParameter = cfeContainer instanceof FormalParameter;
boolean containerIsFieldDeclaration = cfeContainer instanceof N4FieldDeclaration;
boolean containerIsAnnotationArgument = cfeContainer instanceof AnnotationArgument;
boolean containerIsLiteralOrComputedPropertyName = cfeContainer instanceof LiteralOrComputedPropertyName;
boolean containerIsExportSpecifier = cfeContainer instanceof ExportSpecifier;
boolean containerIsExportDeclaration = cfeContainer instanceof ExportDeclaration;
boolean containerIsN4ClassDefinition = cfeContainer instanceof N4ClassDefinition;
boolean container2IsN4FieldDeclaration = cfeContainer2 instanceof N4FieldDeclaration;
boolean isCFContainer = false;
isCFContainer |= isScript;
isCFContainer |= isBlock && containerIsFunctionDeclaration;
isCFContainer |= isBlock && containerIsFunctionDefinition;
isCFContainer |= isBlock && containerIsFieldAccessor;
isCFContainer |= isBindingPattern && containerIsFormalParameter;
isCFContainer |= isExpression && containerIsFormalParameter;
isCFContainer |= isExpression && containerIsFieldDeclaration;
isCFContainer |= isExpression && containerIsAnnotationArgument;
isCFContainer |= isExpression && containerIsLiteralOrComputedPropertyName && container2IsN4FieldDeclaration;
isCFContainer |= isExpression && containerIsN4ClassDefinition;
isCFContainer |= isExpression && containerIsExportSpecifier;
isCFContainer |= isExpression && containerIsExportDeclaration;
return isCFContainer;
}
Aggregations