public class BasicChangeRecorder extends ListDifferenceAnalyzer
Modifier and Type | Field and Description |
---|---|
protected ChangeDescription |
changeDescription |
protected boolean |
recording |
protected boolean |
recordingTransientFeatures |
Constructor and Description |
---|
BasicChangeRecorder() |
Modifier and Type | Method and Description |
---|---|
protected void |
consolidateChanges()
Consolidates the changes that have happen since the last consolidation.
|
protected ChangeDescription |
createChangeDescription() |
protected FeatureChange |
createFeatureChange(EObject eObject,
EStructuralFeature eStructuralFeature,
java.lang.Object value,
boolean isSet) |
protected ResourceChange |
createResourceChange(Resource resource,
EList<java.lang.Object> value) |
void |
dispose()
Disposes this change recorder.
|
protected void |
eliminateEmptyChanges()
Eliminates changes that result in a state that's equal to the current state.
|
ChangeDescription |
endRecording()
Ends the recording and consolidates the changes on the
change description . |
protected void |
finalizeChange(FeatureChange change,
EObject eObject) |
protected void |
finalizeChange(ResourceChange change) |
protected ChangeDescription |
getChangeDescription() |
protected FeatureChange |
getFeatureChange(java.util.List<FeatureChange> featureChanges,
EStructuralFeature eStructuralFeature) |
protected java.util.List<FeatureChange> |
getFeatureChanges(EObject eObject) |
protected ResourceChange |
getResourceChange(Resource resource) |
protected EList<ResourceChange> |
getResourceChanges() |
boolean |
isRecording() |
boolean |
isRecordingTransientFeatures() |
protected void |
setChangeDescription(ChangeDescription changeDescription) |
protected void |
setRecording(boolean recording) |
void |
setRecordingTransientFeatures(boolean recordingTransientFeatures) |
protected boolean |
shouldRecord(EStructuralFeature feature,
EObject eObject) |
ChangeDescription |
summarize()
Summarizes the changes made to the analyzed objects on the
change description
returned by the endRecording() without ending the recording. |
analyzeLists, analyzeLists, createAddListChange, createListChange, createListChanges, createMoveListChange, createRemoveListChange, equal
protected boolean recording
protected boolean recordingTransientFeatures
protected ChangeDescription changeDescription
public boolean isRecording()
protected void setRecording(boolean recording)
public boolean isRecordingTransientFeatures()
public void setRecordingTransientFeatures(boolean recordingTransientFeatures)
protected ChangeDescription getChangeDescription()
protected void setChangeDescription(ChangeDescription changeDescription)
public void dispose()
public ChangeDescription summarize()
Summarizes the changes made to the analyzed objects on the change description
returned by the endRecording()
without ending the recording.
This method doesn't do anything if this ChangeRecorder is not recording.
ChangeDescription
or null if there is nothing being recorded.public ChangeDescription endRecording()
change description
.ChangeDescription
or null if there is nothing being recorded.protected void consolidateChanges()
protected void eliminateEmptyChanges()
protected boolean shouldRecord(EStructuralFeature feature, EObject eObject)
protected void finalizeChange(ResourceChange change)
protected void finalizeChange(FeatureChange change, EObject eObject)
protected EList<ResourceChange> getResourceChanges()
protected ResourceChange getResourceChange(Resource resource)
protected java.util.List<FeatureChange> getFeatureChanges(EObject eObject)
protected FeatureChange getFeatureChange(java.util.List<FeatureChange> featureChanges, EStructuralFeature eStructuralFeature)
protected FeatureChange createFeatureChange(EObject eObject, EStructuralFeature eStructuralFeature, java.lang.Object value, boolean isSet)
protected ResourceChange createResourceChange(Resource resource, EList<java.lang.Object> value)
protected ChangeDescription createChangeDescription()