Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354016

Summary: EMFListValueProperty doesn't work for feature path and objects from different packages
Product: [Modeling] EMF Reporter: Mark Hoffmann <m.hoffmann>
Component: EditAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact: Thomas Schindl <tom.schindl>
Severity: normal    
Priority: P3 CC: spacehorst, tom.schindl
Version: 2.8.0   
Target Milestone: M6   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch fpr EMFListValueProperty none

Description Mark Hoffmann CLA 2011-08-05 11:17:08 EDT
Build Identifier: 20110615-0604

The current code gets the structural feature from the object. Here should be checked, if the object is really the container for this feature. In my case a Person model comes from a PersonPackage and a Contact from the ContactPackage. 
The Person contains n - contacts.
The code leads to the situation eGet tries to get the 'value' feature from the contact with e.g. id = 2 from the Person object, which comes in as source. From this object it tries to take the feature with id 2, which is wrong and in my case no list.

Reproducible: Always
Comment 1 Mark Hoffmann CLA 2011-08-05 11:25:53 EDT
Created attachment 200997 [details]
Patch fpr EMFListValueProperty

Patch, that works for me
Comment 2 Thomas Schindl CLA 2012-02-14 08:35:47 EST
The patch makes the writing fail because delegate.getList() returns an unmodifyable list - we need to create an IObservableList to modify the underlying list.
Comment 3 Thomas Schindl CLA 2012-02-14 08:38:00 EST
released original patch with the change to use an IObservableList when writing back
Comment 4 Ed Merks CLA 2012-03-31 14:23:51 EDT
The changes are available in the M6 build.