Class IndexHostManipulations<ModelObject>
- java.lang.Object
-
- org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.AbstractEcoreManipulations<java.lang.Void,ModelObject>
-
- org.eclipse.viatra.transformation.runtime.emf.modelmanipulation.tabular.IndexHostManipulations<ModelObject>
-
- All Implemented Interfaces:
IEcoreManipulations<java.lang.Void,ModelObject>,IEcoreReadOperations<java.lang.Void,ModelObject>
public abstract class IndexHostManipulations<ModelObject> extends AbstractEcoreManipulations<java.lang.Void,ModelObject> implements IEcoreReadOperations<java.lang.Void,ModelObject>
Manipulates and reads anEcoreIndexHost.The ModelObject type parameter may be specialized to any surrogate key type in use, such as
StringorLong.Implementors must provide their respective facility for creating and deleting objects (surrogate keys), therefore the methods
doCreate(Void, EClass)anddoCreate(Object, EReference, EClass)are not implemented. To implement, use helpersregisterInstance(EClassifier, Object, ITableWriterUnary.Table)andaddInternal(Object, EStructuralFeature, Object, ITableWriterBinary.Table, ITableWriterUnary.Table), as well asinitializeNewlyCreatedObject(Object, EClass).Limitations:
- Currently, root containers are not represented (always null).
- Ordered collections are not maintained or represented.
- No treatment of opposites (incl. container features) yet.
- Since:
- 2.1
- No Reference:
- This class is experimental with an unstable API, not recommended for general usage yet.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classIndexHostManipulations.FeatureKindprotected static interfaceIndexHostManipulations.Initializer<ModelObject>
-
Field Summary
Fields Modifier and Type Field Description protected static TupleMaskBIND_SOURCEprotected static TupleMaskBIND_TARGETprotected java.util.Map<org.eclipse.emf.ecore.EClass,IndexHostManipulations.Initializer<ModelObject>>initializerActions
-
Constructor Summary
Constructors Constructor Description IndexHostManipulations(EcoreIndexHost host)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAllTo(ModelObject 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.protected voidaddInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object newValue, ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable, ITableWriterUnary.Table<java.lang.Object> instanceTable)PRE: Previous containments are erased at this point, if adding to a containment feature.voidaddTo(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element)Adds an existing element to a selected EStructuralFeature.voidaddTo(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.voidchangeIndex(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.protected java.util.List<org.eclipse.emf.ecore.EClass>computeSubtypes(org.eclipse.emf.ecore.EClass superClass)intcount(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature)Retrieves the number of values in a given feature slot of a given container model element.ModelObjectcreate(java.lang.Void res, org.eclipse.emf.ecore.EClass clazz)Creates a model object and puts it as the root of the selected root container.ModelObjectcreateChild(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.protected java.util.Optional<org.eclipse.emf.ecore.EObject>createTemplateInstance(org.eclipse.emf.ecore.EClass clazz)Creates an (optional) vanila instance of the class to learn about the default values.protected voiddeleteWithAllDangling(ModelObject element)Removes a model element from the model.protected voiddeleteWithOutgoing(ModelObject element)Removes a model element from the model.protected voiddeleteWithOutgoingInternal(ModelObject element, org.eclipse.emf.ecore.EClass eClass)protected java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object>determineDefaultValues(org.eclipse.emf.ecore.EClass clazz)Called for each exact type at most once.protected IndexHostManipulations.Initializer<ModelObject>determineInitializationSequence(org.eclipse.emf.ecore.EClass clazz)Called for each exact type at most once.protected abstract ModelObjectdoCreate(java.lang.Void res, org.eclipse.emf.ecore.EClass clazz)protected abstract ModelObjectdoCreate(ModelObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz)org.eclipse.emf.ecore.EClasseClass(ModelObject element)Queries the exact type of the given object.protected org.eclipse.emf.ecore.EClassfindExactType(ModelObject element)Implementors may override this with a more efficient lookup.protected java.lang.Iterable<org.eclipse.emf.ecore.EClass>getAllClassTypes()protected java.util.List<org.eclipse.emf.ecore.EClass>getAllClassTypesThatExtend(org.eclipse.emf.ecore.EClass superClass)PRE: superClass is not EObjectprotected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>>getAllCrossrefsPossiblyIncoming(org.eclipse.emf.ecore.EClass eClass)protected java.lang.Iterable<org.eclipse.emf.ecore.EStructuralFeature>getAllPossibleFeatures(org.eclipse.emf.ecore.EClass exactType)protected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>>getAllRefsPossiblyContaining(org.eclipse.emf.ecore.EClass eClass)protected voidinitializeNewlyCreatedObject(ModelObject instance, org.eclipse.emf.ecore.EClass clazz)Initializes a newly created object to its default state.protected booleanisAssignableFrom(org.eclipse.emf.ecore.EClassifier classifier, java.lang.Object element)protected booleanisAssignableFrom(org.eclipse.emf.ecore.EClass superClass, ModelObject element)booleanisSetTo(ModelObject 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.protected IndexHostManipulations.Initializer<ModelObject>makeInitializer(java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object> defaultValues)Constructs an initializer that sets attributes of the model object to the given default values.protected voidmoveAllInternal(java.util.Collection<ModelObject> what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)voidmoveAllTo(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.protected voidmoveInternal(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)voidmoveTo(ModelObject what, java.lang.Void newContainer)Moves an existing element into the root of the selected root container.voidmoveTo(ModelObject what, java.lang.Void newContainer, int index)Moves an existing element into the root of the selected root container at the specified index.voidmoveTo(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference)Moves an existing element into the selected containment reference of the selected model object.voidmoveTo(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.protected voidregisterInstance(org.eclipse.emf.ecore.EClassifier type, java.lang.Object newValue, ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)Registers an instance of a classifier.voidremove(ModelObject object)Removes an object from the model, along with all contained objects, and any incoming or outgoing references.voidremove(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).voidremove(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).voidremove(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).protected voidremoveAllOfInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature)protected voidremoveFromCurrentContainer(ModelObject value)The implementation must: remove the containment reference pointing to this element, if it exists.protected voidremoveFromCurrentContainer(ModelObject value, org.eclipse.emf.ecore.EClass eClass)protected voidremoveInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object oldValue, ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable, ITableWriterUnary.Table<java.lang.Object> instanceTable)voidset(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.protected voidsetInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value)java.util.stream.Stream<? extends java.lang.Object>stream(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature)Retrieves all values in a given feature slot of a given container model element.protected voidunregisterInstance(org.eclipse.emf.ecore.EClassifier type, java.lang.Object oldValue, ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)Unregisters an instance of a classifier.-
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
-
-
-
-
Field Detail
-
BIND_SOURCE
protected static final TupleMask BIND_SOURCE
-
BIND_TARGET
protected static final TupleMask BIND_TARGET
-
initializerActions
protected java.util.Map<org.eclipse.emf.ecore.EClass,IndexHostManipulations.Initializer<ModelObject>> initializerActions
-
-
Constructor Detail
-
IndexHostManipulations
public IndexHostManipulations(EcoreIndexHost host)
-
-
Method Detail
-
eClass
public org.eclipse.emf.ecore.EClass eClass(ModelObject element) throws ModelManipulationException
Description copied from interface:IEcoreReadOperationsQueries the exact type of the given object.- Specified by:
eClassin interfaceIEcoreReadOperations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
findExactType
protected org.eclipse.emf.ecore.EClass findExactType(ModelObject element) throws ModelManipulationException
Implementors may override this with a more efficient lookup.- Throws:
ModelManipulationException
-
isAssignableFrom
protected boolean isAssignableFrom(org.eclipse.emf.ecore.EClass superClass, ModelObject element)
-
isAssignableFrom
protected boolean isAssignableFrom(org.eclipse.emf.ecore.EClassifier classifier, java.lang.Object element)
-
getAllClassTypes
protected java.lang.Iterable<org.eclipse.emf.ecore.EClass> getAllClassTypes()
-
getAllClassTypesThatExtend
protected java.util.List<org.eclipse.emf.ecore.EClass> getAllClassTypesThatExtend(org.eclipse.emf.ecore.EClass superClass)
PRE: superClass is not EObject
-
computeSubtypes
protected java.util.List<org.eclipse.emf.ecore.EClass> computeSubtypes(org.eclipse.emf.ecore.EClass superClass)
-
count
public int count(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature) throws ModelManipulationException
Description copied from interface:IEcoreReadOperationsRetrieves the number of values in a given feature slot of a given container model element.- Specified by:
countin interfaceIEcoreReadOperations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
stream
public java.util.stream.Stream<? extends java.lang.Object> stream(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature) throws ModelManipulationException
Description copied from interface:IEcoreReadOperationsRetrieves all values in a given feature slot of a given container model element.- Specified by:
streamin interfaceIEcoreReadOperations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
isSetTo
public boolean isSetTo(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value) throws ModelManipulationException
Description copied from interface:IEcoreReadOperationsReturns whether the given value is listed among the values in a given feature slot of a given container model element.- Specified by:
isSetToin interfaceIEcoreReadOperations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
create
public ModelObject create(java.lang.Void res, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsCreates a model object and puts it as the root of the selected root container.- Specified by:
createin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
doCreate
protected abstract ModelObject doCreate(java.lang.Void res, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
- Throws:
ModelManipulationException
-
createChild
public ModelObject createChild(ModelObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsCreates a model object and puts it into the selected reference of a container. The container reference must be a containment reference.- Specified by:
createChildin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
doCreate
protected abstract ModelObject doCreate(ModelObject container, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
- Throws:
ModelManipulationException
-
deleteWithOutgoing
protected void deleteWithOutgoing(ModelObject element) throws ModelManipulationException
Removes a model element from the model.An efficient implementation shall:
- discover the type of the deleted element
- remove the element from the unary table corresponding to the type (use
unregisterInstance(EClassifier, Object, ITableWriterUnary.Table)), - as well as recursively remove any contained objects and assigned features.
- Parameters:
element- the model element to delete from the model- Throws:
ModelManipulationException
-
deleteWithOutgoingInternal
protected void deleteWithOutgoingInternal(ModelObject element, org.eclipse.emf.ecore.EClass eClass) throws ModelManipulationException
- Throws:
ModelManipulationException
-
deleteWithAllDangling
protected void deleteWithAllDangling(ModelObject element) throws ModelManipulationException
Removes a model element from the model.The implementation must:
- perform everything that
deleteWithOutgoing(Object)does, as well as - remove any containment or cross-references pointing to this element.
- Parameters:
element- the model element to delete from the model- Throws:
ModelManipulationException
- perform everything that
-
removeFromCurrentContainer
protected void removeFromCurrentContainer(ModelObject value) throws ModelManipulationException
The implementation must:
- remove the containment reference pointing to this element, if it exists.
- Throws:
ModelManipulationException
-
removeFromCurrentContainer
protected void removeFromCurrentContainer(ModelObject value, org.eclipse.emf.ecore.EClass eClass)
-
getAllRefsPossiblyContaining
protected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>> getAllRefsPossiblyContaining(org.eclipse.emf.ecore.EClass eClass)
-
getAllCrossrefsPossiblyIncoming
protected java.lang.Iterable<java.util.Map.Entry<org.eclipse.emf.ecore.EStructuralFeature,ITableWriterBinary.Table<java.lang.Object,java.lang.Object>>> getAllCrossrefsPossiblyIncoming(org.eclipse.emf.ecore.EClass eClass)
-
getAllPossibleFeatures
protected java.lang.Iterable<org.eclipse.emf.ecore.EStructuralFeature> getAllPossibleFeatures(org.eclipse.emf.ecore.EClass exactType)
-
unregisterInstance
protected void unregisterInstance(org.eclipse.emf.ecore.EClassifier type, java.lang.Object oldValue, ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)Unregisters an instance of a classifier.- Parameters:
feature-oldValue-instanceTableOptional- can be null, in which case the table is looked up based on the type
-
registerInstance
protected void registerInstance(org.eclipse.emf.ecore.EClassifier type, java.lang.Object newValue, ITableWriterUnary.Table<java.lang.Object> instanceTableOptional)Registers an instance of a classifier.- Parameters:
feature-newValue-instanceTableOptional- can be null, in which case the table is looked up based on the type
-
initializeNewlyCreatedObject
protected void initializeNewlyCreatedObject(ModelObject instance, org.eclipse.emf.ecore.EClass clazz) throws ModelManipulationException
Initializes a newly created object to its default state. While it is possible to customize this method directly, overridingdetermineInitializationSequence(EClass)ordetermineDefaultValues(EClass).- Throws:
ModelManipulationException
-
determineInitializationSequence
protected IndexHostManipulations.Initializer<ModelObject> determineInitializationSequence(org.eclipse.emf.ecore.EClass clazz)
Called for each exact type at most once. Computes the initalization steps that will be performed for each instance of the class.The default implementation derives the necessary steps from the default values of attributes. Feel free to override with domain-specific initialization steps, such as setting key attributes to uniquely generated values.
-
determineDefaultValues
protected java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object> determineDefaultValues(org.eclipse.emf.ecore.EClass clazz)
Called for each exact type at most once. Computes the default values of attributes, wherever non-derived and different from the datatype default.The default implementation derives the defaults from a template instance initialized by the
EFactory.. Feel free to override with domain-specific initialization steps, or overridedetermineInitializationSequence(EClass)for larger flexibility.
-
createTemplateInstance
protected java.util.Optional<org.eclipse.emf.ecore.EObject> createTemplateInstance(org.eclipse.emf.ecore.EClass clazz)
Creates an (optional) vanila instance of the class to learn about the default values. May fail, or may be overridden to omit the template creation.- Returns:
- null if creation is unsuccessful or undesired
-
makeInitializer
protected IndexHostManipulations.Initializer<ModelObject> makeInitializer(java.util.Map<org.eclipse.emf.ecore.EAttribute,java.lang.Object> defaultValues)
Constructs an initializer that sets attributes of the model object to the given default values.
-
removeInternal
protected void removeInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object oldValue, ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable, ITableWriterUnary.Table<java.lang.Object> instanceTable) throws ModelManipulationException
- Parameters:
featureTable- optional, can be supplied if known; will be looked up based on feature if null is suppliedinstanceTable- optional, can be supplied if known; will be looked up based on feature if null is supplied- Throws:
ModelManipulationException
-
addInternal
protected void addInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object newValue, ITableWriterBinary.Table<java.lang.Object,java.lang.Object> featureTable, ITableWriterUnary.Table<java.lang.Object> instanceTable)
PRE: Previous containments are erased at this point, if adding to a containment feature. This is required to avoid double containment.- Parameters:
featureTable- optional, can be supplied if known; will be looked up based on feature if null is suppliedinstanceTable- optional, can be supplied if known; will be looked up based on feature if null is supplied
-
addTo
public void addTo(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsAdds an existing element to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.- Specified by:
addToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
addTo
public void addTo(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element, int index) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsAdds 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:
addToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
addAllTo
public void addAllTo(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.util.Collection<? extends java.lang.Object> elements) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsAdds a collection of existing elements to a selected EStructuralFeature. If the feature is an EReference, it must not be a containment reference.- Specified by:
addAllToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
set
public void set(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsSets 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:
setin interfaceIEcoreManipulations<java.lang.Void,ModelObject>value- the new value to be set, or nullTODO restrict to non-containment?
- Throws:
ModelManipulationException
-
setInternal
protected void setInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value) throws ModelManipulationException
- Throws:
ModelManipulationException
-
remove
public void remove(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object element) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsRemoves 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:
removein interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
remove
public void remove(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int index) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsRemoves 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:
removein interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
remove
public void remove(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsRemoves 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:
removein interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
removeAllOfInternal
protected void removeAllOfInternal(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature) throws ModelManipulationException
- Throws:
ModelManipulationException
-
remove
public void remove(ModelObject object) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsRemoves an object from the model, along with all contained objects, and any incoming or outgoing references.- Specified by:
removein interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
moveTo
public void moveTo(ModelObject what, java.lang.Void newContainer) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsMoves an existing element into the root of the selected root container.- Specified by:
moveToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
moveTo
public void moveTo(ModelObject what, java.lang.Void newContainer, int index) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsMoves an existing element into the root of the selected root container at the specified index.- Specified by:
moveToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
moveTo
public void moveTo(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsMoves an existing element into the selected containment reference of the selected model object.- Specified by:
moveToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
moveInternal
protected void moveInternal(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
- Throws:
ModelManipulationException
-
moveTo
public void moveTo(ModelObject what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference, int index) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsMoves an existing element into the selected containment reference of the selected model object at the specified index.- Specified by:
moveToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
moveAllTo
public void moveAllTo(java.util.Collection<ModelObject> what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsMoves a collection of existing elements into the selected containment reference of the selected model object.- Specified by:
moveAllToin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
moveAllInternal
protected void moveAllInternal(java.util.Collection<ModelObject> what, ModelObject newContainer, org.eclipse.emf.ecore.EReference reference) throws ModelManipulationException
- Throws:
ModelManipulationException
-
changeIndex
public void changeIndex(ModelObject container, org.eclipse.emf.ecore.EStructuralFeature feature, int oldIndex, int newIndex) throws ModelManipulationException
Description copied from interface:IEcoreManipulationsChanges the position of an existing element in the selected feature of the selected model object.- Specified by:
changeIndexin interfaceIEcoreManipulations<java.lang.Void,ModelObject>- Throws:
ModelManipulationException
-
-