use of org.eclipse.jface.text.formatter.ContentFormatter in project dbeaver by serge-rider.
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;
}
use of org.eclipse.jface.text.formatter.ContentFormatter in project dbeaver by serge-rider.
the class JSONSourceViewerConfiguration method getContentFormatter.
@Override
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
ContentFormatter formatter = new ContentFormatter();
formatter.setDocumentPartitioning(IDocument.DEFAULT_CONTENT_TYPE);
IFormattingStrategy formattingStrategy = new JSONFormattingStrategy(sourceViewer, this);
formatter.setFormattingStrategy(formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE);
formatter.enablePartitionAwareFormatting(false);
return formatter;
}
use of org.eclipse.jface.text.formatter.ContentFormatter in project dbeaver by dbeaver.
the class JSONSourceViewerConfiguration method getContentFormatter.
@Override
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
ContentFormatter formatter = new ContentFormatter();
formatter.setDocumentPartitioning(IDocument.DEFAULT_CONTENT_TYPE);
IFormattingStrategy formattingStrategy = new JSONFormattingStrategy(sourceViewer, this);
formatter.setFormattingStrategy(formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE);
formatter.enablePartitionAwareFormatting(false);
return formatter;
}
use of org.eclipse.jface.text.formatter.ContentFormatter in project dbeaver by dbeaver.
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.ContentFormatter 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