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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -