Skip to main content

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:ComboViewer dropdown list not updated with new data
Next Topic:How to have Tree View inside a Table
Goto Forum:

Current Time: Wed May 23 09:25:41 GMT 2018

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

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

Back to the top