Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » EMF Adding to a collection with reflective API.
EMF Adding to a collection with reflective API. [message #756172] Fri, 11 November 2011 11:13
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member

Is there a way to add objects to a many EReference without using copy?
When doing this, my objects are not added to the containment.

EList<EObject> manyReferenceCollection = (EList<EObject>)


target.eSet(eReference, manyReferenceCollection);

When creating a copy first , it works but my objects are copies, not the
original objects.

EList<EObject> manyReferenceCollection = (EList<EObject>)

Collection<EObject> copyAll =


target.eSet(eReference, copyAll);

I need the orginal objects to be set back into the reference, as
elsewhere I keep an index of these objects. The index breaks if a copy
of the original list is stored back in the reference.

Thank You
Previous Topic:Refresh issue with tableviewer
Next Topic:ComboViewer dropdown list not updated with new data
Goto Forum:

Current Time: Tue May 24 10:13:00 GMT 2016

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

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