Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Scoping and cross-references
Scoping and cross-references [message #986202] Mon, 19 November 2012 07:42 Go to next message
Eclipse UserFriend
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 07:44] by Moderator

Re: Scoping and cross-references [message #986344 is a reply to message #986202] Tue, 20 November 2012 02:35 Go to previous message
Eclipse UserFriend
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: Thu Jul 10 01:43:47 EDT 2025

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

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

Back to the top