use of org.eclipse.xtext.metamodelreferencing.tests.anotherSimpleTest.Foo in project xtext-core by eclipse.
the class MetamodelRefTestLanguageSemanticSequencer 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 == AnotherSimpleTestPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case AnotherSimpleTestPackage.FOO:
sequence_Foo(context, (Foo) semanticObject);
return;
}
else if (epackage == XtextPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case XtextPackage.PARSER_RULE:
sequence_MyRule(context, (ParserRule) semanticObject);
return;
case XtextPackage.RULE_CALL:
sequence_NameRef(context, (RuleCall) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.metamodelreferencing.tests.anotherSimpleTest.Foo in project xtext-core by eclipse.
the class MetamodelRefTest method testStuff.
@Test
public void testStuff() throws Exception {
Foo parse = (Foo) getModelAndExpect("foo bar", 1);
assertEquals(1, parse.getNameRefs().size());
}