public abstract class DeltaImpl extends org.eclipse.emf.ecore.impl.EObjectImpl implements Delta
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList
Modifier and Type | Field and Description |
---|---|
protected Resolution |
appliedResolution |
protected org.eclipse.emf.ecore.resource.Resource |
base |
protected java.util.Set<CompositeDelta> |
composites |
protected java.util.Set<Conflict> |
conflicts |
protected org.eclipse.emf.ecore.resource.Resource |
contributor |
protected java.util.Map<java.lang.String,java.lang.Object> |
customProperties |
protected java.util.Set<Delta> |
dependents |
protected java.util.Set<Delta> |
prerequisites |
protected java.beans.PropertyChangeSupport |
propertyChangeSupport |
protected boolean |
systemDelta |
protected DeltaType |
type |
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET
RESOLUTION_PROPERTY
Modifier | Constructor and Description |
---|---|
protected |
DeltaImpl() |
|
DeltaImpl(DeltaType type,
org.eclipse.emf.ecore.resource.Resource base,
org.eclipse.emf.ecore.resource.Resource contributor) |
Modifier and Type | Method and Description |
---|---|
void |
addComposite(CompositeDelta compositeDelta)
Add another Delta as the container.
|
void |
addConflict(Conflict conflict)
Adds a conflict.
|
void |
addDependent(Delta delta)
adds a delta to the dependant list
|
void |
addPrerequisite(Delta delta)
adds a delta to the pre requisite list
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener that can register interest in a delta's
RESOLVED_PROPERTY . |
boolean |
canAutoResolve()
Returns whether or not this is delta is the target of any of its
automatically resolvable conflcits.
|
boolean |
canResolve(Resolution newResolution)
Returns whether or not this delta can be resolved with the new
resolution.
|
boolean |
canUnresolve()
Returns whether or not this delta can be unresolved.
|
void |
collectAtomicDeltaSet(Resolution resolution,
boolean includeRequiredDeltas,
java.util.Set atomicDeltaSet)
Collects all deltas, in the same contributor, required to resolve this
delta with the given resolution, with the option of including required
deltas or not.
|
void |
collectResolutionSet(Resolution resolution,
java.util.Set atomicResolutionSet,
java.util.Set visitedConflicts,
boolean includeRequiredDeltas)
Recursively collects the atomic resolution set for this delta and a given
resolution, being certain to only consider conflicts once.
|
void |
deleteConflict(Conflict conflict)
Deletes a conflict.
|
void |
deleteDependent(Delta delta)
delete a delta from the dependant list
|
void |
deletePrerequisite(Delta delta)
delete a delta from the prerequisite list
|
java.lang.Object |
eGet(int featureID,
boolean resolve,
boolean coreType) |
org.eclipse.emf.common.notify.NotificationChain |
eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd,
int featureID,
org.eclipse.emf.common.notify.NotificationChain msgs) |
org.eclipse.emf.common.notify.NotificationChain |
eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
int featureID,
org.eclipse.emf.common.notify.NotificationChain msgs) |
boolean |
eIsSet(int featureID) |
void |
eSet(int featureID,
java.lang.Object newValue) |
protected org.eclipse.emf.ecore.EClass |
eStaticClass() |
void |
eUnset(int featureID) |
java.lang.Object |
getAdapter(java.lang.Class adapter) |
abstract java.lang.Object |
getAffectedObject()
Returns the object that has been affected.
|
abstract java.lang.String |
getAffectedObjectMatchingId()
Returns the matching ID of the object that has been affected if the
feature of the location is a containment reference, otherwise null.
|
Resolution |
getAppliedResolution() |
java.util.Set |
getAtomicComposites()
Returns a set of all top containing atomics.
|
java.util.Set |
getAtomicDeltaSet(Resolution resolution,
boolean includeRequiredDeltas)
Returns a set of all deltas in the same contributor that must be
atomically resolved.
|
protected java.util.Set |
getAtomicDeltaSet(Resolution resolution,
boolean includeRequiredDeltas,
java.util.Set atomicDeltaSet)
Returns a set of all deltas in the same contributor that must be
atomically resolved.
|
org.eclipse.emf.ecore.resource.Resource |
getBase()
Returns the base resource this delta was generated on.
|
java.util.Set |
getComposites()
Returns the composites referencing this delta.
|
java.util.Set |
getConflicts()
Returns the set of conflicts this delta is involved in.
|
org.eclipse.emf.ecore.resource.Resource |
getContributor()
Returns the contributor resource this delta was generated on.
|
java.lang.Object |
getCustomProperty(java.lang.String key)
Return custom property value
|
java.util.Set |
getDependents()
Returns a set of dependent
Delta s for this delta. |
void |
getDependentsRecursively(java.util.Set visitedDependents)
Returns a set of dependent
Delta s for this delta. |
abstract Location |
getDestinationLocation()
Returns the destination location of the delta.
|
boolean |
getDestinationNewSetState()
Returns the new destination set state.
|
boolean |
getDestinationOldSetState()
Returns the old destination set state.
|
Delta |
getEquivalentDelta()
Return equivalent delta in opposite contributor when conflict is suppressed
|
abstract java.lang.String |
getId()
Returns a unique ID for this delta.
|
java.util.Set |
getPrerequisites()
Returns a set of prerequisite
Delta s for this delta. |
void |
getPrerequisitesRecursively(java.util.Set visitedPrerequisites)
Returns a set of prerequisite
Delta s for this delta. |
void |
getRequiredDeltasRecursively(Resolution resolution,
java.util.Set visitedDeltas) |
Resolution |
getResolution()
Returns the current resolution of the delta.
|
java.util.Set |
getResolutionSet(Resolution resolution,
boolean includeRequiredDeltas)
Returns all deltas, in all contributors, required to resolve this delta
with the given resolution.
|
abstract Location |
getSourceLocation()
Returns the source location of the delta.
|
boolean |
getSourceNewSetState()
Returns the new source set state.
|
boolean |
getSourceOldSetState()
Returns the old source set state.
|
DeltaType |
getType()
Returns the type.
|
boolean |
hasUnresolvedConflicts()
Returns whether or not any of this delta's conflicts are unresolved.
|
boolean |
isAccepted()
Returns whether or not this delta is accepted.
|
boolean |
isConflicting()
Returns whether or not this delta is conflicting with another delta.
|
boolean |
isDestinationSetStateChanged()
Returns whether or not the destination feature changed set state.
|
boolean |
isInComposite() |
boolean |
isInConflictedAtomicContainer()
Returns whether or not any container delta is atomic and conflicting.
|
boolean |
isRejected()
Returns whether or not this delta is rejected.
|
boolean |
isResolved()
Returns whether or not this delta is resolved.
|
boolean |
isSourceSetStateChanged()
Returns whether or not the source feature changed set state.
|
boolean |
isSystemDelta()
Returns whether or not this delta is a system delta.
|
void |
print(java.io.PrintStream out)
Prints a text representation to a stream.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a listener.
|
void |
resolve(Resolution newResolution)
Applies the new resolution with this delta.
|
void |
setAppliedResolution(Resolution newResolution) |
void |
setCustomProperty(java.lang.String key,
java.lang.Object value)
Setting custom property.
|
void |
setEquivalentDelta(Delta delta)
Set equivalent delta in opposite contributor when conflict is suppressed
|
void |
setSystemDelta(boolean systemDelta)
Sets whether or not this delta is a system delta.
|
java.lang.String |
toString() |
abstract void |
toStringImpl(java.lang.StringBuilder sb)
Appends an String representation to the string buffer.
|
void |
unresolve()
Unapplies the current resolution with this delta.
|
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isSameDelta
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
protected DeltaType type
protected boolean systemDelta
protected org.eclipse.emf.ecore.resource.Resource base
protected org.eclipse.emf.ecore.resource.Resource contributor
protected Resolution appliedResolution
protected java.util.Set<Conflict> conflicts
protected java.util.Set<CompositeDelta> composites
protected java.util.Set<Delta> prerequisites
protected java.util.Set<Delta> dependents
protected java.beans.PropertyChangeSupport propertyChangeSupport
protected java.util.Map<java.lang.String,java.lang.Object> customProperties
protected DeltaImpl()
public DeltaImpl(DeltaType type, org.eclipse.emf.ecore.resource.Resource base, org.eclipse.emf.ecore.resource.Resource contributor)
protected org.eclipse.emf.ecore.EClass eStaticClass()
eStaticClass
in class org.eclipse.emf.ecore.impl.EObjectImpl
public Resolution getAppliedResolution()
getAppliedResolution
in interface Delta
public void setAppliedResolution(Resolution newResolution)
setAppliedResolution
in interface Delta
public void setSystemDelta(boolean systemDelta)
Delta
setSystemDelta
in interface Delta
systemDelta
- booleanpublic boolean isSystemDelta()
Delta
isSystemDelta
in interface Delta
public org.eclipse.emf.ecore.resource.Resource getBase()
Delta
public org.eclipse.emf.ecore.resource.Resource getContributor()
Delta
getContributor
in interface Delta
public abstract Location getSourceLocation()
Delta
getSourceLocation
in interface Delta
public abstract Location getDestinationLocation()
Delta
getDestinationLocation
in interface Delta
public abstract java.lang.Object getAffectedObject()
Delta
getAffectedObject
in interface Delta
public abstract java.lang.String getAffectedObjectMatchingId()
Delta
getAffectedObjectMatchingId
in interface Delta
public boolean isResolved()
Delta
isResolved
in interface Delta
public boolean isAccepted()
Delta
isAccepted
in interface Delta
public boolean isRejected()
Delta
isRejected
in interface Delta
public boolean isConflicting()
Delta
isConflicting
in interface Delta
public boolean isInConflictedAtomicContainer()
Delta
isInConflictedAtomicContainer
in interface Delta
public boolean isInComposite()
public abstract java.lang.String getId()
Delta
public void print(java.io.PrintStream out)
Printable
public java.util.Set getConflicts()
Delta
getConflicts
in interface Delta
public org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
eInverseAdd
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
eInverseRemove
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
eGet
in interface org.eclipse.emf.ecore.InternalEObject
eGet
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public void eSet(int featureID, java.lang.Object newValue)
eSet
in interface org.eclipse.emf.ecore.InternalEObject
eSet
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public void eUnset(int featureID)
eUnset
in interface org.eclipse.emf.ecore.InternalEObject
eUnset
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public boolean eIsSet(int featureID)
eIsSet
in interface org.eclipse.emf.ecore.InternalEObject
eIsSet
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public boolean hasUnresolvedConflicts()
Delta
hasUnresolvedConflicts
in interface Delta
public void addConflict(Conflict conflict)
Delta
addConflict
in interface Delta
conflict
- a conflictpublic void deleteConflict(Conflict conflict)
Delta
deleteConflict
in interface Delta
conflict
- a conflictpublic Resolution getResolution()
Delta
getResolution
in interface Delta
public boolean canResolve(Resolution newResolution)
Delta
canResolve
in interface Delta
newResolution
- the resolutionpublic boolean canAutoResolve()
Delta
canAutoResolve
in interface Delta
public void resolve(Resolution newResolution)
Delta
public boolean canUnresolve()
Delta
canUnresolve
in interface Delta
public void unresolve()
Delta
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Delta
RESOLVED_PROPERTY
.addPropertyChangeListener
in interface Delta
listener
- a property change listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Delta
removePropertyChangeListener
in interface Delta
listener
- a property change listenerpublic void addComposite(CompositeDelta compositeDelta)
Delta
addComposite
in interface Delta
compositeDelta
- the container deltapublic java.lang.String toString()
toString
in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public abstract void toStringImpl(java.lang.StringBuilder sb)
Delta
toStringImpl
in interface Delta
sb
- the string buffer to append topublic void getRequiredDeltasRecursively(Resolution resolution, java.util.Set visitedDeltas)
public void getPrerequisitesRecursively(java.util.Set visitedPrerequisites)
Delta
Delta
s for this delta.
Prerequisite deltas must be accepted before this delta can be accepted.getPrerequisitesRecursively
in interface Delta
public void getDependentsRecursively(java.util.Set visitedDependents)
Delta
Delta
s for this delta.
Dependent deltas must be rejected before this delta can be rejected.getDependentsRecursively
in interface Delta
public java.util.Set getResolutionSet(Resolution resolution, boolean includeRequiredDeltas)
Delta
getResolutionSet
in interface Delta
resolution
- a resolutionincludeRequiredDeltas
- if true, include required deltas, otherwise don'tpublic java.util.Set getAtomicDeltaSet(Resolution resolution, boolean includeRequiredDeltas)
getAtomicDeltaSet
in interface Delta
resolution
- a resolutionincludeRequiredDeltas
- if true, include required deltas, otherwise don'tprotected java.util.Set getAtomicDeltaSet(Resolution resolution, boolean includeRequiredDeltas, java.util.Set atomicDeltaSet)
public void collectAtomicDeltaSet(Resolution resolution, boolean includeRequiredDeltas, java.util.Set atomicDeltaSet)
Delta
collectAtomicDeltaSet
in interface Delta
resolution
- a resolutionincludeRequiredDeltas
- if true, include required deltas, otherwise don'tatomicDeltaSet
- set atomic delta setpublic java.util.Set getAtomicComposites()
Delta
getAtomicComposites
in interface Delta
public java.util.Set getComposites()
Delta
getComposites
in interface Delta
public java.lang.Object getAdapter(java.lang.Class adapter)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
public java.util.Set getDependents()
Delta
Delta
s for this delta.
Dependent deltas must be rejected before this delta can be rejected.getDependents
in interface Delta
Set
of Delta
spublic java.util.Set getPrerequisites()
Delta
Delta
s for this delta.
Prerequisite deltas must be accepted before this delta can be accepted.getPrerequisites
in interface Delta
Set
of Delta
spublic void addPrerequisite(Delta delta)
Delta
addPrerequisite
in interface Delta
public void addDependent(Delta delta)
Delta
addDependent
in interface Delta
public void deletePrerequisite(Delta delta)
Delta
deletePrerequisite
in interface Delta
public void deleteDependent(Delta delta)
Delta
deleteDependent
in interface Delta
public boolean getDestinationNewSetState()
Delta
getDestinationNewSetState
in interface Delta
public boolean getDestinationOldSetState()
Delta
getDestinationOldSetState
in interface Delta
public boolean getSourceNewSetState()
Delta
getSourceNewSetState
in interface Delta
public boolean getSourceOldSetState()
Delta
getSourceOldSetState
in interface Delta
public boolean isDestinationSetStateChanged()
Delta
isDestinationSetStateChanged
in interface Delta
public boolean isSourceSetStateChanged()
Delta
isSourceSetStateChanged
in interface Delta
public void collectResolutionSet(Resolution resolution, java.util.Set atomicResolutionSet, java.util.Set visitedConflicts, boolean includeRequiredDeltas)
collectResolutionSet
in interface Delta
resolution
- resolution consideredatomicResolutionSet
- collected delta resolution setvisitedConflicts
- set of conflicts already visitedincludeRequiredDeltas
- if true, includes all required deltas, otherwise ignores thempublic void setCustomProperty(java.lang.String key, java.lang.Object value)
Delta
setCustomProperty
in interface Delta
public java.lang.Object getCustomProperty(java.lang.String key)
Delta
getCustomProperty
in interface Delta
public void setEquivalentDelta(Delta delta)
Delta
setEquivalentDelta
in interface Delta
public Delta getEquivalentDelta()
Delta
getEquivalentDelta
in interface Delta