Search in sources :

Example 1 with Block

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

the class FunctionDeclarationImpl method basicSetBody.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetBody(Block newBody, NotificationChain msgs) {
    Block oldBody = body;
    body = newBody;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.FUNCTION_DECLARATION__BODY, oldBody, newBody);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Block(org.eclipse.n4js.n4JS.Block)

Example 2 with Block

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

the class N4FieldAccessorImpl method basicSetBody.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetBody(Block newBody, NotificationChain msgs) {
    Block oldBody = body;
    body = newBody;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.N4_FIELD_ACCESSOR__BODY, oldBody, newBody);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Block(org.eclipse.n4js.n4JS.Block)

Example 3 with Block

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

the class ControlFlowGraphFactory method isExitingFinallyBlock.

private static boolean isExitingFinallyBlock(ComplexNodeMapper cnMapper, Node node) {
    ControlFlowElement cfe = node.getControlFlowElement();
    ComplexNode cn = cnMapper.get(cfe);
    boolean isExitingFinallyBlock = true;
    isExitingFinallyBlock &= cfe instanceof Block;
    isExitingFinallyBlock &= cfe.eContainer() instanceof FinallyBlock;
    isExitingFinallyBlock &= cn.getExit() == node;
    return isExitingFinallyBlock;
}
Also used : ComplexNode(org.eclipse.n4js.flowgraphs.model.ComplexNode) FinallyBlock(org.eclipse.n4js.n4JS.FinallyBlock) FinallyBlock(org.eclipse.n4js.n4JS.FinallyBlock) Block(org.eclipse.n4js.n4JS.Block) ControlFlowElement(org.eclipse.n4js.n4JS.ControlFlowElement)

Example 4 with Block

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

the class TryStatementImpl method basicSetBlock.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetBlock(Block newBlock, NotificationChain msgs) {
    Block oldBlock = block;
    block = newBlock;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.TRY_STATEMENT__BLOCK, oldBlock, newBlock);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) FinallyBlock(org.eclipse.n4js.n4JS.FinallyBlock) CatchBlock(org.eclipse.n4js.n4JS.CatchBlock) Block(org.eclipse.n4js.n4JS.Block)

Example 5 with Block

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

the class FunctionOrFieldAccessorImpl method basicSetBody.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetBody(Block newBody, NotificationChain msgs) {
    Block oldBody = body;
    body = newBody;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, N4JSPackage.FUNCTION_OR_FIELD_ACCESSOR__BODY, oldBody, newBody);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Block(org.eclipse.n4js.n4JS.Block)

Aggregations

Block (org.eclipse.n4js.n4JS.Block)12 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)7 FinallyBlock (org.eclipse.n4js.n4JS.FinallyBlock)4 CatchBlock (org.eclipse.n4js.n4JS.CatchBlock)3 EObject (org.eclipse.emf.ecore.EObject)2 ComplexNode (org.eclipse.n4js.flowgraphs.model.ComplexNode)2 ExportDeclaration (org.eclipse.n4js.n4JS.ExportDeclaration)2 ExportSpecifier (org.eclipse.n4js.n4JS.ExportSpecifier)2 ExpressionStatement (org.eclipse.n4js.n4JS.ExpressionStatement)2 FormalParameter (org.eclipse.n4js.n4JS.FormalParameter)2 FunctionDeclaration (org.eclipse.n4js.n4JS.FunctionDeclaration)2 LiteralOrComputedPropertyName (org.eclipse.n4js.n4JS.LiteralOrComputedPropertyName)2 N4FieldDeclaration (org.eclipse.n4js.n4JS.N4FieldDeclaration)2 ReturnStatement (org.eclipse.n4js.n4JS.ReturnStatement)2 Script (org.eclipse.n4js.n4JS.Script)2 EPackage (org.eclipse.emf.ecore.EPackage)1 ControlFlowType (org.eclipse.n4js.flowgraphs.ControlFlowType)1 DelegatingNode (org.eclipse.n4js.flowgraphs.model.DelegatingNode)1 Node (org.eclipse.n4js.flowgraphs.model.Node)1 RepresentingNode (org.eclipse.n4js.flowgraphs.model.RepresentingNode)1