Skip to main content



      Home
Home » Modeling » TMF (Xtext) » XText Cross References with loops
XText Cross References with loops [message #1404476] Fri, 01 August 2014 11:40 Go to next message
Eclipse UserFriend
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 15:10 Go to previous message
Eclipse UserFriend
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
Previous Topic:SemanticSequencerNfaProvider
Next Topic:OSX getting started with xtext
Goto Forum:
  


Current Time: Tue Jul 15 02:04:11 EDT 2025

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

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

Back to the top