I am using EMF databinding in an editor for an EMF model. At one place
the editor has a table for a multi-valued reference and you are able to
add and remove multiple objects from that table at one go. The table's
viewer uses an ObservableListContentProvider and the IObservableList for
the corresponding model object.
The add and remove actions call addAll(newElements) and
removeAll(elementsToBeRemoved) in the IObservableList. Unfortunately,
the implementation of those methods create an individual
AddCommand/RemoveCommand for each element instead of a single AddCommand
/RemoveCommand for the complete collection. As a result, the user can
add or remove many elements at one go, but needs several steps to
undo/redo such changes.
Is there any way, I can force the EMF databinding to create only a
single AddCommand/RemoveCommand or group them somehow?
--
Andreas