use of org.eclipse.xtext.testlanguages.actionLang2.ORing in project xtext-core by eclipse.
the class ActionLanguage2Test method testCorrectReferenceType.
/**
* see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=390326
*/
@Test
public void testCorrectReferenceType() {
ORing oRing = ActionLang2Factory.eINSTANCE.createORing();
ORing oRing2 = ActionLang2Factory.eINSTANCE.createORing();
oRing.getDisjuncts().add(oRing2);
assertSame(oRing2, oRing.getDisjuncts().get(0));
}
use of org.eclipse.xtext.testlanguages.actionLang2.ORing in project xtext-core by eclipse.
the class ActionTestLanguage2SemanticSequencer 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 == ActionLang2Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case ActionLang2Package.ORING:
sequence_ORing(context, (ORing) semanticObject);
return;
case ActionLang2Package.VALUE:
sequence_Value(context, (Value) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Aggregations