Question about HyperlinkManager [message #196647] |
Tue, 27 February 2007 16:29 |
Sebastien Pennec Messages: 31 Registered: July 2009 |
Member |
|
|
Hello,
I've tried this, to underlines hyperlinks in a console:
TextConsoleViewer viewer;
//viewer is initialized
Display disp = Display.getDefault();
Color blue = new Color(disp, new RGB(0,0,255) );
DefaultHyperlinkPresenter presenter = new DefaultHyperlinkPresenter(blue);
HyperlinkManager manager = new HyperlinkManager(HyperlinkManager.FIRST);
manager.install(viewer, presenter, new IHyperlinkDetector[]{new
URLHyperlinkDetector()}, 0);
With these lines, shouldn't the manager install the presenter into the TextViewer and
underline the hyper links that are found by the detector?
When I write links to the console, they are clickable but not underlined...
Could anybody help?
Thanks :)
Sébastien
|
|
|
Re: Question about HyperlinkManager [message #196965 is a reply to message #196647] |
Wed, 28 February 2007 11:53 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Sebastien Pennec wrote:
> Hello,
>
> I've tried this, to underlines hyperlinks in a console:
>
> TextConsoleViewer viewer;
> //viewer is initialized
>
> Display disp = Display.getDefault();
> Color blue = new Color(disp, new RGB(0,0,255) );
> DefaultHyperlinkPresenter presenter = new
> DefaultHyperlinkPresenter(blue);
> HyperlinkManager manager = new HyperlinkManager(HyperlinkManager.FIRST);
> manager.install(viewer, presenter, new IHyperlinkDetector[]{new
> URLHyperlinkDetector()}, 0);
>
> With these lines, shouldn't the manager install the presenter into the
> TextViewer and underline the hyper links that are found by the detector?
>
> When I write links to the console, they are clickable but not
> underlined...
The hyperlink manager manages on-demand hyperlinks like those in the
Java editor. It does not permanently show them.
Dani
>
> Could anybody help?
>
> Thanks :)
>
> Sébastien
|
|
|
Re: Question about HyperlinkManager [message #197006 is a reply to message #196965] |
Wed, 28 February 2007 14:33 |
Sebastien Pennec Messages: 31 Registered: July 2009 |
Member |
|
|
Hello Daniel,
Thanks for your reply :)
So, if I want to permanently display underlined links, the HyperlinkPresenter is not
enough? I've seen that it has a method that underlines some text region...
My goal is to detect and underlink java class names in stack traces and provide a way
to open the selected class in a java editor.
What do you think I should use to achieve that?
Up to now, I'm implemented a IHyperlinkDetector and a subclass of IHyperlink that
store the class name, method name and line number...
Thanks again for your attention, it helps me a lot! :)
Sébastien
Daniel Megert wrote:
> Sebastien Pennec wrote:
>
>> Hello,
>>
>> I've tried this, to underlines hyperlinks in a console:
>>
>> TextConsoleViewer viewer;
>> //viewer is initialized
>>
>> Display disp = Display.getDefault();
>> Color blue = new Color(disp, new RGB(0,0,255) );
>> DefaultHyperlinkPresenter presenter = new
>> DefaultHyperlinkPresenter(blue);
>> HyperlinkManager manager = new HyperlinkManager(HyperlinkManager.FIRST);
>> manager.install(viewer, presenter, new IHyperlinkDetector[]{new
>> URLHyperlinkDetector()}, 0);
>>
>> With these lines, shouldn't the manager install the presenter into the
>> TextViewer and underline the hyper links that are found by the detector?
>>
>> When I write links to the console, they are clickable but not
>> underlined...
>
> The hyperlink manager manages on-demand hyperlinks like those in the
> Java editor. It does not permanently show them.
>
> Dani
>
>>
>> Could anybody help?
>>
>> Thanks :)
>>
>> Sébastien
|
|
|
Powered by
FUDForum. Page generated in 0.08391 seconds