use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug362902SemanticSequencer 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 == Bug362902Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case Bug362902Package.GREETING:
sequence_Greeting(context, (Greeting) semanticObject);
return;
case Bug362902Package.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug311337TestLanguageSemanticSequencer 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 == Bug311337Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case Bug311337Package.CHILD:
sequence_Child(context, (Child) semanticObject);
return;
case Bug311337Package.DEFINITION:
sequence_Definition(context, (Definition) semanticObject);
return;
case Bug311337Package.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case Bug311337Package.NESTED_REF:
sequence_Reference(context, (NestedRef) semanticObject);
return;
case Bug311337Package.REFERENCE:
sequence_Reference(context, (Reference) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testDatatypeConversion_01.
@Test
public void testDatatypeConversion_01() throws Exception {
Model model = (Model) getModel("1 foo - bar");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.Datatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(6, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("foo - bar", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_03.
@Test
public void testNestedDatatypeConversion_03() throws Exception {
Model model = (Model) getModel("zonk + foo - bar");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(4, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("zonk + foo - bar", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testDatatypeConversion_04.
@Test
public void testDatatypeConversion_04() throws Exception {
Model model = (Model) getModel("1+ foo - bar");
assertEquals("[str]", model.getMultiValue().toString());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.Datatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(6, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("foo - bar", string);
assertEquals(1, convertCallCount);
}
Aggregations