use of org.eclipse.jface.text.ITextViewerExtension7 in project eclipse.platform.text by eclipse.
the class AbstractTextEditor method installTabsToSpacesConverter.
// ---- Tabs to spaces conversion support ------------------
/**
* Installs a tabs to spaces converter.
*
* <p>Subclasses may extend or override this method.</p>
*
* @since 3.3
*/
protected void installTabsToSpacesConverter() {
SourceViewerConfiguration config = getSourceViewerConfiguration();
if (config != null && fSourceViewer instanceof ITextViewerExtension7) {
int tabWidth = config.getTabWidth(fSourceViewer);
TabsToSpacesConverter tabToSpacesConverter = new TabsToSpacesConverter();
tabToSpacesConverter.setLineTracker(new DefaultLineTracker());
tabToSpacesConverter.setNumberOfSpacesPerTab(tabWidth);
((ITextViewerExtension7) fSourceViewer).setTabsToSpacesConverter(tabToSpacesConverter);
updateIndentPrefixes();
}
}
Aggregations