}
// END FROM SUPER VERSION
// Uses DomModelSequencer and new formatter interface
ISerializationDiagnostic.Acceptor errors = ISerializationDiagnostic.EXCEPTION_THROWING_ACCEPTOR;
DomModelSequenceAdapter acceptor = new DomModelSequenceAdapter(
hiddenTokenHelper, commentConfiguration, lineSeparatorInformation, errors);
EObject context = getContext(obj);
serialize(obj, context, acceptor, errors);
ReplaceRegion r = domFormatter.format(
acceptor.getDomModel(), regionToFormat, formattingContextFactory.create(obj, formatting(options)), errors);
writer.append(r.getText());
}