Commit 80079bf5 authored by Simon Barner's avatar Simon Barner
Browse files

Use only single call of EcoreUtil.Copier.copyReferences()



- Do not call for each EObject that is EcoreUtil.Copier.copy()ed
- But only once per copy-and-paste operation

Issue-Ref: 2845
Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent c4f501d1
ActionUtils.java 4553e487264e3d1f86f4767da4a7400cce4b9a5d GREEN
ConstraintsUIUtils.java 69d5e08bbf768baf2790380e36f1020ef826a33e GREEN
CopyPasteUtils.java 445f585fe70e79f63c47f278d27cac48253571a8 YELLOW
CopyPasteUtils.java 66ff2c44bef3bfecc85a6d3109c6b15a8960fa38 YELLOW
DataBindingUtils.java 0818014c193a22d5968435e78590368b95138d5e GREEN
DragAndDropUtils.java 7aab91518aa12d76533a345bf6ed0be9ac7ff0e5 GREEN
EObjectSelectionUtils.java 928280b5dd3bb634debc1ac3be9f15b4e45f2683 GREEN
......
......@@ -74,9 +74,9 @@ public class CopyPasteUtils {
((IConstrained)subObj).getConstraintInstances().clear();
}
}
copier.copyReferences();
i++;
}
copier.copyReferences();
EList<ISpeciallyCopyiable> specialSel =
pickInstanceOf(ISpeciallyCopyiable.class, new BasicEList<EObject>(sel));
for(ISpeciallyCopyiable obj : specialSel) {
......@@ -132,11 +132,12 @@ public class CopyPasteUtils {
for(EObject obj : getClipBoardContent()) {
EObject copy = copier.copy(obj);
adaptCopyNames(copy, target);
copier.copyReferences();
IElementCompositorService.getInstance().compose(target, copy,
new PasteContext(getEditedEObject(), copier));
copiedObjects.add(copy);
}
copier.copyReferences();
for(EObject obj : getClipBoardContent()) {
if(obj instanceof ISpeciallyCopyiable) {
((ISpeciallyCopyiable)obj).specialCopyHook(copier);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment