Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354016 - EMFListValueProperty doesn't work for feature path and objects from different packages
Summary: EMFListValueProperty doesn't work for feature path and objects from different...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Edit (show other bugs)
Version: 2.8.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: M6   Edit
Assignee: Ed Merks CLA
QA Contact: Thomas Schindl CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 11:17 EDT by Mark Hoffmann CLA
Modified: 2012-03-31 14:23 EDT (History)
2 users (show)

See Also:


Attachments
Patch fpr EMFListValueProperty (3.30 KB, patch)
2011-08-05 11:25 EDT, Mark Hoffmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.