From 2f0cd462efa173919740c9b220ae1d40538a8ac3 Mon Sep 17 00:00:00 2001
From: rschnekenbu
Date: Thu, 24 May 2012 16:54:42 +0000
Subject: 374636: [SYSML][Model Explorer] Copy / paste of a part does not
create the corresponding association
https://bugs.eclipse.org/bugs/show_bug.cgi?id=374636
---
.../model/ModelWithBDD.di | 6 +
.../model/ModelWithBDD.notation | 586 +++++++++++----------
.../model/ModelWithBDD.uml | 10 +
.../model/SysMLModelExplorerCopyPasteTestModel.di | 6 +
.../SysMLModelExplorerCopyPasteTestModel.notation | 54 ++
.../model/SysMLModelExplorerCopyPasteTestModel.uml | 41 +-
.../copypaste/AbstractCopyPasteBlockTest.java | 69 +--
.../copypaste/AbstractCopyPasteReferenceTest.java | 70 +++
.../tests/copypaste/AbstractCopyPasteTest.java | 6 +-
.../copypaste/CopyPasteSimpleReferenceTest.java | 137 +++++
.../tests/suites/AllCopyPasteTests.java | 6 +-
11 files changed, 638 insertions(+), 353 deletions(-)
create mode 100644 tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteReferenceTest.java
create mode 100644 tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleReferenceTest.java
(limited to 'tests')
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.di b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.di
index 3b41d552d1e..49f96c92a31 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.di
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.di
@@ -4,6 +4,9 @@
+
+
+
@@ -11,6 +14,9 @@
+
+
+
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.notation b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.notation
index 7a409986aa4..4bd308bc881 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.notation
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.notation
@@ -1,291 +1,319 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.uml b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.uml
index 66c3b3cfd98..3d1e2bd1862 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.uml
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.uml
@@ -10,6 +10,10 @@
+
+
+
+
@@ -49,6 +53,12 @@
+
+
+
+
+
+
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.di b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.di
index 4dad1416737..86d19ca6083 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.di
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.di
@@ -10,6 +10,9 @@
+
+
+
@@ -23,6 +26,9 @@
+
+
+
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.notation b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.notation
index b15584e1a7e..81df318b390 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.notation
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.notation
@@ -63,6 +63,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -197,4 +215,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
index 58de843122d..9096891dc4a 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
@@ -7,6 +7,9 @@
+
+
+
@@ -32,35 +35,7 @@
-
+
@@ -71,4 +46,12 @@
+
+
+
+
+
+
+
+
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteBlockTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteBlockTest.java
index 2028a57fa18..f542dd48ec3 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteBlockTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteBlockTest.java
@@ -18,11 +18,20 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.core.utils.FilteredCollectionView;
import org.eclipse.papyrus.core.utils.IFilter;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
/**
@@ -31,55 +40,31 @@ import org.junit.Assert;
public abstract class AbstractCopyPasteBlockTest extends AbstractCopyPasteTest {
/**
- * {@inheritDoc}
- *
- * @generated
- */
+ * {@inheritDoc}
+ * @generated
+ */
@Override
protected void initializeTest(Map