use of org.eclipse.wst.json.core.format.FormatProcessorJSON in project webtools.sourceediting by eclipse.
the class StructuredTextViewerConfigurationJSON method getContentFormatter.
@Override
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
IContentFormatter formatter = super.getContentFormatter(sourceViewer);
// generic one
if (!(formatter instanceof MultiPassContentFormatter))
formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IJSONPartitions.JSON);
((MultiPassContentFormatter) formatter).setMasterStrategy(new StructuredFormattingStrategy(new FormatProcessorJSON()));
return formatter;
}
Aggregations