protected void doFormatPreview() {
fText.setRedraw(false);
try {
fPreviewDocument.set(fOriInput);
IRegion region = new Region(0, fPreviewDocument.getLength());
CodeFormatterVisitor codeFormatter = new CodeFormatterVisitor(
fPreviewDocument, codeFormatterPreferences,
System.getProperty(Platform.PREF_LINE_SEPARATOR),
PHPVersion.PHP5_5, true, region);
List<?> changes = codeFormatter.getChanges();
fInput = applyChanges(fOriInput, changes);
setText(fInput);
} catch (Exception e) {
Logger.logException(e);