Remove objects from EMF models

EcoreUtil offers two similar methods: remove(EObject) and delete(EObject).

remove

This method removes an object from its containing resource/containing object. However, the removed object remains intact. (see also EMF 2.5 doc)

delete

This method removes an object from the model, thereby deleting all links to other objects. (see also EMF 2.5 doc)

Leave a Reply