|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.emf.emfstore.internal.common.model.impl.IdEObjectCollectionImpl
org.eclipse.emf.emfstore.internal.common.model.impl.NotifiableIdEObjectCollectionImpl
public abstract class NotifiableIdEObjectCollectionImpl
A collection that is able of maintaining a list of IdEObjectCollectionChangeObserver.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
|---|
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList |
| Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
org.eclipse.emf.ecore.InternalEObject.EStore |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.emf.emfstore.internal.common.model.impl.IdEObjectCollectionImpl |
|---|
MODELELEMENTID_GENERATOR_CLASS_ATTRIBUTE, MODELELEMENTID_GENERATOR_EXTENSIONPOINT |
| Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
|---|
ELAST_EOBJECT_FLAG |
| Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
EOPPOSITE_FEATURE_BASE |
| Constructor Summary | |
|---|---|
NotifiableIdEObjectCollectionImpl(org.eclipse.emf.ecore.xmi.XMIResource xmiResource)
Constructor. |
|
| Method Summary | ||
|---|---|---|
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. |
|
|
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. |
|
| Methods inherited from class org.eclipse.emf.emfstore.internal.common.model.impl.IdEObjectCollectionImpl |
|---|
addModelElement, allocateModelElementIds, clearAllocatedCaches, contains, contains, deleteModelElement, disallocateModelElementIds, dispose, get, getAllModelElements, getAllModelElementsByClass, getAllModelElementsByClass, getAllModelElementsByClass, getAllModelElementsByClass, getDeletedModelElement, getDeletedModelElementId, getEObjectId, getEObjectToIdMapping, getIdToEObjectMapping, getModelElement, getModelElementId, getModelElements, getModelElementsByClass, removeModelElement, removeModelElementAndChildrenFromResource |
| Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
|---|
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI |
| Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
|---|
eAllContents, 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, toString |
| Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
|---|
eNotificationRequired, eNotify |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection |
|---|
addModelElement, allocateModelElementIds, clearAllocatedCaches, contains, contains, deleteModelElement, disallocateModelElementIds, getAllModelElements, getEObjectToIdMapping, getIdToEObjectMapping, getModelElement, getModelElementId, getModelElements, getModelElementsByClass |
| Methods inherited from interface org.eclipse.emf.ecore.EObject |
|---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset |
| Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
|---|
eAdapters, eDeliver, eNotify, eSetDeliver |
| Methods inherited from interface org.eclipse.emf.emfstore.common.model.ESObjectContainer |
|---|
getAllModelElementsByClass, getAllModelElementsByClass |
| Methods inherited from interface org.eclipse.emf.emfstore.common.model.ESIdToEObjectMapping |
|---|
get |
| Methods inherited from interface org.eclipse.emf.emfstore.internal.common.api.APIDelegate |
|---|
createAPI, toAPI |
| Methods inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
eNotificationRequired |
| Constructor Detail |
|---|
public 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 XMIResource
IOException - if the given XMIResource could not be loaded| Method Detail |
|---|
public 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 observer
public 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 copied
public 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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||