} else {
region = new Region(0, getDocument().getLength());
}
if (fContentFormatter instanceof IContentFormatterExtension) {
IContentFormatterExtension extension = (IContentFormatterExtension) fContentFormatter;
IFormattingContext context = new FormattingContext();
context.setProperty(
FormattingContextProperties.CONTEXT_DOCUMENT,
Boolean.TRUE);
context.setProperty(
FormattingContextProperties.CONTEXT_REGION, region);
extension.format(getDocument(), context);
} else {
fContentFormatter.format(getDocument(), region);
}