use of org.eclipse.jface.text.formatter.IContentFormatter 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.jface.text.formatter.IContentFormatter in project webtools.sourceediting by eclipse.
the class TestViewerConfigurationJSP method testGetContentFormatter.
public void testGetContentFormatter() {
// probably no display
if (!fDisplayExists)
return;
IContentFormatter cf = fConfig.getContentFormatter(fViewer);
assertNotNull("there is no content formatter", cf);
}
use of org.eclipse.jface.text.formatter.IContentFormatter in project webtools.sourceediting by eclipse.
the class TestViewerConfigurationCSS method testGetContentFormatter.
public void testGetContentFormatter() {
// probably no display
if (!fDisplayExists)
return;
IContentFormatter cf = fConfig.getContentFormatter(fViewer);
assertNotNull("there is no content formatter", cf);
}
use of org.eclipse.jface.text.formatter.IContentFormatter 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;
}
use of org.eclipse.jface.text.formatter.IContentFormatter in project webtools.sourceediting by eclipse.
the class TestViewerConfigurationHTML method testGetContentFormatter.
public void testGetContentFormatter() {
// probably no display
if (!fDisplayExists)
return;
IContentFormatter cf = fConfig.getContentFormatter(fViewer);
assertNotNull("there is no content formatter", cf);
}
Aggregations