use of org.eclipse.xtext.ParserRule in project xtext-core by eclipse.
the class EcoreFragmentTestLanguageSemanticSequencer 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 == SecondPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case SecondPackage.SECOND:
sequence_Second(context, (Second) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.ParserRule in project xtext-core by eclipse.
the class SubTestLanguageSemanticSequencer 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 == SubPackagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case SubPackagePackage.ANOTHER_SUPER_MAIN:
sequence_AnotherSuperMain(context, (AnotherSuperMain) semanticObject);
return;
case SubPackagePackage.SUB_MAIN:
sequence_SubMain(context, (SubMain) semanticObject);
return;
}
else if (epackage == SuperPackagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case SuperPackagePackage.SUPER_MAIN:
sequence_SuperMain(context, (SuperMain) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.ParserRule in project xtext-core by eclipse.
the class GrammarAccessTestLanguageSemanticSequencer 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 == AsubpackagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case AsubpackagePackage.AMODEL:
sequence_Root(context, (AModel) semanticObject);
return;
case AsubpackagePackage.ATYPE:
sequence_AType(context, (AType) semanticObject);
return;
}
else if (epackage == SubsubpackagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case SubsubpackagePackage.ANOTHER_TYPE:
sequence_AnotherType(context, (AnotherType) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.ParserRule in project xtext-core by eclipse.
the class AbstractAbstractTestLanguageSemanticSequencer 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 == AmetamodelPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case AmetamodelPackage.AMODEL:
if (rule == grammarAccess.getAbstractCallExtendedParserRuleRule()) {
sequence_AbstractCallExtendedParserRule(context, (AModel) semanticObject);
return;
} else if (rule == grammarAccess.getAbstractCallOverridenParserRuleRule()) {
sequence_AbstractCallOverridenParserRule(context, (AModel) semanticObject);
return;
} else
break;
case AmetamodelPackage.ATYPE:
if (rule == grammarAccess.getExtendableParserRuleRule()) {
sequence_ExtendableParserRule(context, (AType) semanticObject);
return;
} else if (rule == grammarAccess.getInheritedParserRuleRule()) {
sequence_InheritedParserRule(context, (AType) semanticObject);
return;
} else if (rule == grammarAccess.getOverridableParserRule2Rule()) {
sequence_OverridableParserRule2(context, (AType) semanticObject);
return;
} else if (rule == grammarAccess.getOverridableParserRuleRule()) {
sequence_OverridableParserRule(context, (AType) semanticObject);
return;
} else
break;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.ParserRule in project xtext-core by eclipse.
the class InheritanceTest3LanguageSemanticSequencer 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 == InheritanceTestPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case InheritanceTestPackage.ELEMENT:
if (rule == grammarAccess.getInheritanceTestLanguageElementRule()) {
sequence_Element(context, (Element) semanticObject);
return;
} else if (rule == grammarAccess.getElementRule()) {
sequence_Element_Element(context, (Element) semanticObject);
return;
} else
break;
case InheritanceTestPackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Aggregations