*/
private IStatus formattedDomDump(XtextResource resource) {
if(serializer instanceof DomBasedSerializer == false)
return new Status(
IStatus.ERROR, "com.puppetlabs.geppetto.pp.dsl.ui", "Not configured to use DomBasedSerializer");
DomBasedSerializer domSerializer = ((DomBasedSerializer) serializer);
IDomNode dom = domSerializer.serializeToDom(resource.getContents().get(0), false);
ISerializationDiagnostic.Acceptor errors = ISerializationDiagnostic.EXCEPTION_THROWING_ACCEPTOR;
// ReplaceRegion r = domFormatter.format(dom, null /* all text */, formattingContextProvider.get(false), errors);
getDomFormatter().format(
dom, null /* all text */, formattingContextFactory.create(resource, FormattingOption.Format), errors);