The CursorLinePainter is not friendly ;) [message #326348] |
Mon, 17 March 2008 09:21 |
Eclipse User |
|
|
|
Originally posted by: valere.fedronic.ext.streamezzo.com
Hi,
I am actually implementing a custom LineBackgroundListener, that can
emphasize part of a text (e.g set the background color for scriplets in
jsp,or import statements in java ..).
The problem is that the CursorLinePainter, that is installed on the text
editor by the SourceViewerDecorationSupport, always crush the line
background color with the widget's background color,and therefor
annihilates the work done by any other linebackgroundListener.
The only workaround is to deactivate the cursor line painter.
I think that the CursorLinePainter should allows other contributors to
participate in the source viewer decoration.
Valère.
|
|
|
|
|
Re: The CursorLinePainter is not friendly ;) [message #326373 is a reply to message #326372] |
Tue, 18 March 2008 10:45 |
Eclipse User |
|
|
|
Originally posted by: valere.fedronic.ext.streamezzo.com
I'll be happy to contribute to the eclipse project.
How can i do this?
Valère.
Daniel Megert a écrit :
> valere fedronic wrote:
>>
>> Hi,
>>
>> I am actually implementing a custom LineBackgroundListener, that can
>> emphasize part of a text (e.g set the background color for scriplets
>> in jsp,or import statements in java ..).
>>
>> The problem is that the CursorLinePainter, that is installed on the
>> text editor by the SourceViewerDecorationSupport, always crush the
>> line background color with the widget's background color,and therefor
>> annihilates the work done by any other linebackgroundListener.
>>
>> The only workaround is to deactivate the cursor line painter.
>>
>> I think that the CursorLinePainter should allows other contributors to
>> participate in the source viewer decoration.
> Feel free to provide such an implementation ;-) We can then open up the
> SVDS to allow a custom cursor line painter.
>
> Dani
>>
>>
>> Valère.
>>
|
|
|
|
Re: The CursorLinePainter is not friendly ;) [message #326434 is a reply to message #326382] |
Wed, 19 March 2008 16:20 |
Eclipse User |
|
|
|
Originally posted by: valere.fedronic.ext.streamezzo.com
It is 'worst' than i thought, i have created a friendly
CursorLinePainter, but my line background contributor work is still ignored.
The problem is that the lineBackground event mechanism doesn't propagate
the line background color, i.e if there are several
LineBackgroundListeners, the styledText ask each listener if he want to
change the line background, and, if not, the line color is reset to null
(instead of keeping the previously set color).
I'll file a bug and propose to work on a fix ;).
Valere.
Daniel Megert a écrit :
> valere fedronic wrote:
>> I'll be happy to contribute to the eclipse project.
>> How can i do this?
> You file a bug/feature report using bugzilla
> (https://bugs.eclipse.org/bugs/). In this case against Platform Text. In
> the bug you state that you would like to work an a fix.
>
> Dani
>>
>> Valère.
>>
>>
>> Daniel Megert a écrit :
>>> valere fedronic wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am actually implementing a custom LineBackgroundListener, that can
>>>> emphasize part of a text (e.g set the background color for scriplets
>>>> in jsp,or import statements in java ..).
>>>>
>>>> The problem is that the CursorLinePainter, that is installed on the
>>>> text editor by the SourceViewerDecorationSupport, always crush the
>>>> line background color with the widget's background color,and
>>>> therefor annihilates the work done by any other linebackgroundListener.
>>>>
>>>> The only workaround is to deactivate the cursor line painter.
>>>>
>>>> I think that the CursorLinePainter should allows other contributors
>>>> to participate in the source viewer decoration.
>>> Feel free to provide such an implementation ;-) We can then open up
>>> the SVDS to allow a custom cursor line painter.
>>>
>>> Dani
>>>>
>>>>
>>>> Valère.
>>>>
|
|
|
Re: The CursorLinePainter is not friendly ;) [message #326436 is a reply to message #326382] |
Wed, 19 March 2008 16:36 |
Eclipse User |
|
|
|
Originally posted by: valere.fedronic.ext.streamezzo.com
https://bugs.eclipse.org/bugs/show_bug.cgi?id=223219
Regards,
Valere.
Daniel Megert a écrit :
> valere fedronic wrote:
>> I'll be happy to contribute to the eclipse project.
>> How can i do this?
> You file a bug/feature report using bugzilla
> (https://bugs.eclipse.org/bugs/). In this case against Platform Text. In
> the bug you state that you would like to work an a fix.
>
> Dani
>>
>> Valère.
>>
>>
>> Daniel Megert a écrit :
>>> valere fedronic wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am actually implementing a custom LineBackgroundListener, that can
>>>> emphasize part of a text (e.g set the background color for scriplets
>>>> in jsp,or import statements in java ..).
>>>>
>>>> The problem is that the CursorLinePainter, that is installed on the
>>>> text editor by the SourceViewerDecorationSupport, always crush the
>>>> line background color with the widget's background color,and
>>>> therefor annihilates the work done by any other linebackgroundListener.
>>>>
>>>> The only workaround is to deactivate the cursor line painter.
>>>>
>>>> I think that the CursorLinePainter should allows other contributors
>>>> to participate in the source viewer decoration.
>>> Feel free to provide such an implementation ;-) We can then open up
>>> the SVDS to allow a custom cursor line painter.
>>>
>>> Dani
>>>>
>>>>
>>>> Valère.
>>>>
|
|
|
Re: The CursorLinePainter is not friendly ;) [message #326459 is a reply to message #326434] |
Thu, 20 March 2008 08:25 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
valere fedronic wrote:
> It is 'worst' than i thought, i have created a friendly
> CursorLinePainter, but my line background contributor work is still
> ignored.
>
> The problem is that the lineBackground event mechanism doesn't
> propagate the line background color, i.e if there are several
> LineBackgroundListeners, the styledText ask each listener if he want
> to change the line background, and, if not, the line color is reset to
> null (instead of keeping the previously set color).
Using a LineBackgroundListener is at your own risk and not supported by
the text framework (see ITextViewer.getTextWidget()). Simply drop that
approach and use a org.eclipse.jface.text.ITextPresentationListener.
Dani
>
> I'll file a bug and propose to work on a fix ;).
>
> Valere.
>
>
>
>
> Daniel Megert a écrit :
>> valere fedronic wrote:
>>> I'll be happy to contribute to the eclipse project.
>>> How can i do this?
>> You file a bug/feature report using bugzilla
>> (https://bugs.eclipse.org/bugs/). In this case against Platform Text.
>> In the bug you state that you would like to work an a fix.
>>
>> Dani
>>>
>>> Valère.
>>>
>>>
>>> Daniel Megert a écrit :
>>>> valere fedronic wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I am actually implementing a custom LineBackgroundListener, that
>>>>> can emphasize part of a text (e.g set the background color for
>>>>> scriplets in jsp,or import statements in java ..).
>>>>>
>>>>> The problem is that the CursorLinePainter, that is installed on
>>>>> the text editor by the SourceViewerDecorationSupport, always crush
>>>>> the line background color with the widget's background color,and
>>>>> therefor annihilates the work done by any other
>>>>> linebackgroundListener.
>>>>>
>>>>> The only workaround is to deactivate the cursor line painter.
>>>>>
>>>>> I think that the CursorLinePainter should allows other
>>>>> contributors to participate in the source viewer decoration.
>>>> Feel free to provide such an implementation ;-) We can then open up
>>>> the SVDS to allow a custom cursor line painter.
>>>>
>>>> Dani
>>>>>
>>>>>
>>>>> Valère.
>>>>>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04890 seconds