Search in sources :

Example 1 with XMLFormattingStrategy

use of com.amalto.workbench.widgets.xmlviewer.format.XMLFormattingStrategy in project tmdm-studio-se by Talend.

the class XMLConfiguration method getContentFormatter.

@Override
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
    ContentFormatter formatter = new ContentFormatter();
    formatter.enablePartitionAwareFormatting(false);
    formatter.setFormattingStrategy(new XMLFormattingStrategy(sourceViewer), IDocument.DEFAULT_CONTENT_TYPE);
    return formatter;
}
Also used : XMLFormattingStrategy(com.amalto.workbench.widgets.xmlviewer.format.XMLFormattingStrategy) IContentFormatter(org.eclipse.jface.text.formatter.IContentFormatter) ContentFormatter(org.eclipse.jface.text.formatter.ContentFormatter)

Aggregations

XMLFormattingStrategy (com.amalto.workbench.widgets.xmlviewer.format.XMLFormattingStrategy)1 ContentFormatter (org.eclipse.jface.text.formatter.ContentFormatter)1 IContentFormatter (org.eclipse.jface.text.formatter.IContentFormatter)1