Search in sources :

Example 1 with Attribute

use of org.eclipse.xtext.linking.bug287988Test.Attribute in project xtext-core by eclipse.

the class Bug287988TestLanguageSemanticSequencer 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 == Bug287988TestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug287988TestPackage.ATTRIBUTE:
                if (rule == grammarAccess.getActionAttributeRule()) {
                    sequence_ActionAttribute(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAttributeRule()) {
                    sequence_Attribute(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getBaseAttributeRule()) {
                    sequence_Attribute_BaseAttribute(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getCallMe2Rule()) {
                    sequence_CallMe2(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getRuleCallAttribute2Rule()) {
                    sequence_CallMe2_RuleCallAttribute2(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getCallMe3Rule() || rule == grammarAccess.getCallMe4Rule()) {
                    sequence_CallMe4(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getRuleCallAttribute3Rule()) {
                    sequence_CallMe4_RuleCallAttribute3(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getCallMeRule()) {
                    sequence_CallMe(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getRuleCallAttributeRule()) {
                    sequence_CallMe_RuleCallAttribute(context, (Attribute) semanticObject);
                    return;
                } else if (rule == grammarAccess.getSimpleAttributeRule()) {
                    sequence_SimpleAttribute(context, (Attribute) semanticObject);
                    return;
                } else
                    break;
            case Bug287988TestPackage.MASTER:
                if (rule == grammarAccess.getActionAttributeRule()) {
                    sequence_ActionAttribute(context, (Master) semanticObject);
                    return;
                } else if (rule == grammarAccess.getBaseAttributeRule()) {
                    sequence_BaseAttribute_Master(context, (Master) semanticObject);
                    return;
                } else if (rule == grammarAccess.getMasterRule()) {
                    sequence_Master(context, (Master) semanticObject);
                    return;
                } else
                    break;
            case Bug287988TestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : Master(org.eclipse.xtext.linking.bug287988Test.Master) ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Attribute(org.eclipse.xtext.linking.bug287988Test.Attribute) Model(org.eclipse.xtext.linking.bug287988Test.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Attribute (org.eclipse.xtext.linking.bug287988Test.Attribute)1 Master (org.eclipse.xtext.linking.bug287988Test.Master)1 Model (org.eclipse.xtext.linking.bug287988Test.Model)1