Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Cross referencing
Xtext Cross referencing [message #1072201] Mon, 22 July 2013 09:27 Go to next message
Edwin Tuzar is currently offline Edwin Tuzar
Messages: 33
Registered: April 2013
Location: Kaiserslautern
Member

Hi forum,

could someone please help me with the following problem:
in my grammar I have the following rule:

Perspectives:
	'perspective_declaration' id=ID name=STRING;


and I'm using it as a cross reference in this rule:
Perspective:
	'perspective' perspective=[Perspectives] 


now the problem is that when I'm using it in the dsl editor the reference is the name field and not the id. How can I change that? to take the id field instead of name field?

I'm not sure that I'm on the right path, but now I'm trying to use scoping (never used it). Some advices will be very kind.
Thanks in advance!


Edwin W.T.
Re: Xtext Cross referencing [message #1072204 is a reply to message #1072201] Mon, 22 July 2013 09:32 Go to previous message
Alexander Nittka is currently offline Alexander Nittka
Messages: 1156
Registered: July 2009
Senior Member
Hi,

the convention is that the attribute "name" is used for determining the name of an object. If I understand correctly, you simply have to bind your own name provider and use the attribute id instead of name.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Previous Topic:about proposals
Next Topic:Display documentation next to content assist results
Goto Forum:
  


Current Time: Tue Oct 21 13:48:42 GMT 2014

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

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