use of org.eclipse.wst.sse.ui.internal.format.StructuredFormattingStrategy in project webtools.sourceediting by eclipse.
the class StructuredTextViewerConfigurationHTML method getContentFormatter.
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
IContentFormatter formatter = super.getContentFormatter(sourceViewer);
// generic one
if (!(formatter instanceof MultiPassContentFormatter))
formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IHTMLPartitions.HTML_DEFAULT);
((MultiPassContentFormatter) formatter).setMasterStrategy(new StructuredFormattingStrategy(new HTMLFormatProcessorImpl()));
return formatter;
}
use of org.eclipse.wst.sse.ui.internal.format.StructuredFormattingStrategy in project webtools.sourceediting by eclipse.
the class StructuredTextViewerConfigurationCSS method getContentFormatter.
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
IContentFormatter formatter = super.getContentFormatter(sourceViewer);
// generic one
if (!(formatter instanceof MultiPassContentFormatter))
formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), ICSSPartitions.STYLE);
((MultiPassContentFormatter) formatter).setMasterStrategy(new StructuredFormattingStrategy(new FormatProcessorCSS()));
return formatter;
}
use of org.eclipse.wst.sse.ui.internal.format.StructuredFormattingStrategy 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