Package org.eclipse.viatra.transformation.runtime.emf.modelmanipulation

## Class AbstractModelManipulations

- java.lang.Object
- - org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.AbstractEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>
  - - org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.AbstractModelManipulations

- All Implemented Interfaces:
    `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`, `IEcoreReadOperations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`, `IModelManipulations`, `IModelReadOperations`
  Direct Known Subclasses:
    `ModelManipulationWithEditingDomain`, `SimpleModelManipulations`

      public abstract class AbstractModelManipulations
      extends AbstractEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>
      implements IModelManipulations, IModelReadOperations

  Abstract base class for model manipulation implementation. It checks for the preconditions of the operations, and the subclasses should override the do* methods.
  Since:
    2.1
  No Extend:
    API may be extended in the future.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ViatraQueryEngine` | `engine` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractModelManipulations​(ViatraQueryEngine engine)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addTo​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element)` | Adds an existing element to a selected EStructuralFeature.
    `void` | `addTo​(org.eclipse.emf.ecore.EObject 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` | `addTo​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.util.Collection<? extends java.lang.Object> elements)` | Adds a collection of existing elements to a selected EStructuralFeature.
    `void` | `changeIndex​(org.eclipse.emf.ecore.EObject 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.
    `int` | `count​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature)` | Retrieves the number of values in a given feature slot of a given container model element.
    `org.eclipse.emf.ecore.EObject` | `create​(org.eclipse.emf.ecore.resource.Resource res, org.eclipse.emf.ecore.EClass clazz)` | Creates a model object and puts it as the root of the selected root container.
    `org.eclipse.emf.ecore.EObject` | `createChild​(org.eclipse.emf.ecore.EObject 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.
    `protected abstract void` | `doAdd​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature reference, java.lang.Object object, int index)` |
    `protected abstract void` | `doAdd​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature reference, java.util.Collection<? extends java.lang.Object> element)` |
    `protected abstract void` | `doChangeIndex​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int oldIndex, int newIndex)` |
    `protected abstract int` | `doCount​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature)` |
    `protected abstract org.eclipse.emf.ecore.EObject` | `doCreate​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz)` |
    `protected abstract org.eclipse.emf.ecore.EObject` | `doCreate​(org.eclipse.emf.ecore.resource.Resource res, org.eclipse.emf.ecore.EClass clazz)` |
    `protected abstract boolean` | `doIsSetTo​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)` |
    `protected void` | `doMoveTo​(java.util.Collection<org.eclipse.emf.ecore.EObject> what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference)` |
    `protected abstract void` | `doMoveTo​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference)` |
    `protected abstract void` | `doMoveTo​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference, int index)` |
    `protected abstract void` | `doMoveTo​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer)` |
    `protected abstract void` | `doMoveTo​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer, int index)` |
    `protected abstract void` | `doRemove​(org.eclipse.emf.ecore.EObject object)` | Removes an element from the containment hierarchy
    `protected abstract void` | `doRemove​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature reference)` |
    `protected abstract void` | `doRemove​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int index)` |
    `protected abstract void` | `doRemove​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element)` | Remove a non-containment reference value
    `protected abstract void` | `doSet​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)` |
    `protected abstract java.util.stream.Stream<? extends java.lang.Object>` | `doStream​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature)` |
    `org.eclipse.emf.ecore.EClass` | `eClass​(org.eclipse.emf.ecore.EObject element)` | Queries the exact type of the given object.
    `protected NavigationHelper` | `getBaseEMFIndex()` |
    `protected static java.util.Collection<java.lang.Object>` | `getSlotValuesInternal​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature)` |
    `boolean` | `isSetTo​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)` | Returns whether the given value is listed among the values in a given feature slot of a given container model element.
    `void` | `moveTo​(java.util.Collection<org.eclipse.emf.ecore.EObject> what, org.eclipse.emf.ecore.EObject 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​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject newContainer, org.eclipse.emf.ecore.EReference reference)` | Moves an existing element into the selected containment reference of the selected model object.
    `void` | `moveTo​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.EObject 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​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer)` | Moves an existing element into the root of the selected root container.
    `void` | `moveTo​(org.eclipse.emf.ecore.EObject what, org.eclipse.emf.ecore.resource.Resource newContainer, int index)` | Moves an existing element into the root of the selected root container at the specified index.
    `void` | `remove​(org.eclipse.emf.ecore.EObject object)` | Removes an object from the model, along with all contained objects, and any incoming or outgoing references.
    `void` | `remove​(org.eclipse.emf.ecore.EObject 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​(org.eclipse.emf.ecore.EObject 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​(org.eclipse.emf.ecore.EObject 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​(org.eclipse.emf.ecore.EObject 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.
    `java.util.stream.Stream<? extends java.lang.Object>` | `stream​(org.eclipse.emf.ecore.EObject container, org.eclipse.emf.ecore.EStructuralFeature feature)` | Retrieves all values in a given feature slot of a given container model element.

    - ### Methods inherited from class org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.AbstractEcoreManipulations

      `isEObjectClass`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.IEcoreManipulations

      `add, add, addAll`

    - ### Methods inherited from interface org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.IModelManipulations

      `add, addAllTo, moveAllTo`

- - ### Field Detail

    - #### engine

          protected final ViatraQueryEngine engine

  - ### Constructor Detail

    - #### AbstractModelManipulations

          public AbstractModelManipulations​(ViatraQueryEngine engine)

  - ### Method Detail

    - #### getBaseEMFIndex

          protected NavigationHelper getBaseEMFIndex()

      Throws:
        `ViatraQueryRuntimeException`

    - #### doMoveTo

          protected void doMoveTo​(java.util.Collection<org.eclipse.emf.ecore.EObject> what,
                                  org.eclipse.emf.ecore.EObject newContainer,
                                  org.eclipse.emf.ecore.EReference reference)
                           throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doMoveTo

          protected abstract void doMoveTo​(org.eclipse.emf.ecore.EObject what,
                                           org.eclipse.emf.ecore.resource.Resource newContainer)
                                    throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doMoveTo

          protected abstract void doMoveTo​(org.eclipse.emf.ecore.EObject what,
                                           org.eclipse.emf.ecore.resource.Resource newContainer,
                                           int index)
                                    throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doMoveTo

          protected abstract void doMoveTo​(org.eclipse.emf.ecore.EObject what,
                                           org.eclipse.emf.ecore.EObject newContainer,
                                           org.eclipse.emf.ecore.EReference reference)
                                    throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doMoveTo

          protected abstract void doMoveTo​(org.eclipse.emf.ecore.EObject what,
                                           org.eclipse.emf.ecore.EObject newContainer,
                                           org.eclipse.emf.ecore.EReference reference,
                                           int index)
                                    throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doRemove

          protected abstract void doRemove​(org.eclipse.emf.ecore.EObject container,
                                           org.eclipse.emf.ecore.EStructuralFeature feature,
                                           java.lang.Object element)
                                    throws ModelManipulationException

      Remove a non-containment reference value
      Throws:
        `ModelManipulationException`

    - #### doRemove

          protected abstract void doRemove​(org.eclipse.emf.ecore.EObject container,
                                           org.eclipse.emf.ecore.EStructuralFeature feature,
                                           int index)
                                    throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doRemove

          protected abstract void doRemove​(org.eclipse.emf.ecore.EObject object)
                                    throws ModelManipulationException

      Removes an element from the containment hierarchy
      Throws:
        `ModelManipulationException`

    - #### doRemove

          protected abstract void doRemove​(org.eclipse.emf.ecore.EObject container,
                                           org.eclipse.emf.ecore.EStructuralFeature reference)
                                    throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doAdd

          protected abstract void doAdd​(org.eclipse.emf.ecore.EObject container,
                                        org.eclipse.emf.ecore.EStructuralFeature reference,
                                        java.util.Collection<? extends java.lang.Object> element)
                                 throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doAdd

          protected abstract void doAdd​(org.eclipse.emf.ecore.EObject container,
                                        org.eclipse.emf.ecore.EStructuralFeature reference,
                                        java.lang.Object object,
                                        int index)
                                 throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doSet

          protected abstract void doSet​(org.eclipse.emf.ecore.EObject container,
                                        org.eclipse.emf.ecore.EStructuralFeature feature,
                                        java.lang.Object value)
                                 throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doCreate

          protected abstract org.eclipse.emf.ecore.EObject doCreate​(org.eclipse.emf.ecore.EObject container,
                                                                    org.eclipse.emf.ecore.EReference reference,
                                                                    org.eclipse.emf.ecore.EClass clazz)
                                                             throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doCreate

          protected abstract org.eclipse.emf.ecore.EObject doCreate​(org.eclipse.emf.ecore.resource.Resource res,
                                                                    org.eclipse.emf.ecore.EClass clazz)
                                                             throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doChangeIndex

          protected abstract void doChangeIndex​(org.eclipse.emf.ecore.EObject container,
                                                org.eclipse.emf.ecore.EStructuralFeature feature,
                                                int oldIndex,
                                                int newIndex)
                                         throws ModelManipulationException

      Throws:
        `ModelManipulationException`

    - #### doCount

          protected abstract int doCount​(org.eclipse.emf.ecore.EObject container,
                                         org.eclipse.emf.ecore.EStructuralFeature feature)
                                  throws ModelManipulationException

      Throws:
        `ModelManipulationException`
      Since:
        2.1

    - #### doStream

          protected abstract java.util.stream.Stream<? extends java.lang.Object> doStream​(org.eclipse.emf.ecore.EObject container,
                                                                                          org.eclipse.emf.ecore.EStructuralFeature feature)
                                                                                   throws ModelManipulationException

      Throws:
        `ModelManipulationException`
      Since:
        2.1

    - #### doIsSetTo

          protected abstract boolean doIsSetTo​(org.eclipse.emf.ecore.EObject container,
                                               org.eclipse.emf.ecore.EStructuralFeature feature,
                                               java.lang.Object value)
                                        throws ModelManipulationException

      Throws:
        `ModelManipulationException`
      Since:
        2.1

    - #### eClass

          public org.eclipse.emf.ecore.EClass eClass​(org.eclipse.emf.ecore.EObject element)
                                              throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Queries the exact type of the given object.
      Specified by:
        `eClass` in interface `IEcoreReadOperations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`
      Since:
        2.1

    - #### count

          public int count​(org.eclipse.emf.ecore.EObject container,
                           org.eclipse.emf.ecore.EStructuralFeature feature)
                    throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Retrieves the number of values in a given feature slot of a given container model element.
      Specified by:
        `count` in interface `IEcoreReadOperations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`
      Since:
        2.1

    - #### stream

          public java.util.stream.Stream<? extends java.lang.Object> stream​(org.eclipse.emf.ecore.EObject container,
                                                                            org.eclipse.emf.ecore.EStructuralFeature feature)
                                                                     throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Retrieves all values in a given feature slot of a given container model element.
      Specified by:
        `stream` in interface `IEcoreReadOperations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`
      Since:
        2.1

    - #### isSetTo

          public boolean isSetTo​(org.eclipse.emf.ecore.EObject container,
                                 org.eclipse.emf.ecore.EStructuralFeature feature,
                                 java.lang.Object value)
                          throws ModelManipulationException

      Description copied from interface: `IEcoreReadOperations`
      Returns whether the given value is listed among the values in a given feature slot of a given container model element.
      Specified by:
        `isSetTo` in interface `IEcoreReadOperations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`
      Since:
        2.1

    - #### create

          public org.eclipse.emf.ecore.EObject create​(org.eclipse.emf.ecore.resource.Resource res,
                                                      org.eclipse.emf.ecore.EClass clazz)
                                               throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Creates a model object and puts it as the root of the selected root container.
      Specified by:
        `create` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### createChild

          public org.eclipse.emf.ecore.EObject createChild​(org.eclipse.emf.ecore.EObject container,
                                                           org.eclipse.emf.ecore.EReference reference,
                                                           org.eclipse.emf.ecore.EClass clazz)
                                                    throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Creates a model object and puts it into the selected reference of a container. The container reference must be a containment reference.
      Specified by:
        `createChild` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### addTo

          public void addTo​(org.eclipse.emf.ecore.EObject container,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            java.lang.Object element)
                     throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Adds an existing element to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Specified by:
        `addTo` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### addTo

          public void addTo​(org.eclipse.emf.ecore.EObject container,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            java.lang.Object element,
                            int index)
                     throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Adds an existing element to a selected EStructuralFeature at the specified index. If the feature is an EReference, it must not be a containment reference.
      Specified by:
        `addTo` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### addTo

          public void addTo​(org.eclipse.emf.ecore.EObject container,
                            org.eclipse.emf.ecore.EStructuralFeature feature,
                            java.util.Collection<? extends java.lang.Object> elements)
                     throws ModelManipulationException

      Description copied from interface: `IModelManipulations`
      Adds a collection of existing elements to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.
      Specified by:
        `addTo` in interface `IModelManipulations`
      Throws:
        `ModelManipulationException`

    - #### set

          public void set​(org.eclipse.emf.ecore.EObject container,
                          org.eclipse.emf.ecore.EStructuralFeature feature,
                          java.lang.Object value)
                   throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Sets a 'single'-valued EStructuralFeature of a given container model element to the given value.

      The previous value of the feature, if any, is removed. If the provided new value is null, then the invocation acts as 'unset', and no new value is stored.

      Specified by:
        `set` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
        `value` - the new value to be set, or null

        TODO restrict to non-containment?

      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove​(org.eclipse.emf.ecore.EObject object)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Removes an object from the model, along with all contained objects, and any incoming or outgoing references.
      Specified by:
        `remove` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove​(org.eclipse.emf.ecore.EObject container,
                             org.eclipse.emf.ecore.EStructuralFeature feature,
                             java.lang.Object element)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      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).
      Specified by:
        `remove` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove​(org.eclipse.emf.ecore.EObject container,
                             org.eclipse.emf.ecore.EStructuralFeature feature,
                             int index)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      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).
      Specified by:
        `remove` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### remove

          public void remove​(org.eclipse.emf.ecore.EObject container,
                             org.eclipse.emf.ecore.EStructuralFeature feature)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      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).
      Specified by:
        `remove` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo​(org.eclipse.emf.ecore.EObject what,
                             org.eclipse.emf.ecore.resource.Resource newContainer)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the root of the selected root container.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo​(org.eclipse.emf.ecore.EObject what,
                             org.eclipse.emf.ecore.resource.Resource newContainer,
                             int index)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the root of the selected root container at the specified index.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo​(org.eclipse.emf.ecore.EObject what,
                             org.eclipse.emf.ecore.EObject newContainer,
                             org.eclipse.emf.ecore.EReference reference)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the selected containment reference of the selected model object.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo​(org.eclipse.emf.ecore.EObject what,
                             org.eclipse.emf.ecore.EObject newContainer,
                             org.eclipse.emf.ecore.EReference reference,
                             int index)
                      throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Moves an existing element into the selected containment reference of the selected model object at the specified index.
      Specified by:
        `moveTo` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### moveTo

          public void moveTo​(java.util.Collection<org.eclipse.emf.ecore.EObject> what,
                             org.eclipse.emf.ecore.EObject newContainer,
                             org.eclipse.emf.ecore.EReference reference)
                      throws ModelManipulationException

      Description copied from interface: `IModelManipulations`
      Moves a collection of existing elements into the selected containment reference of the selected model object.
      Specified by:
        `moveTo` in interface `IModelManipulations`
      Throws:
        `ModelManipulationException`

    - #### changeIndex

          public void changeIndex​(org.eclipse.emf.ecore.EObject container,
                                  org.eclipse.emf.ecore.EStructuralFeature feature,
                                  int oldIndex,
                                  int newIndex)
                           throws ModelManipulationException

      Description copied from interface: `IEcoreManipulations`
      Changes the position of an existing element in the selected feature of the selected model object.
      Specified by:
        `changeIndex` in interface `IEcoreManipulations<org.eclipse.emf.ecore.resource.Resource,​org.eclipse.emf.ecore.EObject>`
      Throws:
        `ModelManipulationException`

    - #### getSlotValuesInternal

          protected static java.util.Collection<java.lang.Object> getSlotValuesInternal​(org.eclipse.emf.ecore.EObject container,
                                                                                        org.eclipse.emf.ecore.EStructuralFeature feature)

      Since:
        2.1