|Re: Manual linking [message #829907 is a reply to message #829756]
||Tue, 27 March 2012 00:14
| Henrik Lindberg
Registered: July 2009
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).
Powered by FUDForum
. Page generated in 0.01722 seconds