Search in sources :

Example 1 with TwoRequired

use of org.eclipse.xtext.parsetree.reconstr.serializationerror.TwoRequired in project xtext-core by eclipse.

the class SerializationErrorTestLanguageSemanticSequencer 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 == SerializationerrorPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case SerializationerrorPackage.INDENT:
                sequence_Indent(context, (Indent) semanticObject);
                return;
            case SerializationerrorPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case SerializationerrorPackage.TWO_OPTIONS:
                sequence_TwoOptions(context, (TwoOptions) semanticObject);
                return;
            case SerializationerrorPackage.TWO_REQUIRED:
                sequence_TwoRequired(context, (TwoRequired) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Indent(org.eclipse.xtext.parsetree.reconstr.serializationerror.Indent) Model(org.eclipse.xtext.parsetree.reconstr.serializationerror.Model) TwoOptions(org.eclipse.xtext.parsetree.reconstr.serializationerror.TwoOptions) Parameter(org.eclipse.xtext.Parameter) TwoRequired(org.eclipse.xtext.parsetree.reconstr.serializationerror.TwoRequired) EPackage(org.eclipse.emf.ecore.EPackage)

Example 2 with TwoRequired

use of org.eclipse.xtext.parsetree.reconstr.serializationerror.TwoRequired in project xtext-core by eclipse.

the class IndentImpl method basicSetReq.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetReq(TwoRequired newReq, NotificationChain msgs) {
    TwoRequired oldReq = req;
    req = newReq;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SerializationerrorPackage.INDENT__REQ, oldReq, newReq);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) TwoRequired(org.eclipse.xtext.parsetree.reconstr.serializationerror.TwoRequired)

Aggregations

TwoRequired (org.eclipse.xtext.parsetree.reconstr.serializationerror.TwoRequired)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 Indent (org.eclipse.xtext.parsetree.reconstr.serializationerror.Indent)1 Model (org.eclipse.xtext.parsetree.reconstr.serializationerror.Model)1 TwoOptions (org.eclipse.xtext.parsetree.reconstr.serializationerror.TwoOptions)1