Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Fasani2018-09-28 14:11:30 +0000
committerLaurent Fasani2018-09-28 14:19:00 +0000
commit6f6299c9fa4754cd5f4ef90bbf515b84a61e6d81 (patch)
tree582c5bcb945432535c82a62b2868748f03874770
parent91d54ede1cc3f7ccf5e8c55b34a1677eabd978e5 (diff)
downloadorg.eclipse.sirius-6f6299c9fa4754cd5f4ef90bbf515b84a61e6d81.tar.gz
org.eclipse.sirius-6f6299c9fa4754cd5f4ef90bbf515b84a61e6d81.tar.xz
org.eclipse.sirius-6f6299c9fa4754cd5f4ef90bbf515b84a61e6d81.zip
[525261] Do not duplicate uid during copy/paste
* Use SiriusCopier instead of EMF's to not duplicate the uid. Bug 525261 Change-Id: I374603be4de74ad91e2d5d9d12ea56c71116bdea Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/clipboard/SiriusClipboardManager.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/clipboard/SiriusClipboardManager.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/clipboard/SiriusClipboardManager.java
index f24e50a899..b071b9dac0 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/clipboard/SiriusClipboardManager.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/clipboard/SiriusClipboardManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 THALES GLOBAL SERVICES.
+ * Copyright (c) 2011, 2018 THALES GLOBAL SERVICES.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,16 +19,15 @@ import org.eclipse.emf.ecore.EModelElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.sirius.common.tools.api.util.SiriusCopier;
import org.eclipse.sirius.viewpoint.description.Group;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
/**
- * This class allows Sirius to handle copy/paste operations between several
- * session/editing domains.
+ * This class allows Sirius to handle copy/paste operations between several session/editing domains.
*
* @author mporhel
*
@@ -55,8 +54,7 @@ public final class SiriusClipboardManager {
}
/**
- * Remove all references to resources which do not belongs to the given
- * domain semantic resources.
+ * Remove all references to resources which do not belongs to the given domain semantic resources.
*
* @param targetedDomain
*
@@ -134,7 +132,7 @@ public final class SiriusClipboardManager {
private Collection<Object> getCopyOfClipboard() {
if (clipboard != null && !clipboard.isEmpty()) {
- return EcoreUtil.copyAll(clipboard);
+ return SiriusCopier.Helper.copyAll(clipboard);
}
return null;
}
@@ -142,8 +140,8 @@ public final class SiriusClipboardManager {
/**
* Fill the targeted domain clipboard.
*
- * If targeted domain and clipboard source domain are different, references
- * to EObjects which do not belongs to the targeted domain will be removed.
+ * If targeted domain and clipboard source domain are different, references to EObjects which do not belongs to the
+ * targeted domain will be removed.
*
* Except for references to VSM descriptions.
*
@@ -161,8 +159,7 @@ public final class SiriusClipboardManager {
}
/**
- * Fill the viewpoint clipboard from the source domain clipboard, and clear
- * it.
+ * Fill the viewpoint clipboard from the source domain clipboard, and clear it.
*
* @param domain
* the source domain.

Back to the top