use of org.eclipse.xtext.formatting2.internal.RegionTraceMissingException in project xtext-core by eclipse.
the class AbstractFormatter2 method format.
@Override
public final List<ITextReplacement> format(FormatterRequest request) {
try {
initialize(request);
XtextResource xtextResource = request.getTextRegionAccess().getResource();
IFormattableDocument document = createFormattableRootDocument();
try {
format(xtextResource, document);
} catch (RegionTraceMissingException e) {
document = handleTraceMissing(document, e);
}
List<ITextReplacement> rendered = document.renderToTextReplacements();
List<ITextReplacement> postprocessed = postProcess(document, rendered);
return postprocessed;
} finally {
reset();
}
}
Aggregations