Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Scoping and cross-references
Scoping and cross-references [message #986202] Mon, 19 November 2012 12:42 Go to next message
Quentin Boucher is currently offline Quentin BoucherFriend
Messages: 27
Registered: July 2012
Junior Member
Hello,

I am still working on the implementation of a scope provider. In my language, I can declare elements at one place and extend them (at several places) later in the model. In order to extend an element, I defined a Long_ID which could be defined as follows:

Long_ID: head=[Element] ('.' tail=Long_ID)?


Such that I can make a model like this one:
A {
    B {D},
    C}

A.B {
    F,
    G
}

A.B {
   H
}



Now, I don't know how I can find all extensions of an element. In my example, I would like to get all (2) extension points of B in order to get its full content (i.e. D, F, G, H). The easiest way would be to go through all the extension elements and find if they reference the desired declaration element. However, it doesn't seem possible in the context of the scope provider.

Do you have any tip to check this?

Thank you!

Quentin

[Updated on: Mon, 19 November 2012 12:44]

Report message to a moderator

Re: Scoping and cross-references [message #986344 is a reply to message #986202] Tue, 20 November 2012 07:35 Go to previous message
Quentin Boucher is currently offline Quentin BoucherFriend
Messages: 27
Registered: July 2012
Junior Member
Finally I managed to implement it by building and comparing fully qualified names.
Previous Topic:Resolving Crossreferences in Eclipse context
Next Topic:Getting a reference to the class we are working with fails
Goto Forum:
  


Current Time: Fri Dec 19 13:51:08 GMT 2014

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

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