Search in sources :

Example 1 with CursorLinePainter

use of org.eclipse.jface.text.CursorLinePainter in project eclipse.platform.text by eclipse.

the class SourceViewerDecorationSupport method showCursorLine.

/**
 * Shows the cursor line.
 */
private void showCursorLine() {
    if (fCursorLinePainter == null) {
        if (fSourceViewer instanceof ITextViewerExtension2) {
            fCursorLinePainter = new CursorLinePainter(fSourceViewer);
            fCursorLinePainter.setHighlightColor(getColor(fCursorLinePainterColorKey));
            ITextViewerExtension2 extension = (ITextViewerExtension2) fSourceViewer;
            extension.addPainter(fCursorLinePainter);
        }
    }
}
Also used : ITextViewerExtension2(org.eclipse.jface.text.ITextViewerExtension2) CursorLinePainter(org.eclipse.jface.text.CursorLinePainter)

Aggregations

CursorLinePainter (org.eclipse.jface.text.CursorLinePainter)1 ITextViewerExtension2 (org.eclipse.jface.text.ITextViewerExtension2)1