public abstract class NotifiableIdEObjectCollectionImpl extends IdEObjectCollectionImpl implements NotifiableIdEObjectCollection
IdEObjectCollectionChangeObserver.org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterListMATERIALIZED_MODELELEMENTID_GENERATOR_EXTENSIONPOINT, MODELELEMENTID_GENERATOR_CLASS_ATTRIBUTE, MODELELEMENTID_GENERATOR_EXTENSIONPOINT| Constructor and Description |
|---|
NotifiableIdEObjectCollectionImpl(org.eclipse.emf.ecore.xmi.XMIResource xmiResource)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addCutElement(org.eclipse.emf.ecore.EObject eObject)
Add a new cut element.
|
void |
addIdEObjectCollectionChangeObserver(IdEObjectCollectionChangeObserver eObjectChangeObserver)
Adds an
IdEObjectCollectionChangeObserver to the collection. |
void |
collectionDeleted(IdEObjectCollection collection)
If the
IdEObjectCollection is deleted. |
<T extends IdEObjectCollection> |
copy()
Copies the current collection.
|
EObjectChangeNotifier |
getChangeNotifier()
Returns the change notifier attached to this collection.
|
void |
initMapping()
Initializes the ID caches of the collection, i.e.
|
void |
initMapping(Map<org.eclipse.emf.ecore.EObject,String> eObjectToIdMap,
Map<String,org.eclipse.emf.ecore.EObject> idToEObjectMap)
/**
Initializes the ID caches of the project with the given mappings.
|
void |
modelElementAdded(IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject eObject)
Called when the
eObject has been added to the collection. |
void |
modelElementRemoved(IdEObjectCollection projectImpl,
org.eclipse.emf.ecore.EObject modelElement)
Called when the
eObject and its siblings have been removed from
the collection. |
void |
notify(org.eclipse.emf.common.notify.Notification notification,
IdEObjectCollection project,
org.eclipse.emf.ecore.EObject modelElement)
A notification on a model element of the collection occurred.
|
void |
removeIdEObjectCollectionChangeObserver(IdEObjectCollectionChangeObserver projectChangeObserver)
Remove an
IdEObjectCollectionChangeObserver from the collection. |
void |
setUndetachable(IdEObjectCollectionChangeObserver observer)
Make a project change observer undetachable.
|
addModelElement, allocateModelElementIds, clearAllocatedCaches, clearAllocatedCaches, contains, contains, deleteModelElement, disallocateModelElementIds, dispose, get, getAllModelElements, getAllModelElementsByClass, getAllModelElementsByClass, getAllModelElementsByClass, getAllModelElementsByClass, getDeletedModelElement, getDeletedModelElementId, getEObjectToIdMapping, getIdToEObjectMapping, getModelElement, getModelElementId, getModelElements, getModelElementsByClass, removeModelElement, removeModelElementAndChildrenFromResourceeAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURIeAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eInvoke, eIsSet, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset, toStringeNotificationRequired, eNotifyequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddModelElement, allocateModelElementIds, clearAllocatedCaches, clearAllocatedCaches, contains, contains, deleteModelElement, disallocateModelElementIds, getAllModelElements, getEObjectToIdMapping, getIdToEObjectMapping, getModelElement, getModelElementId, getModelElements, getModelElementsByClasseAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnseteAdapters, eDeliver, eNotify, eSetDelivergetAllModelElementsByClass, getAllModelElementsByClassgetcreateAPI, toAPIpublic NotifiableIdEObjectCollectionImpl(org.eclipse.emf.ecore.xmi.XMIResource xmiResource)
throws IOException
XMIResource as model
elements to the collection. If the XMIResource also has XMI IDs
assigned to the EObjects it contains, they will be used for
creating the model element IDs within the project, if not, the model element IDs will get created on
the fly.
An EObjectChangeNotifier is also attached to the given XMIResource.xmiResource - a XMIResourceIOException - if the given XMIResource could not be loadedpublic void modelElementAdded(IdEObjectCollection collection, org.eclipse.emf.ecore.EObject eObject)
eObject has been added to the collection.modelElementAdded in interface IdEObjectCollectionChangeObservercollection - the IdEObjectCollection to which the eObject was addedeObject - the EObject that has been added to the collectionIdEObjectCollectionChangeObserver.modelElementAdded(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection,
org.eclipse.emf.ecore.EObject)public abstract void addCutElement(org.eclipse.emf.ecore.EObject eObject)
eObject - The new cut element.public void initMapping()
IdEObjectCollectionImplIdEObjectCollection.getModelElements() and for each model
element the ModelElementId is fetched via IdEObjectCollection.getModelElementId(EObject). Then a
mapping
between the model element and its ModelElementId is created
within the cache.initMapping in interface IdEObjectCollectioninitMapping in class IdEObjectCollectionImplIdEObjectCollection.initMapping()public void initMapping(Map<org.eclipse.emf.ecore.EObject,String> eObjectToIdMap, Map<String,org.eclipse.emf.ecore.EObject> idToEObjectMap)
initMapping in interface IdEObjectCollectioninitMapping in class IdEObjectCollectionImpleObjectToIdMap - a mapping from EObjects to IDsidToEObjectMap - the reverse mapping of eObjectToIdMapIdEObjectCollectionImpl.initMapping(java.util.Map,
java.util.Map)public void notify(org.eclipse.emf.common.notify.Notification notification,
IdEObjectCollection project,
org.eclipse.emf.ecore.EObject modelElement)
Notification documentation for details on the notifications.
This method will be called even if the given notification results from an add
or remove of a model element of the project.notify in interface IdEObjectCollectionChangeObservernotification - the notificationproject - the collection holding the modelElementmodelElement - the model element the notification originates fromIdEObjectCollectionChangeObserver.notify(org.eclipse.emf.common.notify.Notification,
org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection, org.eclipse.emf.ecore.EObject)public void addIdEObjectCollectionChangeObserver(IdEObjectCollectionChangeObserver eObjectChangeObserver)
IdEObjectCollectionChangeObserver to the collection.addIdEObjectCollectionChangeObserver in interface NotifiableIdEObjectCollectioneObjectChangeObserver - a change observer to be addedNotifiableIdEObjectCollection.addIdEObjectCollectionChangeObserver(org.eclipse.emf.emfstore.internal.common.model.util.IdEObjectCollectionChangeObserver)public void removeIdEObjectCollectionChangeObserver(IdEObjectCollectionChangeObserver projectChangeObserver)
IdEObjectCollectionChangeObserver from the collection.removeIdEObjectCollectionChangeObserver in interface NotifiableIdEObjectCollectionprojectChangeObserver - a change observer to be removedNotifiableIdEObjectCollection.removeIdEObjectCollectionChangeObserver(org.eclipse.emf.emfstore.internal.common.model.util.IdEObjectCollectionChangeObserver)public void setUndetachable(IdEObjectCollectionChangeObserver observer)
observer - the observerpublic void modelElementRemoved(IdEObjectCollection projectImpl, org.eclipse.emf.ecore.EObject modelElement)
eObject and its siblings have been removed from
the collection.
NOTE: Note that you will NOT receive a separate notification for each
sibling.modelElementRemoved in interface IdEObjectCollectionChangeObserverprojectImpl - the IdEObjectCollection to which the eObject was addedmodelElement - the EObject that has been added to the collectionIdEObjectCollectionChangeObserver.modelElementRemoved(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection,
org.eclipse.emf.ecore.EObject)public <T extends IdEObjectCollection> T copy()
copy in class IdEObjectCollectionImplT - the actual collection type to be copiedpublic void collectionDeleted(IdEObjectCollection collection)
IdEObjectCollection is deleted.collectionDeleted in interface IdEObjectCollectionChangeObservercollection - the IdEObjectCollection that has been deletedIdEObjectCollectionChangeObserver.collectionDeleted(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection)public EObjectChangeNotifier getChangeNotifier()
getChangeNotifier in interface NotifiableIdEObjectCollectionEObjectChangeNotifierNotifiableIdEObjectCollection.getChangeNotifier()Copyright © 2017. All rights reserved.