use of org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor in project xtext-core by eclipse.
the class SyntacticSequencerTest method testSequence.
private void testSequence(EObject inObj, String outModel) throws Exception {
EObject outObj = getModel(outModel);
ISerializationContext context = nmSequencer.findContexts(inObj, true, null).iterator().next();
Acceptor actual = new Acceptor();
ISemanticSequencer semanticSeq = semanticSequencerProvider.get();
ISyntacticSequencer syntacticSeq = syntacticSequencerProvider.get();
semanticSeq.init((ISemanticSequenceAcceptor) syntacticSeq, ISerializationDiagnostic.STDERR_ACCEPTOR);
syntacticSeq.init(context, inObj, actual, ISerializationDiagnostic.STDERR_ACCEPTOR);
semanticSeq.createSequence(context, inObj);
assertEquals(Joiner.on("\n").join(getNodeSequence(outObj)), Joiner.on("\n").join(actual.getResult()));
}
Aggregations