|Re: Sorting an EList for serialization [message #1124547 is a reply to message #1124536]
||Thu, 03 October 2013 16:47
| Ed Merks
Registered: July 2009
No, there's nothing to support something like that directly. The
feature's value is fetched by
EStructuralFeature), so perhaps you hook into that to substitute a list
with a different order; be cause that the list must implement internal APIs.
On 03/10/2013 6:37 PM, Robert Brodt wrote:
> Hi all,
> I have a need to sort the objects in an EList feature in my model (for
> the purposes of limiting the number of forward references) prior to
> saving but I need to restore their original order immediately after
> the save is complete.
> I've added a hack to save the original EList order, do the sort (using
> ECollections) and then restoring the EList contents using
> ECollections.setEList(). This seems to work, but is really ugly.
> My question: is there support for doing this kind of thing in EMF core
> (similar to reordering features using XMLSaveImpl.Lookup), or do I
> need to use this ugly hack?
Powered by FUDForum
. Page generated in 0.04924 seconds