Search in sources :

Example 1 with Namespace

use of org.eclipse.xtext.builder.tests.builderTestLanguage.Namespace in project xtext-eclipse by eclipse.

the class BuilderTestLanguageSemanticSequencer 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 == BuilderTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case BuilderTestLanguagePackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case BuilderTestLanguagePackage.IMPORT:
                sequence_Import(context, (Import) semanticObject);
                return;
            case BuilderTestLanguagePackage.NAMESPACE:
                sequence_Namespace(context, (Namespace) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Import(org.eclipse.xtext.builder.tests.builderTestLanguage.Import) Element(org.eclipse.xtext.builder.tests.builderTestLanguage.Element) Parameter(org.eclipse.xtext.Parameter) Namespace(org.eclipse.xtext.builder.tests.builderTestLanguage.Namespace) 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 Element (org.eclipse.xtext.builder.tests.builderTestLanguage.Element)1 Import (org.eclipse.xtext.builder.tests.builderTestLanguage.Import)1 Namespace (org.eclipse.xtext.builder.tests.builderTestLanguage.Namespace)1