Home » Eclipse Projects » Rich Client Platform (RCP) » Configuring a SourceViewer
| |
Re: Configuring a SourceViewer [message #464609 is a reply to message #464597] |
Mon, 12 March 2007 15:08 |
Sebastien Pennec Messages: 31 Registered: July 2009 |
Member |
|
|
Hi Daniel,
Thanks for your help!
Daniel Megert wrote:
> Sebastien Pennec wrote:
>
>> Hello,
>>
>> I've subclassed the SourceViewerConfiguration class to add my own
>> instance of HyperlinkDetector to the getHyperlinkDetectors method.
>
> As of 3.3 you should no longer do this but instead use
> 'org.eclipse.ui.workbench.texteditor.hyperlinkDetectors' and
> 'org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTarget s' extension
> points.
I'm developing my plugin with Eclipse version 3.2.1 and I'd like my users to be able
to use the plugin with their 3.2.1 version. I think that the main download link is
still leading to a 3.2.x version, or has it changed?
Should I change to 3.3 for development anyway??
>> It is the only thing that is implemented in my class, everything else
>> comes from the original SourceViewerConfiguration class.
>>
>> When I display lines in my viewer, the links are detected (I see the
>> cursor change when I move the mouse over the links) but they are not
>> underlined. Based on what I've seen from the SourceViewerConfiguration
>> class, it instances a DefaultHyperlinkPresenter that is supposed to
>> underline links and display them in blue.
>
> Yes, but only on-demand i.e. when the corresponding modifier is pressed.
Ok, now, if I implement the getHyperlinkStateMask() method, which is supposed to
return the modifier key that will be used by the Presenter, and set this key to
SWT.SHIFT, I can see a difference: the links are only active when I move my mouse on
them with the SHIFT key pressed. No surprise up to here.
But no matter the modifier key returned by this method (including SWT.NONE), the
links are _never_ underlined, even when they are active, i.e. when the mouse cursor
changes when it is above the links.
What should I do?
Sébastien
>
> Dani
>
>>
>> Could anybody help me understand why the links are not displayed
>> correctly? Could that be a bug in the default presenter? (I doubt
>> that... :)
>>
>> Or, most likely, did I forget some configuration somewhere?
>>
>> Thanks a lot for you help, I'm really lost with that issue...
>>
>> Sébastien
|
|
|
Re: Configuring a SourceViewer [message #464611 is a reply to message #464609] |
Mon, 12 March 2007 15:47 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Sebastien Pennec wrote:
> Hi Daniel,
>
> Thanks for your help!
>
> Daniel Megert wrote:
>
>> Sebastien Pennec wrote:
>>
>>> Hello,
>>>
>>> I've subclassed the SourceViewerConfiguration class to add my own
>>> instance of HyperlinkDetector to the getHyperlinkDetectors method.
>>
>>
>> As of 3.3 you should no longer do this but instead use
>> 'org.eclipse.ui.workbench.texteditor.hyperlinkDetectors' and
>> 'org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTarget s'
>> extension points.
>
>
> I'm developing my plugin with Eclipse version 3.2.1 and I'd like my
> users to be able to use the plugin with their 3.2.1 version. I think
> that the main download link is still leading to a 3.2.x version, or
> has it changed?
>
> Should I change to 3.3 for development anyway??
You can switch to one of the stable (milestone) builds for developement.
>
>>> It is the only thing that is implemented in my class, everything
>>> else comes from the original SourceViewerConfiguration class.
>>>
>>> When I display lines in my viewer, the links are detected (I see the
>>> cursor change when I move the mouse over the links) but they are not
>>> underlined. Based on what I've seen from the
>>> SourceViewerConfiguration class, it instances a
>>> DefaultHyperlinkPresenter that is supposed to underline links and
>>> display them in blue.
>>
>>
>> Yes, but only on-demand i.e. when the corresponding modifier is pressed.
>
>
> Ok, now, if I implement the getHyperlinkStateMask() method, which is
> supposed to return the modifier key that will be used by the
> Presenter, and set this key to SWT.SHIFT, I can see a difference: the
> links are only active when I move my mouse on them with the SHIFT key
> pressed. No surprise up to here.
>
> But no matter the modifier key returned by this method (including
> SWT.NONE), the links are _never_ underlined, even when they are
> active, i.e. when the mouse cursor changes when it is above the links.
>
> What should I do?
Does it work for normal HTML links?
Dani
>
> Sébastien
>
>
>>
>> Dani
>>
>>>
>>> Could anybody help me understand why the links are not displayed
>>> correctly? Could that be a bug in the default presenter? (I doubt
>>> that... :)
>>>
>>> Or, most likely, did I forget some configuration somewhere?
>>>
>>> Thanks a lot for you help, I'm really lost with that issue...
>>>
>>> Sébastien
>>
|
|
|
Re: Configuring a SourceViewer [message #464613 is a reply to message #464611] |
Mon, 12 March 2007 17:32 |
Sebastien Pennec Messages: 31 Registered: July 2009 |
Member |
|
|
Daniel Megert wrote:
>
> You can switch to one of the stable (milestone) builds for developement.
>
To be sure that I understand you well: I can update my version of Eclipse to develop
my plugin, and still have the plugin being compatible and runnable on older Eclipse
versions?
>> Ok, now, if I implement the getHyperlinkStateMask() method, which is
>> supposed to return the modifier key that will be used by the
>> Presenter, and set this key to SWT.SHIFT, I can see a difference: the
>> links are only active when I move my mouse on them with the SHIFT key
>> pressed. No surprise up to here.
>>
>> But no matter the modifier key returned by this method (including
>> SWT.NONE), the links are _never_ underlined, even when they are
>> active, i.e. when the mouse cursor changes when it is above the links.
>>
>> What should I do?
>
> Does it work for normal HTML links?
Unfortunately not, and this is what I don't understand...
Thanks a lot for your help,
Sébastien
|
|
|
Re: Configuring a SourceViewer [message #464622 is a reply to message #464613] |
Tue, 13 March 2007 09:35 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Sebastien Pennec wrote:
> Daniel Megert wrote:
> >
>
>> You can switch to one of the stable (milestone) builds for developement.
>
> >
>
> To be sure that I understand you well: I can update my version of
> Eclipse to develop my plugin, and still have the plugin being
> compatible and runnable on older Eclipse versions?
>
>>> Ok, now, if I implement the getHyperlinkStateMask() method, which is
>>> supposed to return the modifier key that will be used by the
>>> Presenter, and set this key to SWT.SHIFT, I can see a difference:
>>> the links are only active when I move my mouse on them with the
>>> SHIFT key pressed. No surprise up to here.
>>>
>>> But no matter the modifier key returned by this method (including
>>> SWT.NONE), the links are _never_ underlined, even when they are
>>> active, i.e. when the mouse cursor changes when it is above the links.
>>>
>>> What should I do?
>>
>>
>> Does it work for normal HTML links?
>
>
> Unfortunately not, and this is what I don't understand...
If you can strip your code down and remove all confidential info then I
suggest you file a bug report and attach the code. I can then take a
closer look.
Dani
>
> Thanks a lot for your help,
>
> Sébastien
|
|
|
Re: Configuring a SourceViewer [message #464624 is a reply to message #464622] |
Tue, 13 March 2007 13:13 |
Sebastien Pennec Messages: 31 Registered: July 2009 |
Member |
|
|
Thanks Daniel, I'll do that this afternoon :)
You mentioned that I could switch to a stable 3.3.x build for development. I just
want to be sure of one thing: Can I use a 3.3.x version of Eclipse to develop my
plugin and run it fine with 3.2.x versions? It seems a bit suspect to me...
Thanks for you help,
Sébastien
Daniel Megert wrote:
> Sebastien Pennec wrote:
>
>> Daniel Megert wrote:
>> >
>>
>>> You can switch to one of the stable (milestone) builds for developement.
>>
>> >
>>
>> To be sure that I understand you well: I can update my version of
>> Eclipse to develop my plugin, and still have the plugin being
>> compatible and runnable on older Eclipse versions?
>>
>>>> Ok, now, if I implement the getHyperlinkStateMask() method, which is
>>>> supposed to return the modifier key that will be used by the
>>>> Presenter, and set this key to SWT.SHIFT, I can see a difference:
>>>> the links are only active when I move my mouse on them with the
>>>> SHIFT key pressed. No surprise up to here.
>>>>
>>>> But no matter the modifier key returned by this method (including
>>>> SWT.NONE), the links are _never_ underlined, even when they are
>>>> active, i.e. when the mouse cursor changes when it is above the links.
>>>>
>>>> What should I do?
>>>
>>>
>>> Does it work for normal HTML links?
>>
>>
>> Unfortunately not, and this is what I don't understand...
>
> If you can strip your code down and remove all confidential info then I
> suggest you file a bug report and attach the code. I can then take a
> closer look.
>
> Dani
>
>>
>> Thanks a lot for your help,
>>
>> Sébastien
|
|
| |
Goto Forum:
Current Time: Tue Sep 10 12:11:35 GMT 2024
Powered by FUDForum. Page generated in 0.04251 seconds
|