|
Re: Cannot create duplicate references in non-containment list [message #431881 is a reply to message #431844] |
Tue, 28 July 2009 15:55 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
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
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03986 seconds