Skip to main content



      Home
Home » Modeling » EMF » Cannot create duplicate references in non-containment list
Cannot create duplicate references in non-containment list [message #431844] Tue, 28 July 2009 02:20 Go to next message
Eclipse UserFriend
I am using EMF by beginning with the ecore model and then generating code.

I have a class with a non-containment list reference.

The EMF property "unique" is set to false for this reference

The EMF.Edit "Property Type" is set Editable for this reference.

The Property Sheet editor allows me to edit these references, but it does
NOT allow duplicates!

I believe the problem is in the pop-up property sheet editor, and that the
list reference itself could handle duplicates.

Any suggestions here?

Thanks in advance.

Steve
Re: Cannot create duplicate references in non-containment list [message #431881 is a reply to message #431844] Tue, 28 July 2009 11:55 Go to previous message
Eclipse UserFriend
Steven,

Comments below.

Steven Punte wrote:
> I am using EMF by beginning with the ecore model and then generating
> code.
>
> I have a class with a non-containment list reference.
>
> The EMF property "unique" is set to false for this reference
>
> The EMF.Edit "Property Type" is set Editable for this reference.
>
> The Property Sheet editor allows me to edit these references, but it
> does NOT allow duplicates!
That's because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=89325.
A bad initial assumption was that all EObject lists had to be unique...
>
> I believe the problem is in the pop-up property sheet editor, and that
> the list reference itself could handle duplicates.
No, it can't.
>
> Any suggestions here?
You'd need to specialize the list that's created in the getter to
override isUnique to return false.
>
> Thanks in advance.
>
> Steve
>
>
>
Previous Topic:Controlling XML URI resolution
Next Topic:Instance of EList
Goto Forum:
  


Current Time: Thu Jul 17 10:18:09 EDT 2025

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

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

Back to the top