[ECP] ECP and element links inside widgets [message #1633143] |
Tue, 24 February 2015 13:04  |
Eclipse User |
|
|
|
Hello,
I am using ECP to display a set of numbered articles (where an article is just a paragraph of text) .
The articles are organized by chapters and sub chapters. And I have an ecore model that represents this. So I can navigate my text like a tree structure using ECP. (e.g. chapter 1, subchapter 2, might contain articles 5 to 10)
When I display my articles I display them with a standard text area control.
It is very common that an article might refer to another article.For example article 100 might say " for blah blah blah refer to article 200"
When I display" for blah blah blah refer to article 200" I would like to be able to have 'article 200' underlined in the text and have the equivalent of a hyperlink which will open the model element for article 200 when I click on the underlined text.
Any ideas on how this could be done with ECP (I need it to work with RAP)
Perhaps a custom control based on the swt Link widget?(e.g. http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Createalinkwidget.htm)
This is probably not a very conventional use of ECP, and might seem better suited to html, but I am interested in the links between paragraphs for navigation and also for analysis (so my ecore model will contain the crossreferences between articles).
Thanks in advance for any tips.
Neil
|
|
|
|
Powered by
FUDForum. Page generated in 0.07744 seconds