|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>
org.eclipse.emf.ecore.util.EcoreUtil.Copier
org.eclipse.emf.compare.diff.merge.EMFCompareEObjectCopier
public class EMFCompareEObjectCopier
Defines here a new copier to alter the way references are copied when an EObject is. References corresponding to unmatched object need specific handling.
This map's content should be cleared when all differences of diffModel
are merged.
Field Summary |
---|
Fields inherited from class org.eclipse.emf.ecore.util.EcoreUtil.Copier |
---|
resolveProxies, useOriginalReferences |
Constructor Summary | |
---|---|
EMFCompareEObjectCopier(DiffModel diff)
Creates a Copier given the DiffModel it will be used for. |
Method Summary | |
---|---|
protected void |
copyReference(org.eclipse.emf.ecore.EReference eReference,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EObject copyEObject)
|
void |
copyReferences()
|
org.eclipse.emf.ecore.EObject |
copyReferenceValue(org.eclipse.emf.ecore.EReference targetReference,
org.eclipse.emf.ecore.EObject target,
org.eclipse.emf.ecore.EObject value)
This will copy the given value to the reference targetReference of target. |
org.eclipse.emf.ecore.EObject |
copyReferenceValue(org.eclipse.emf.ecore.EReference targetReference,
org.eclipse.emf.ecore.EObject target,
org.eclipse.emf.ecore.EObject value,
org.eclipse.emf.ecore.EObject matchedValue)
This will copy the given value to the reference targetReference of target. |
org.eclipse.emf.ecore.EObject |
copyReferenceValue(org.eclipse.emf.ecore.EReference targetReference,
org.eclipse.emf.ecore.EObject target,
org.eclipse.emf.ecore.EObject value,
org.eclipse.emf.ecore.EObject matchedValue,
int index)
This will copy the given value to the reference targetReference of target. |
void |
copyXMIIDs()
Ensures the original and copied objects all share the same XMI ID. |
DiffModel |
getDiffModel()
Returns the DiffModel associated to this copier. |
Methods inherited from class org.eclipse.emf.ecore.util.EcoreUtil.Copier |
---|
copy, copyAll, copyAttribute, copyContainment, copyProxyURI, createCopy, getTarget, getTarget |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public EMFCompareEObjectCopier(DiffModel diff)
diff
- The DiffModel Which elements will be merged using this copier.Method Detail |
---|
public void copyReferences()
copyReferences
in class org.eclipse.emf.ecore.util.EcoreUtil.Copier
EcoreUtil.Copier.copyReferences()
public org.eclipse.emf.ecore.EObject copyReferenceValue(org.eclipse.emf.ecore.EReference targetReference, org.eclipse.emf.ecore.EObject target, org.eclipse.emf.ecore.EObject value)
targetReference
- The reference to add a value to.target
- The object to copy to.value
- The value that is to be copied.
public org.eclipse.emf.ecore.EObject copyReferenceValue(org.eclipse.emf.ecore.EReference targetReference, org.eclipse.emf.ecore.EObject target, org.eclipse.emf.ecore.EObject value, org.eclipse.emf.ecore.EObject matchedValue, int index)
targetReference
- The reference to add a value to.target
- The object to copy to.value
- The value that is to be copied.matchedValue
- Matched value of value if it is known. Will behave like
copyReferenceValue(EReference, EObject, EObject)
if null
.index
- an optional index in case the target is a List (-1 is a good default, the value will be
appended to the list)
public org.eclipse.emf.ecore.EObject copyReferenceValue(org.eclipse.emf.ecore.EReference targetReference, org.eclipse.emf.ecore.EObject target, org.eclipse.emf.ecore.EObject value, org.eclipse.emf.ecore.EObject matchedValue)
targetReference
- The reference to add a value to.target
- The object to copy to.value
- The value that is to be copied.matchedValue
- Matched value of value if it is known. Will behave like
copyReferenceValue(EReference, EObject, EObject)
if null
.
public void copyXMIIDs()
public DiffModel getDiffModel()
protected void copyReference(org.eclipse.emf.ecore.EReference eReference, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyEObject)
copyReference
in class org.eclipse.emf.ecore.util.EcoreUtil.Copier
EcoreUtil.Copier.copyReference(org.eclipse.emf.ecore.EReference,
org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |