Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XText Cross References with loops
XText Cross References with loops [message #1404476] Fri, 01 August 2014 15:40 Go to next message
melissa issad is currently offline melissa issadFriend
Messages: 1
Registered: August 2014
Junior Member
Hi everyone,

I'm building a DSL using Xtext but I'm experiencing an issue that I didn't find any way out.

Well, I've created a first rule that contains two ID's for example:
Entity:
'Entity' name = ID 'is the function' f=ID
;
Now in another rule, I want to use the name of the function f
Function:
'function' f=[Entity]
;
And it gives the name ID not the function ID, did anyone of you experience the same thing?

And another question, when using a loop like:
Entity:
'Entity' name = ID 'is the functions' (f=ID)+
;
How can I reference the name of the functions while it's in a loop.

Thank you all in advance Smile
Re: XText Cross References with loops [message #1404487 is a reply to message #1404476] Fri, 01 August 2014 19:10 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
The DefaultQualifiedNameProvider uses an attributed called "name" by default.

http://christiandietrich.wordpress.com/2011/07/16/iqualifiednameproviders-in-xtext-2-0/

regarding the second question:

if you want to index an element under multiple names: have a look at DefaultResourceDescriptionStrategy


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:SemanticSequencerNfaProvider
Next Topic:OSX getting started with xtext
Goto Forum:
  


Current Time: Fri Apr 26 12:42:22 GMT 2024

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

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

Back to the top