Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Question about HyperlinkManager
Question about HyperlinkManager [message #196647] Tue, 27 February 2007 16:29 Go to next message
Sebastien Pennec is currently offline Sebastien PennecFriend
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 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
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 Go to previous message
Sebastien Pennec is currently offline Sebastien PennecFriend
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
Previous Topic:eclipse uml
Next Topic:how to use pdf in birt? kindly help!
Goto Forum:
  


Current Time: Wed Sep 25 18:49:41 GMT 2024

Powered by FUDForum. Page generated in 0.08391 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top