Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross Referencing with a different attribute of a rule
Cross Referencing with a different attribute of a rule [message #1032430] Wed, 03 April 2013 01:43 Go to next message
Roza Ghamari is currently offline Roza GhamariFriend
Messages: 82
Registered: January 2013
Hi all,

In my DSL, I need to cross reference a rule using a different variable than it's name. For example my rule is like:

name = ID "and" name2 = ID

"ref" [rule1|name2]

This always gives errors and cannot be compiled.

I also tried adding a rule for name2 like

Name2String return ecore::EString:

The error is going away when I change the rule2 to "ref" [rule1|Name2String] but it still uses the default name attribute in rule1 to reference it.

Is there any way to solve this problem in xtext?

Thanks very much!
Re: Cross Referencing with a different attribute of a rule [message #1032528 is a reply to message #1032430] Wed, 03 April 2013 05:22 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13317
Registered: July 2009
Senior Member
Hi you have to customize the iqualifiednameprovider
Need training, onsite consulting or any other kind of help for Xtext?
Go visit or send a mail to xtext at itemis dot de

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :

[Updated on: Wed, 03 April 2013 05:48]

Report message to a moderator

Previous Topic:Setting the key value for a map from imported ecpre model
Next Topic:cross reference into other DSL files
Goto Forum:

Current Time: Sat Jan 25 16:57:14 GMT 2020

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

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

Back to the top