Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [ECP] ECP and element links inside widgets( [ECP] ECP and element links inside widgets)
[ECP] ECP and element links inside widgets [message #1633143] Tue, 24 February 2015 13:04 Go to next message
Eclipse UserFriend
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
Re: [ECP] ECP and element links inside widgets [message #1633196 is a reply to message #1633143] Tue, 24 February 2015 13:42 Go to previous message
Eclipse UserFriend
Hi Neil,
I would implement this as a special renderer based on the AbstractControlSWTRenderer class.
In the renderer you can then use the link widget.
This should do the trick.

Cheers,
Eugen
Previous Topic:[Texo] EPersistenceTexoResource usage
Next Topic:[Teneo] Auto-increment a non-id column using annotations
Goto Forum:
  


Current Time: Mon Jul 07 22:57:37 EDT 2025

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

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

Back to the top