Search in sources :

Example 1 with NodeList

use of org.eclipse.xtext.testlanguages.indent.indentLang.NodeList in project xtext-core by eclipse.

the class NodeImpl method basicSetChildren.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetChildren(NodeList newChildren, NotificationChain msgs) {
    NodeList oldChildren = children;
    children = newChildren;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, IndentLangPackage.NODE__CHILDREN, oldChildren, newChildren);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) NodeList(org.eclipse.xtext.testlanguages.indent.indentLang.NodeList)

Example 2 with NodeList

use of org.eclipse.xtext.testlanguages.indent.indentLang.NodeList in project xtext-core by eclipse.

the class IndentationAwareTestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == IndentLangPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case IndentLangPackage.NODE:
                sequence_Node(context, (Node) semanticObject);
                return;
            case IndentLangPackage.NODE_LIST:
                sequence_NodeList(context, (NodeList) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Node(org.eclipse.xtext.testlanguages.indent.indentLang.Node) NodeList(org.eclipse.xtext.testlanguages.indent.indentLang.NodeList) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

NodeList (org.eclipse.xtext.testlanguages.indent.indentLang.NodeList)2 EPackage (org.eclipse.emf.ecore.EPackage)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Node (org.eclipse.xtext.testlanguages.indent.indentLang.Node)1