Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Manual linking
Manual linking [message #829756] Mon, 26 March 2012 18:40 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Hello again,

I am stuck again, I hope someone can set me on track... again...

I defined the grammar with simple ID fields, exported the ecore model, edited it to add real references for each id and imported it in my xtext grammar. I overrode the linker and I can set these references to point at the objects with the qualified name specified by the corresponding id.

In my naivety, I thought that this would be enough for the xtext runtime to give me full support as for links defined in the grammar with []. Either I was wrong and it's impossible or there are some other things that have to be put in place before that.

I tried to get inspiration from gepetto, but there's so much going on there that I can't tell what is important for this use case and what not, and more importantly I can't tell how the IDE support for links created manually is enabled.

Please point me in the right direction!

best regards,
Vlad
Re: Manual linking [message #829907 is a reply to message #829756] Tue, 27 March 2012 00:14 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2012-26-03 20:41, Vlad Dumitrescu wrote:
> Hello again,
>
> I am stuck again, I hope someone can set me on track... again...
>
> I defined the grammar with simple ID fields, exported the ecore model,
> edited it to add real references for each id and imported it in my xtext
> grammar. I overrode the linker and I can set these references to point
> at the objects with the qualified name specified by the corresponding id.
> In my naivety, I thought that this would be enough for the xtext runtime
> to give me full support as for links defined in the grammar with [].
> Either I was wrong and it's impossible or there are some other things
> that have to be put in place before that.
>
> I tried to get inspiration from gepetto, but there's so much going on
> there that I can't tell what is important for this use case and what
> not, and more importantly I can't tell how the IDE support for links
> created manually is enabled.
>
> Please point me in the right direction!
>
If there are no [ ] type references in the grammar, then naturally
nothing gets generated automatically for those, and you have to provide
all such functionality yourself.

What linking does (in addition to assigning a reference) is to find the
referenced elements (looking them up in an index), and keeping track of
these references to enable reacting to change and rebuilding.

There is a bunch of small things to deal with. I am happy to answer
question about Geppetto - but can't really give you a clear "hear is how
to do it" description. (+ some of the things I did early on are probably
done the way they are because I did not know better then).

- henrik
Re: Manual linking [message #830259 is a reply to message #829907] Tue, 27 March 2012 11:53 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Thank you, Henrik. After a lot of thinking, I think I understand why just linking is not enough. I will have to give it even more thought, hopefully xtext works in my use case.

best regards,
Vlad
Previous Topic:XText and GMF integration using multi page editor
Next Topic:Build GMF on top of my Xtext Project
Goto Forum:
  


Current Time: Wed Apr 24 22:06:48 GMT 2024

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

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

Back to the top