Interface IEcoreManipulations<RootContainer,​ModelObject>

  • Type Parameters:
    RootContainer - the type of root containers in which model elements may reside (e.g. a Resource)
    ModelObject - the type representing a model element; can be simply an EObject or a surrogate key
    All Known Subinterfaces:
    IModelManipulations
    All Known Implementing Classes:
    AbstractEcoreManipulations, AbstractModelManipulations, IndexHostManipulations, ModelManipulationWithEditingDomain, SimpleModelManipulations

    public interface IEcoreManipulations<RootContainer,​ModelObject>
    Interface for commands manipulating some representation of an instance of an Ecore metamodel. IModelManipulations is provided as the default case where the instance model is simply an EMF model.

    Note that not all representations may support / preserve ordered collections.

    Since:
    2.1
    No Extend:
    This interface is not intended to be implemented by clients.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void add​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element)
      Adds an existing element to a selected EStructuralFeature.
      default void add​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element, int index)
      Adds an existing element to a selected EStructuralFeature at the specified index.
      default void addAll​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature reference, java.util.Collection<? extends java.lang.Object> elements)
      Adds a collection of existing elements to a selected EStructuralFeature.
      void addAllTo​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature reference, java.util.Collection<? extends java.lang.Object> elements)
      Adds a collection of existing elements to a selected EStructuralFeature.
      void addTo​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element)
      Adds an existing element to a selected EStructuralFeature.
      void addTo​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element, int index)
      Adds an existing element to a selected EStructuralFeature at the specified index.
      void changeIndex​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int oldIndex, int newIndex)
      Changes the position of an existing element in the selected feature of the selected model object.
      ModelObject create​(RootContainer res, org.eclipse.emf.ecore.EClass clazz)
      Creates a model object and puts it as the root of the selected root container.
      ModelObject createChild​(ModelObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz)
      Creates a model object and puts it into the selected reference of a container.
      void moveAllTo​(java.util.Collection<ModelObject> what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)
      Moves a collection of existing elements into the selected containment reference of the selected model object.
      void moveTo​(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)
      Moves an existing element into the selected containment reference of the selected model object.
      void moveTo​(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference, int index)
      Moves an existing element into the selected containment reference of the selected model object at the specified index.
      void moveTo​(ModelObject what, RootContainer newContainer)
      Moves an existing element into the root of the selected root container.
      void moveTo​(ModelObject what, RootContainer newContainer, int index)
      Moves an existing element into the root of the selected root container at the specified index.
      void remove​(ModelObject object)
      Removes an object from the model, along with all contained objects, and any incoming or outgoing references.
      void remove​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature)
      Removes all elements from the 'many'-valued reference; if the reference is a containment reference, the element is removed from the model as well (it is assumed that no dangling cross-references point to it).
      void remove​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int index)
      Removes the element at the specified index from the 'many'-valued reference; if the reference is a containment reference, the element is removed from the model as well (it is assumed that no dangling cross-references point to it).
      void remove​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element)
      Removes an element from the 'many'-valued reference; if the reference is a containment reference, the element is removed from the model as well (it is assumed that no dangling cross-references point to it).
      void set​(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)
      Sets a 'single'-valued EStructuralFeature of a given container model element to the given value.