Search in sources :

Example 1 with Namespace

use of org.eclipse.xtext.index.indexTestLanguage.Namespace in project xtext-core by eclipse.

the class AbstractIndexTestLanguageSemanticSequencer 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 == IndexTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case IndexTestLanguagePackage.DATATYPE:
                sequence_Datatype(context, (Datatype) semanticObject);
                return;
            case IndexTestLanguagePackage.ENTITY:
                sequence_Entity(context, (Entity) semanticObject);
                return;
            case IndexTestLanguagePackage.FILE:
                sequence_File(context, (File) semanticObject);
                return;
            case IndexTestLanguagePackage.IMPORT:
                sequence_Import(context, (Import) semanticObject);
                return;
            case IndexTestLanguagePackage.NAMESPACE:
                sequence_Namespace(context, (Namespace) semanticObject);
                return;
            case IndexTestLanguagePackage.PROPERTY:
                sequence_Property(context, (Property) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Entity(org.eclipse.xtext.index.indexTestLanguage.Entity) Action(org.eclipse.xtext.Action) Import(org.eclipse.xtext.index.indexTestLanguage.Import) Parameter(org.eclipse.xtext.Parameter) File(org.eclipse.xtext.index.indexTestLanguage.File) Property(org.eclipse.xtext.index.indexTestLanguage.Property) Namespace(org.eclipse.xtext.index.indexTestLanguage.Namespace) EPackage(org.eclipse.emf.ecore.EPackage) Datatype(org.eclipse.xtext.index.indexTestLanguage.Datatype)

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 Datatype (org.eclipse.xtext.index.indexTestLanguage.Datatype)1 Entity (org.eclipse.xtext.index.indexTestLanguage.Entity)1 File (org.eclipse.xtext.index.indexTestLanguage.File)1 Import (org.eclipse.xtext.index.indexTestLanguage.Import)1 Namespace (org.eclipse.xtext.index.indexTestLanguage.Namespace)1 Property (org.eclipse.xtext.index.indexTestLanguage.Property)1