Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Xtext Cross referencing
Xtext Cross referencing [message #1072201] Mon, 22 July 2013 05:27 Go to next message
Eclipse UserFriend
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!
Re: Xtext Cross referencing [message #1072204 is a reply to message #1072201] Mon, 22 July 2013 05:32 Go to previous message
Eclipse UserFriend
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
Previous Topic:about proposals
Next Topic:Display documentation next to content assist results
Goto Forum:
  


Current Time: Wed Jul 23 06:44:57 EDT 2025

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

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

Back to the top