Home » Modeling » TMF (Xtext) » uncertain reference to entity(uncertain reference to entity)
| | | |
Re: uncertain reference to entity [message #809922 is a reply to message #809902] |
Wed, 29 February 2012 12:47 |
Michal S Messages: 74 Registered: July 2011 |
Member |
|
|
Hello Meinte,
I haven't seen the dot behind, sorry about it.
Anyway, I think, hyperlinking is more appropriate concept for this purpose. I have googled for some example of using it ( http://www.eclipse.org/Xtext/documentation/2_1_0/180-hyperlinking.php ), but I was not successful.
Could anybody provide some simple example, how to creat hyperlink e.g. in this simple case:
MyDsl: contents+= Entity*;
Entity: Entity1|Entity2;
Entity1: 'Entity1' name=MYID;
Entity2: 'Entity2' name=MYID refToEntity1=MYID;
MYID: ID;
I guess, it can be done somehow using createHyperlinksByOffset or createHyperlinksTo methods, but I have no clue how.
Thank you & Best regards,
Michal
|
|
|
Re: uncertain reference to entity [message #810053 is a reply to message #809922] |
Wed, 29 February 2012 16:11 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
I do my special linked "after model linked" and associate information in
adapters (for various purposes). At the other end, simply override the
default implementation (of whatever it is you are after) and make it
also look in the special adapter.
You can look at such an implementation in cloudsmith/geppetto at github.
I use this for "Show Declaration" (among other things).
- henrik
On 2012-29-02 13:48, Michal S wrote:
> Hello Meinte,
> I haven't seen the dot behind, sorry about it.
> Anyway, I think, hyperlinking is more appropriate concept for this
> purpose. I have googled for some example of using it (
> http://www.eclipse.org/Xtext/documentation/2_1_0/180-hyperlinking.php ),
> but I was not successful.
> Could anybody provide some simple example, how to creat hyperlink e.g.
> in this simple case:
>
> MyDsl: contents+= Entity*;
> Entity: Entity1|Entity2;
> Entity1: 'Entity1' name=MYID;
> Entity2: 'Entity2' name=MYID refToEntity1=MYID;
> MYID: ID;
>
> I guess, it can be done somehow using createHyperlinksByOffset or
> createHyperlinksTo methods, but I have no clue how.
> Thank you & Best regards,
> Michal
|
|
|
Goto Forum:
Current Time: Thu Apr 25 08:35:02 GMT 2024
Powered by FUDForum. Page generated in 0.03368 seconds
|