Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Reference error in EMF with a list of references
Reference error in EMF with a list of references [message #1041616] Mon, 15 April 2013 10:21 Go to next message
Mårten Carlzon is currently offline Mårten CarlzonFriend
Messages: 60
Registered: March 2013
Location: Sweden


I hope this is in the right part of the forum, its related both to XText and EMF and I am using Eugenia so I took a guess Smile

I have the problem with that I get the error
"All references are unique in EMF due to the current code generation"

I have a simple Xtext grammar[1] (I am tryint to extend the default therefore I still use "Greeting" Smile) that I am trying to use. The issue seems to be that I try to have a "list" of links to AttributeDefinition.
When I have
('ref' attribute=[AttributeDefinition])?

it works but since I want to be able to have more then one attribute related to more then one Greeting I tried to change to
 ('ref' attributes+=[AttributeDefinition])*

but then I get the error.

Is there something I am missing when I try to make a list of references to an attribute? I tried to make links separated from everything else (as can be see in my commented code) but I would like to "insert" them into the Greeting part.

I don't know if it is relevant but better with to much then to little Smile
Anyway, I wrote in the beginning that I use Eugenia and I get the error when I am doing this process and when I am at step nr 6.

Thanks for any help

Write you later / Mårten
  • Attachment: MyDsl.txt
    (Size: 0.56KB, Downloaded 118 times)
Re: Reference error in EMF with a list of references [message #1044393 is a reply to message #1041616] Thu, 18 April 2013 21:26 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13709
Registered: July 2009
Senior Member

am not sure what the problem is. maybe the thing you use doesnt like 0..* refs with unique = false.
you may try to
(1) use a manually maintained metamodel
(2) change the unique to true using a IXtext2EcorePostProcessor

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Running own DSL-Project in Maven Build
Next Topic:Xtext 2.4.1 Update Available
Goto Forum:

Current Time: Sun Jan 17 14:05:24 GMT 2021

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

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

Back to the top