use of software.amazon.awssdk.services.s3.model in project xtext-core by eclipse.
the class Bug250313Test method testIDConversion_04.
@Test
public void testIDConversion_04() throws Exception {
Model model = (Model) getModel("^str");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.common.Terminals.ID", lexerRule);
assertTrue(node instanceof ILeafNode);
assertEquals("^str", string);
assertEquals(1, convertCallCount);
}
use of software.amazon.awssdk.services.s3.model in project xtext-core by eclipse.
the class Bug250313Test method testDatatypeConversion_03.
@Test
public void testDatatypeConversion_03() throws Exception {
Model model = (Model) getModel("3 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 software.amazon.awssdk.services.s3.model in project xtext-core by eclipse.
the class Bug250313Test method testKeywordConversion_01.
@Test
public void testKeywordConversion_01() throws Exception {
Model model = (Model) getModel("1 mykeyword1");
assertEquals("mykeyword1", model.getValue());
// XXX value converter is not called for keywords?
// if this is a bug, all assertions 'assertEquals(1, convertCallCount)' have to be increased
assertEquals(lexerRule, 0, convertCallCount);
}
use of software.amazon.awssdk.services.s3.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);
}
use of software.amazon.awssdk.services.s3.model in project xtext-core by eclipse.
the class Bug250313SemanticSequencer 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 == Bug250313Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case Bug250313Package.CHILD1:
sequence_Child1(context, (Child1) semanticObject);
return;
case Bug250313Package.CHILD2:
sequence_Child2(context, (Child2) semanticObject);
return;
case Bug250313Package.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Aggregations