capint
7/10/2016 - 8:53 PM

EMF >> EditingDomain

EMF >> EditingDomain

An editing domain manages a self-contained set of interrelated ***EMF models*** and the ***Commands*** that modify them. The models are maintained in the form of a ResourceSet. Commands that modify the model are typically created through the domain and are executed using the CommandStack. 

The domain imposes a hierarchical structure upon the models via the results of the ***getChildren and getParent*** methods. This is useful for implementing commands such as org.eclipse.emf.edit.command.RemoveCommand, which often needs to deduce the parent from which to remove a particular object, and org.eclipse.emf.edit.command.CopyCommand, which often needs to deduce all the children to copy recursively. This also meshes well with user interfaces, which often present a model hierarchically, i.e., as a tree.
AdapterFactoryEditingDomain implements an editing domain by delegating to adapters that implement IEditingDomainItemProvider.