use of org.eclipse.jface.text.formatter.IContentFormatter in project webtools.sourceediting by eclipse.
the class TestViewerConfiguration method testGetContentFormatter.
public void testGetContentFormatter() {
// probably no display
if (!fDisplayExists)
return;
IContentFormatter cf = fConfig.getContentFormatter(fViewer);
assertNull("there is a content formatter", cf);
}
use of org.eclipse.jface.text.formatter.IContentFormatter in project webtools.sourceediting by eclipse.
the class TestViewerConfigurationXML 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 dbeaver by serge-rider.
the class PlainTextViewerConfiguration method getContentFormatter.
@Override
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
ContentFormatter formatter = new ContentFormatter();
formatter.setDocumentPartitioning(IDocument.DEFAULT_CONTENT_TYPE);
formatter.enablePartitionAwareFormatting(false);
return formatter;
}
use of org.eclipse.jface.text.formatter.IContentFormatter in project cubrid-manager by CUBRID.
the class SQLViewerConfiguration method getContentFormatter.
/**
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentFormatter(org.eclipse.jface.text.source.ISourceViewer)
* @param sourceViewer the source viewer to be configured by this
* configuration
* @return a content formatter or <code>null</code> if formatting should not
* be supported
*/
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
ContentFormatter formatter = new ContentFormatter();
formatter.setFormattingStrategy(new SqlFormattingStrategy(databaseProvider), IDocument.DEFAULT_CONTENT_TYPE);
return formatter;
}
use of org.eclipse.jface.text.formatter.IContentFormatter in project dbeaver by dbeaver.
the class XMLSourceViewerConfiguration method getContentFormatter.
@Override
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
ContentFormatter formatter = new ContentFormatter();
formatter.setDocumentPartitioning(IDocument.DEFAULT_CONTENT_TYPE);
IFormattingStrategy formattingStrategy = new XMLFormattingStrategy();
formatter.setFormattingStrategy(formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE);
formatter.enablePartitionAwareFormatting(false);
return formatter;
}
Aggregations