| Adding hyperlink capabilities for text displayed on Text [message #1147671]
||Mon, 21 October 2013 02:06
| Kivanc Muslu
Registered: November 2010
Hi everyone, |
One of my plug-ins define a view (by extending ViewPart). It is a very simple implementation where I show some information to the developer using a Text (org.eclipse.swt.widgets.Text) component.
I would like to add hyperlink capabilities to the text shown inside my Text component. What I mean by hyperlink capabilities is very similar to what Eclipse's default Console already does. For example, if I have "org.eclipse.core.internal.resources.ResourceException" in my Console output, then it is clickable and if I click it, it takes me to "Java Exception Breakpoint" dialog.
As an example, I would like to do the following:
If my text in the Text component contains the following element:
I would like ContinuousTesting.java:160 to be clickable and when the developer clicks on it, I would like the capability to open the ContinuousTesting.java, line 160 in the active Eclipse editor.
It would be great if there is support for this by default (e.g., for exception traces), but I also would not mind writing some code to transform the trace into a format that Eclipse understands.
I have chosen Text as my main component because it was easy to use (and did what I needed), if Text does not support what I want to do, please let me know if there is another Component that I can use to do the same thing (but still be able to display text in it).
Any pointers, api, example code appreciated.
Thanks, best regards,
[Updated on: Mon, 21 October 2013 02:07]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01554 seconds