Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Qualified Name Provider
Qualified Name Provider [message #736140] Thu, 13 October 2011 16:44 Go to next message
Simon Schwichtenberg is currently offline Simon SchwichtenbergFriend
Messages: 127
Registered: September 2011
Senior Member
hi,

in my model there are Entities and Relationships. The relationsships holds cross references to Entities. As you can see, an Entity does not know it crossreferences to other Entities by itself. When I type a qualified name, it want that the Relationsships appear for an Entity (I also have a grammar rule for qualified names)

Example (Instance level):

Entity A;
Entity B;
Relationsship R{
Link to A;
Link to B;
}

So when I type "A." I want R to appear in the proposals.

Do I have to implement a QualifiedNameProvider, ScopeProvider or a ProposalProvider?
Re: Qualified Name Provider [message #736177 is a reply to message #736140] Thu, 13 October 2011 18:33 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

the first idea is to use something along the following lines in the grammar (depending what kind of "navigation" you want to model):

Rule: from=[Entity] '.' relation=[Relation] '.' to=[Entity]

You then use a scoping rule that restricts the visibility for relation to those whose first link is from.

Alex
Re: Qualified Name Provider [message #736744 is a reply to message #736177] Fri, 14 October 2011 09:37 Go to previous message
Simon Schwichtenberg is currently offline Simon SchwichtenbergFriend
Messages: 127
Registered: September 2011
Senior Member
thanks. i think i'll do it like this.
Previous Topic:Strange behavior with XtextSerializationException
Next Topic:UI plug-ins loaded when creating Xtext resource
Goto Forum:
  


Current Time: Thu Mar 28 13:29:32 GMT 2024

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

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

Back to the top