Java Editor Line Highlighting [message #115694] |
Tue, 11 November 2003 10:58  |
Eclipse User |
|
|
|
Hello,
I would like to be able to change the background colour of lines in the
Java editor. I have written a class to do this which implements IPainter
and LineBackgroundListener and instantiated it from a different editor,
passing it the ISourceViewer from the method getSourceViewer. Since this
method is protected I cannot see how to do this in the Java editor as I
cannot change the code. Is there a way I can get the ISourceViewer or
another way to acomplish this?
Thanks,
Sian Whiting
|
|
|
Re: Java Editor Line Highlighting [message #116753 is a reply to message #115694] |
Thu, 13 November 2003 17:42  |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.gmx.net
Sian Whiting wrote:
>Hello,
> I would like to be able to change the background colour of lines in the
>Java editor. I have written a class to do this which implements IPainter
>and LineBackgroundListener and instantiated it from a different editor,
>passing it the ISourceViewer from the method getSourceViewer. Since this
>method is protected I cannot see how to do this in the Java editor as I
>cannot change the code. Is there a way I can get the ISourceViewer or
>another way to acomplish this?
> Thanks,
> Sian Whiting
>
>
>
Sian,
we have released a new feature into the last integration build: take a
look at the ITextPresentationListener and the new API methods in
ITextViewerExtension4. Implementing the ITextPresentation allows you to
change text presentation in an easy way. You just have to ensure that
the corresponding text region(s) get invalidate when necessary, so that
you listener is called.
Dani
|
|
|
Powered by
FUDForum. Page generated in 0.04214 seconds