serialize(semanticObject, context, tokens, errors, null);
}
protected void serialize(EObject semanticObject, EObject context, ISequenceAcceptor tokens,
ISerializationDiagnostic.Acceptor errors, ICommentReconcilement commentReconciliator) {
ISemanticSequencer semantic = semanticSequencerProvider.get();
ISyntacticSequencer syntactic = syntacticSequencerProvider.get();
IHiddenTokenSequencer hidden = hiddenTokenSequencerProvider.get();
semantic.init((ISemanticSequenceAcceptor) syntactic, errors);
syntactic.init(context, semanticObject, (ISyntacticSequenceAcceptor) hidden, errors);
if(hidden instanceof IHiddenTokenSequencer2)
((IHiddenTokenSequencer2) hidden).init(context, semanticObject, tokens, errors, commentReconciliator);
else
hidden.init(context, semanticObject, tokens, errors);
// NOTE: This is not so nice
if(tokens instanceof TokenStreamSequenceAdapter)
((TokenStreamSequenceAdapter) tokens).init(context);
else if(tokens instanceof DomModelSequenceAdapter)
((DomModelSequenceAdapter) tokens).init(context, semanticObject);
semantic.createSequence(context, semanticObject);
}