Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Doubt about cross-references  () 1 Vote
Doubt about cross-references [message #1674618] Sat, 14 March 2015 20:45 Go to next message
Fernando Costa is currently offline Fernando CostaFriend
Messages: 5
Registered: June 2014
Location: Brazil
Junior Member
I'm trying Xtext for the first time, but I got a little bit confused using cross-references. Considering the 15 Minutes Tutorial, why cross-references don't work when I change the name of the entity's "name" property? For example:

Entity:
'entity' id = ID ('extends' superType = [Entity])? '{'
(features += Feature)*
'}'
;

I know "[Entity]" is just a short for "[Entity|ID]", but how Xtext knows which property matching the ID terminal rule must be used? Have we always to set a "name" property? How could we change this behaviour?

Thanks!

[Updated on: Sat, 14 March 2015 20:55]

Report message to a moderator

Re: Doubt about cross-reference [message #1674619 is a reply to message #1674618] Sat, 14 March 2015 20:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi, the default IQualifedNameProvider implementation requires you to do so. but of course you can change it: https://christiandietrich.wordpress.com/tag/iqualifiednameprovider/

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Doubt about cross-reference [message #1674811 is a reply to message #1674619] Sat, 14 March 2015 22:30 Go to previous message
Fernando Costa is currently offline Fernando CostaFriend
Messages: 5
Registered: June 2014
Location: Brazil
Junior Member
Thanks a lot!
Previous Topic:Xtext 2.8.0 from Maven
Next Topic:Partial grammar editor
Goto Forum:
  


Current Time: Fri Apr 19 06:19:41 GMT 2024

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

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

Back to the top