How can I use org.eclipse.jface.text.PaintManager in subclass of TextEditor? -


how can attach paintmanager texteditor? example, draw background of cursor line org.eclipse.jface.text.cursorlinepainter.

your editor's textviewer or sourceviewer provides paint manager. can access using itextviewerextension2 interface of viewer.

for example code sourceviewerdecorationsupport:

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);         }     } } 

Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -