Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2017-03-03 10:15:43 +0000
committerBenoit Maggi2017-03-03 10:15:43 +0000
commit6adfa6c5368f18f28943db46486c892e276dd0cb (patch)
tree6c73a97228f120d16b33aa8482bc2a8058d20200
parent7a7d87b75c174e9a38a710aab101d74dd8456e14 (diff)
downloadorg.eclipse.papyrus-6adfa6c5368f18f28943db46486c892e276dd0cb.tar.gz
org.eclipse.papyrus-6adfa6c5368f18f28943db46486c892e276dd0cb.tar.xz
org.eclipse.papyrus-6adfa6c5368f18f28943db46486c892e276dd0cb.zip
Bug 512962 - [Refactoring] Move refactoring to incubation repository
- remove all code related to refactoring - the code has been transferred to org.eclipse.papyrus.incubation Change-Id: I30ae106f0c610f08d408f2eee4e33bf7cf4a8008 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/.classpath7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/.project28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/META-INF/MANIFEST.MF29
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/about.html28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/build.properties8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.html123
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.mediawiki134
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.html37
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.mediawiki38
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/example-model.pngbin2707 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/preview-page.pngbin74233 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/refactored-model.pngbin3381 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/validity-page.pngbin66415 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/wizard-refactoring.pngbin19522 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_dev_guide.xml6
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_user_guide.xml11
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/Papyrus_16x16.gifbin561 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/refactor.pngbin786 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.properties14
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.xml102
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/pom.xml50
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/Activator.java118
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/AbstractPapyrusTransformation.java126
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/IPreviewablePapyrusChange.java38
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusChange.java246
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoring.java255
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringCommand.java65
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringOperation.java87
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringValidationStatusContext.java46
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/UndoPapyrusChange.java110
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractAllModelTransformation.java45
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractChoiceOnUIParticipantsTransformation.java111
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractSelectedElementsTransformation.java46
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/Messages.java67
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/messages.properties37
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/AbstractTransformationOnElement.java72
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ITransformationOnElement.java34
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusCompositeChange.java247
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusRefactoringOnElementChange.java93
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ReplaceTransformationOnElement.java167
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringPreview.java194
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringWizard.java60
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusStatusContextViewer.java114
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/ReplaceRefactoring.java173
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/util/PapyrusRefactoringUtils.java296
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.classpath7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.project28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/META-INF/MANIFEST.MF38
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/about.html28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/build.properties8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/images/mutate.pngbin42166 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate-toc.xml6
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.html9
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.mediawiki11
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/icons/refactor.pngbin786 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.properties16
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.xml44
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/pom.xml50
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/Activator.java74
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/handler/MutationHandler.java37
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/helper/MutationTransformation.java559
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/Messages.java37
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/messages.properties7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElemenetTypeContentProvider.java75
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElementTypeLabelProvider.java72
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/ui/MutationRefactoring.java416
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ElementCreationUtils.java67
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ModelNotationUtils.java260
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.classpath7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.project28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/META-INF/MANIFEST.MF22
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/about.html28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/build.properties8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/refactor.pngbin786 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/transformationIcon.gifbin279 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.properties16
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.xml36
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/pom.xml16
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/Activator.java84
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/handler/SelectQVTTransformationHandler.java36
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/popup/actions/SelectQVTTransformation.java171
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.classpath7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF19
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/about.html28
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.pngbin36747 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml6
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html12
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki11
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.pngbin786 -> 0 bytes
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties16
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml44
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml50
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java67
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java38
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java38
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties8
-rw-r--r--extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java202
-rwxr-xr-xreleng/extra-tests/pom.xml2
-rw-r--r--releng/extra/pom.xml6
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath7
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project28
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF25
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html28
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties4
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch47
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties14
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml16
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation268
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml49
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation138
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml15
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation152
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml165
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di2
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation97
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml4
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java73
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java26
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java42
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties10
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java528
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java325
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java39
-rw-r--r--tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java39
134 files changed, 0 insertions, 8536 deletions
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.classpath b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.classpath
deleted file mode 100644
index eca7bdba8f0..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.project b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.project
deleted file mode 100644
index 97cbc8353d8..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.refactoring</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.settings/org.eclipse.jdt.core.prefs b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61dca8..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/META-INF/MANIFEST.MF b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/META-INF/MANIFEST.MF
deleted file mode 100644
index dded4cd6e33..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.refactoring;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.refactoring.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
- org.eclipse.core.runtime;bundle-version="3.12.0",
- org.eclipse.ltk.ui.refactoring;bundle-version="3.8.0",
- org.eclipse.ltk.core.refactoring;bundle-version="3.7.0",
- org.eclipse.papyrus.infra.core;bundle-version="2.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="2.0.0",
- org.eclipse.papyrus.uml.search.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="2.0.0",
- org.eclipse.papyrus.infra.services.validation;bundle-version="2.0.0",
- org.eclipse.team.ui;bundle-version="3.8.0",
- org.eclipse.compare;bundle-version="3.6.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0",
- org.eclipse.help;bundle-version="3.6.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: %vendorName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.papyrus.refactoring,
- org.eclipse.papyrus.refactoring.core,
- org.eclipse.papyrus.refactoring.helper,
- org.eclipse.papyrus.refactoring.refactoringOnElement,
- org.eclipse.papyrus.refactoring.ui,
- org.eclipse.papyrus.refactoring.util
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/about.html b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/build.properties b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/build.properties
deleted file mode 100644
index 69d0f2e3ef2..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- icons/,\
- about.html
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.html b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.html
deleted file mode 100644
index 5898c558c6d..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
-<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>
-<body>
- <h1 id="How_to_implement_your_own_Papyrus_refactoring">How to implement your own Papyrus refactoring</h1>
- <h2 id="Introduction">Introduction</h2>
- <p>The PRF (Papyrus Refactoring Framework) helps developers to create undoable and previewable Papyrus model refactorings. The PRF also warns the user if the transformation invalidates the model.</p>
- <p>In this page you will learn how to implement your own Papyrus transformation using the PRF.</p>
-
- <h2 id="Implementing_the_transformation">Implementing the transformation</h2>
- <p><b>Before beginning the implementation you need to add the dependencies:</b> <i>org.eclipse.papyrus.infra.refactoring</i>, <i>org.eclipse.papyrus.infra.core</i>,<i>org.eclipse.ltk.core.refactoring</i>, <i>org.eclipse.ltk.ui.refactoring</i>.</p>
- <p>Then you have to do is to implement a class which extends <i>AbstractPapyrusTransformation</i> (which is a <i>WizardPage</i>).</p>
- <p>In the constructor you have to indicate the human readable name of your transformation.</p><p>Then you need to implement the following methods:</p>
- <ul>
- <li><pre> public void createControl(Composite parent);</pre> In this method you have to implement the control which will be displayed in the UI refactoring wizard. You are are responsible for ensuring the created control can be accessed via <i>getControl()</i>, typically you instantiate your <i>composite</i> and set the control like this: <i>setControl(composite)</i></li>
- </ul>
- <ul>
- <li><pre>public RefactoringStatus checkFinalConditions();</pre> This method is called when the user clicks on the "OK" or "Preview" button. Here you check that all conditions are fulfilled to execute the transformation. Typically you verify that all the informations needed to do the transformation are given by the user. You have to return a <a href="http://help.eclipse.org/neon/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ltk/core/refactoring/RefactoringStatus.html">RefactoringStatus</a>.</li>
- </ul>
- <p> Example:
- <pre> // In this example we assume that the String newString has to be given by the user in the UI.
- RefactoringStatus status = new RefactoringStatus; // When a RefactoringStatus is instantiated his severity is 'OK'.
- if(fNewString==null){
- status.addFatalError("You have to indicate the new string"); // We add a fatal error indicating to the user that he has to enter the new string if he wants to execute the refactoring.
- } </pre>
- </p>
- <ul>
- <li><pre>public void execute(ModelSet modelSetToTransform);</pre> Here you will implement your transformation. The transformation has to be done on the parameter modelSetToTransform which is a ModelSet, <b>if you don't respect this rule the preview tool won't work properly</b>.</li>
- </ul>
- <p>Furthermore you may override the method <i>checkInitialConditions()</i> if you need to check some conditions before opening the UI. In the example below we verify the user has selected at least one element.</p><pre>
- public RefactoringStatus checkInitialConditions(){
- if(PapyrusRefactoringUtils.getSelectedElements().size()==0){
- status.addFatalError("You have to select at least one element");
- }
- }
- </pre>
- <p>Moreover you inherit the field <i>fModelSet</i>,it represents the ModelSet on which the transformation will be done. You can use it in the <i>checkInitialConditions(), checkFinalConditions()</i> or even <i>createControl()</i> methods.</p>
-
- <h2 id="Helper_classes">Helper classes</h2>
- <p>The PRF also provides helper classes, which extend <i>AbstractPapyrusTransformation</i>, if you want to implement a refactoring that execute the same transformation on each element from a specified list of <i>EObject</i>.</p>
- <p>Fist of all, you need to implement the <i>ITransformationOnElement</i> interface.
- In the <i>transformationToExecute(EObject element)</i> you have to implement a transformation that applies itself on the given <i>EObject</i> in parameter.</p>
- <p>In the example below, if the element is a NamedElement we change his name to "toto".</p>
- <pre>
- public void transformationToExecute(EObject element){
- if(element instanceof NamedElement){
- ((NamedElement)element).setName("toto");
- }
- }
- </pre>
- <p>Then you override one the following helper classes:</p>
- <ul>
- <li><i>AbstractTransformationOnElement</i>, in this case you will have to implement the methods:<pre>public Collection&lt;EObject&gt; getElementsListToTransform(); //In this method you have to return the list of <i>EObject</i> on which you want to apply your transformation.</pre><pre>public ITransformationOnElement getTransformationOnElement();//Here you will return your implementation of the <i>ITransformationOnElement</i> interface. </pre> </li>
- </ul>
- <ul>
- <li><i>AbstractAllModelTransformation</i>, this class extends <i>AbstractTransformationOnElement</i> but the <i>getElementsListToTransform()</i> method is already implemented it returns the list of all the <i>EObject</i> of the model. You will only need to implement the <i> getTransformationOnElement()</i> method.</li>
- </ul>
- <ul>
- <li><i>AbstractSelectedElementsTransformation</i>, this class is similar to <i>AbstractAllModelTransformation</i> except that the <i>EObject</i> on which the transformation will be applied is the list of the selected elements by the user.</li>
- </ul>
- <p>If you decide to override one of this helper classes you won't have to override the <i>execute()</i> method but you still need to implement the <i>createControl()</i>, <i>checkFinalConditions</i>, and maybe <i>checkFinalConditions</i> methods.
- By overriding one of this classes, the user will be able, in the preview page, to check the elements on which he really wants the refactoring to be applied.</p>
-
- <h2 id="Util_class">Util class</h2>
- <p>To facilitate the implementation of your refactoring you can use the <i>PapyrusRefactoringUtils</i> class.
- You can use, from this class, the following methods: </p>
- <ul>
- <li><i>getUMLRoot(ModelSet modelSet);</i> Return the UML Root if this ModelSet have an UML Model, null otherwise.</li>
- </ul>
- <ul>
- <li><i>getAllElements(ModelSet modelSet);</i> Return all the semantic elements from this ModelSet.</li>
- </ul>
- <ul>
- <li><i>getSelectedElements(ModelSet modelSet);</i> Return the selected elements in the Papyrus Editor or in the Model Explorer.</li>
- </ul>
- <ul>
- <li><i>searchElements(EClass[] participantsTypes, ModelSet modelSet);</i> Return all the instances of the metaclasses given in <i>participantsTypes</i>, in the given ModelSet.</li>
- </ul>
- <ul>
- <li><i>findEObjectInModelSet(EObject target,ModelSet modelSet);</i> Return the corresponding EObject (which will be a clone of the <i>target</i> parameter) in the wanted ModelSet. You may use this method in your transformation implementation if you want to use,in the <i>execute</i> method an EObject, you have not gotten neither from the <i>modelSetToTransform</i> parameter.</li>
- </ul>
-
- <h2 id="Launching_the_refactoring">Launching the refactoring</h2>
- <p>First you have to instantiate a <i>PapyrusRefactoringOperation</i>, then you trigger the <i>run</i> method where you want to launch your Papyrus refactoring, for example in a handler. <pre>PapyrusRefactoringOperation operation=new PapyrusRefactoringOperation(myPapyrusTransformation);
- operation.run();
- </pre></p>
-
- <h2 id="Add_an_entry_to_the_refactoring_menu">Add an entry to the refactoring menu</h2>
- <p>A menu, named "Model Refactor", is available in the Papyrus Editor and Model Explorer contextual menus. It's id is: "org.eclipse.papyrus.refactoring.menu". If you want to add a menu entry for you refactoring in the "Model Refactor" menu, you will have to contribute to the "org.eclipse.ui.menus" extension point.
- The following example adds an entry for a refactoring named "MyRefactoring".</p>
- <pre>&lt;extension point="org.eclipse.ui.menus"&gt;
- &lt;menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.refactoring.menu?after=additions"&gt;
- &lt;command
- commandId="org.eclipse.papyrus.refactoring.MyRefactoring.command"
- id="MyRefactoring"
- label="MyRefactoring"
- style="push"&gt;
- &lt;/command&gt;
- &lt;/menuContribution&gt;
- &lt;/extension&gt;
- &lt;extension
- point="org.eclipse.ui.commands"&gt;
- &lt;command
- id="org.eclipse.papyrus.refactoring.MyRefactoring.command"
- name="MyRefactoringCommand"&gt;
- &lt;/command&gt;
- &lt;/extension&gt;
- &lt;extension
- point="org.eclipse.ui.handlers"&gt;
- &lt;handler
- class="org.eclipse.papyrus.refactoring.MyRefactoring.MyRefactoringHandler"
- commandId="org.eclipse.papyrus.refactoring.MyRefactoring.command"&gt;
- </pre><pre> &lt;/handler&gt;
- &lt;/extension&gt;
- </pre>
- <p>Typically, in the handler your launch the refactoring (see the section before).</p>
-
- <h2 id="Add_your_refactoring_user_documentation">Add your refactoring user documentation</h2>
- <p>To add your refactoring user help to the available refactorings list in the context help, put
- '../org.eclipse.papyrus.infra.refactoring.doc/resource/refactoring_user_guide.xml#refactoring_list' in the anchor field.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.mediawiki b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.mediawiki
deleted file mode 100644
index 4b8d3fe9865..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_doc.mediawiki
+++ /dev/null
@@ -1,134 +0,0 @@
-=How to implement your own Papyrus refactoring=
-
-
-==Introduction==
-
-The PRF (Papyrus Refactoring Framework) helps developers to create undoable and previewable Papyrus model refactorings. The PRF also warns the user if the transformation invalidates the model.
-
-In this page you will learn how to implement your own Papyrus transformation using the PRF.
-
-
-==Implementing the transformation==
-
-'''Before beginning the implementation you need to add the dependencies:''' ''org.eclipse.papyrus.infra.refactoring'', ''org.eclipse.papyrus.infra.core'',''org.eclipse.ltk.core.refactoring'', ''org.eclipse.ltk.ui.refactoring''.
-
-Then you have to do is to implement a class which extends ''AbstractPapyrusTransformation'' (which is a ''WizardPage'').
-
-In the constructor you have to indicate the human readable name of your transformation.
-
-Then you need to implement the following methods:
-
-* <pre> public void createControl(Composite parent);</pre> In this method you have to implement the control which will be displayed in the UI refactoring wizard. You are are responsible for ensuring the created control can be accessed via ''getControl()'', typically you instantiate your ''composite'' and set the control like this: ''setControl(composite)''
-
-* <pre>public RefactoringStatus checkFinalConditions();</pre> This method is called when the user clicks on the "OK" or "Preview" button. Here you check that all conditions are fulfilled to execute the transformation. Typically you verify that all the informations needed to do the transformation are given by the user. You have to return a [http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fltk%2Fcore%2Frefactoring%2FRefactoringStatus.html RefactoringStatus].
-
- Example:
- <pre> // In this example we assume that the String newString has to be given by the user in the UI.
- RefactoringStatus status = new RefactoringStatus; // When a RefactoringStatus is instantiated his severity is 'OK'.
- if(fNewString==null){
- status.addFatalError("You have to indicate the new string"); // We add a fatal error indicating to the user that he has to enter the new string if he wants to execute the refactoring.
- } </pre>
-
-* <pre>public void execute(ModelSet modelSetToTransform);</pre> Here you will implement your transformation. The transformation has to be done on the parameter modelSetToTransform which is a ModelSet, '''if you don't respect this rule the preview tool won't work properly'''.
-
-
-Furthermore you may override the method ''checkInitialConditions()'' if you need to check some conditions before opening the UI. In the example below we verify the user has selected at least one element.
-
-<pre>
-public RefactoringStatus checkInitialConditions(){
-if(PapyrusRefactoringUtils.getSelectedElements().size()==0){
- status.addFatalError("You have to select at least one element");
- }
-} </pre>
-
-Moreover you inherit the field ''fModelSet'',it represents the ModelSet on which the transformation will be done. You can use it in the ''checkInitialConditions(), checkFinalConditions()'' or even ''createControl()'' methods.
-
-==Helper classes==
-
-The PRF also provides helper classes, which extend ''AbstractPapyrusTransformation'', if you want to implement a refactoring that execute the same transformation on each element from a specified list of ''EObject''.
-
-Fist of all, you need to implement the ''ITransformationOnElement'' interface.
-In the ''transformationToExecute(EObject element)'' you have to implement a transformation that applies itself on the given ''EObject'' in parameter.
-
-In the example below, if the element is a NamedElement we change his name to "toto".
-<pre>
- public void transformationToExecute(EObject element){
- if(element instanceof NamedElement){
- ((NamedElement)element).setName("toto");
- }
- }
-</pre>
-
-Then you override one the following helper classes:
-
-* ''AbstractTransformationOnElement'', in this case you will have to implement the methods:<pre>public Collection<EObject> getElementsListToTransform(); //In this method you have to return the list of ''EObject'' on which you want to apply your transformation.</pre><pre>public ITransformationOnElement getTransformationOnElement();//Here you will return your implementation of the ''ITransformationOnElement'' interface. </pre>
-
-*''AbstractAllModelTransformation'', this class extends ''AbstractTransformationOnElement'' but the ''getElementsListToTransform()'' method is already implemented it returns the list of all the ''EObject'' of the model. You will only need to implement the '' getTransformationOnElement()'' method.
-
-*''AbstractSelectedElementsTransformation'', this class is similar to ''AbstractAllModelTransformation'' except that the ''EObject'' on which the transformation will be applied is the list of the selected elements by the user.
-
-
-If you decide to override one of this helper classes you won't have to override the ''execute()'' method but you still need to implement the ''createControl()'', ''checkFinalConditions'', and maybe ''checkFinalConditions'' methods.
-By overriding one of this classes, the user will be able, in the preview page, to check the elements on which he really wants the refactoring to be applied.
-
-==Util class==
-
-To facilitate the implementation of your refactoring you can use the ''PapyrusRefactoringUtils'' class.
-You can use, from this class, the following methods:
-
-*''getUMLRoot(ModelSet modelSet);'' Return the UML Root if this ModelSet have an UML Model, null otherwise.
-
-*''getAllElements(ModelSet modelSet);'' Return all the semantic elements from this ModelSet.
-
-*''getSelectedElements(ModelSet modelSet);'' Return the selected elements in the Papyrus Editor or in the Model Explorer.
-
-*''searchElements(EClass[] participantsTypes, ModelSet modelSet);'' Return all the instances of the metaclasses given in ''participantsTypes'', in the given ModelSet.
-
-*''findEObjectInModelSet(EObject target,ModelSet modelSet);'' Return the corresponding EObject (which will be a clone of the ''target'' parameter) in the wanted ModelSet. You may use this method in your transformation implementation if you want to use,in the ''execute'' method an EObject, you have not gotten neither from the ''modelSetToTransform'' parameter.
-
-==Launching the refactoring==
-
-First you have to instantiate a ''PapyrusRefactoringOperation'', then you trigger the ''run'' method where you want to launch your Papyrus refactoring, for example in a handler. <pre>PapyrusRefactoringOperation operation=new PapyrusRefactoringOperation(myPapyrusTransformation);
-operation.run();
-</pre>
-
-==Add an entry to the refactoring menu==
-
-A menu, named "Model Refactor", is available in the Papyrus Editor and Model Explorer contextual menus. It's id is: "org.eclipse.papyrus.refactoring.menu". If you want to add a menu entry for you refactoring in the "Model Refactor" menu, you will have to contribute to the "org.eclipse.ui.menus" extension point.
-The following example adds an entry for a refactoring named "MyRefactoring".
-
- <extension point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.refactoring.menu?after=additions">
- <command
- commandId="org.eclipse.papyrus.refactoring.MyRefactoring.command"
- id="MyRefactoring"
- label="MyRefactoring"
- style="push">
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.papyrus.refactoring.MyRefactoring.command"
- name="MyRefactoringCommand">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.refactoring.MyRefactoring.MyRefactoringHandler"
- commandId="org.eclipse.papyrus.refactoring.MyRefactoring.command">
-
- </handler>
- </extension>
-
-
-Typically, in the handler your launch the refactoring (see the section before).
-
-==Add your refactoring user documentation==
-
-To add your refactoring user help to the available refactorings list in the context help, put
-'../org.eclipse.papyrus.infra.refactoring.doc/resource/refactoring_user_guide.xml#refactoring_list' in the anchor field. \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.html b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.html
deleted file mode 100644
index a30042064bd..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
-<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>
-<body>
- <p>In this documentation we will execute a refactoring which renames to "Test_refactoring" the UML::NamedElement of a model. We will execute this refactoring on the following model: </p>
- <p><img border="0" src="images/example-model.png"/></p>
-
- <h1 id="Model_refactor">Model refactor</h1>
- <p>As you can see in the following image, the user can choose between displaying a preview of the impact the refactoring will have on the model or executing the transformation directly.</p>
- <p><img border="0" src="images/wizard-refactoring.png"/></p>
- <ul>
- <li>A area: If the user clicks on the 'OK' button, the transformation will be directly executed.</li>
- </ul>
- <ul>
- <li>B area: If the user chooses to click on the 'Preview' button, a preview of the impact the transformation will have on the model will be displayed.</li>
- </ul>
-
- <h1 id="Preview_page">Preview page</h1>
- <p>The following image illustrate the preview page.</p>
- <p><img border="0" src="images/preview-page.png"/></p>
- <ul>
- <li>In the A area the user is able to select the changes he really wants to apply. Only the checked changes will be applied. For refactorings which execute the same transformation on each element from a specified list (here the list of elements are the selected ones, and for each one we change its name), there is one change for each element. For refactorings more general only one change is created.</li>
- </ul>
- <ul>
- <li>In the B area a comparison between the original model and the refactored model is displayed. Here we can see that this transformation changes the name to "Test_refactoring" of each element.</li>
- </ul>
- <ul>
- <li>In the C area the user can decide to execute the transformation by clicking on the 'OK' button, canceling the refactoring or going back to the home page refactoring.</li>
- </ul>
- <p>In our example if we decide to execute the refactoring the model will be: </p>
- <p><img border="0" src="images/refactored-model.png"/></p>
-
- <h1 id="Model_validity">Model validity</h1>
- <p>Before applying the transformation, if the refactoring will affects the validity of the model the Papyrus refactoring tool warns the user and gives him the list of the problems the refactoring will cause.</p>
- <p><img border="0" src="images/validity-page.png"/></p>
- <p>In our case after the refactoring, two UML::Class in the same container will have the same name (and the same qualified name so). The Papyrus refactoring tool warns about this problem.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.mediawiki b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.mediawiki
deleted file mode 100644
index a9bf00742fb..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/Dev_user.mediawiki
+++ /dev/null
@@ -1,38 +0,0 @@
-In this documentation we will execute a refactoring which renames to "Test_refactoring" the UML::NamedElement of a model. We will execute this refactoring on the following model:
-
-[[image:images/example-model.png]]
-
-=Model refactor=
-
-As you can see in the following image, the user can choose between displaying a preview of the impact the refactoring will have on the model or executing the transformation directly.
-
-[[image:images/wizard-refactoring.png]]
-
-*A area: If the user clicks on the 'OK' button, the transformation will be directly executed.
-
-*B area: If the user chooses to click on the 'Preview' button, a preview of the impact the transformation will have on the model will be displayed.
-
-=Preview page=
-
-The following image illustrate the preview page.
-
-[[image:images/preview-page.png]]
-
-*In the A area the user is able to select the changes he really wants to apply. Only the checked changes will be applied. For refactorings which execute the same transformation on each element from a specified list (here the list of elements are the selected ones, and for each one we change its name), there is one change for each element. For refactorings more general only one change is created.
-
-*In the B area a comparison between the original model and the refactored model is displayed. The left side of the compare viewer shows the refactored model, the right side shows the original.
-Here we can see that this transformation changes the name to "Test_refactoring" of each element.
-
-*In the C area the user can decide to execute the transformation by clicking on the 'OK' button, canceling the refactoring or going back to the home page refactoring.
-
-In our example if we decide to execute the refactoring the model will be:
-
-[[image:images/refactored-model.png]]
-
-=Model validity=
-
-Before applying the transformation, if the refactoring will affects the validity of the model the Papyrus refactoring tool warns the user and gives him the list of the problems the refactoring will cause.
-
-[[image:images/validity-page.png]]
-
-In our case after the refactoring, two UML::Class in the same container will have the same name (and the same qualified name so). The Papyrus refactoring tool warns about this problem. \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/example-model.png b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/example-model.png
deleted file mode 100644
index 81d2fc640df..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/example-model.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/preview-page.png b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/preview-page.png
deleted file mode 100644
index 2161c4329f9..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/preview-page.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/refactored-model.png b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/refactored-model.png
deleted file mode 100644
index c36ee25a916..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/refactored-model.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/validity-page.png b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/validity-page.png
deleted file mode 100644
index 3369922a002..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/validity-page.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/wizard-refactoring.png b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/wizard-refactoring.png
deleted file mode 100644
index f7ee9c9b811..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/images/wizard-refactoring.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_dev_guide.xml b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_dev_guide.xml
deleted file mode 100644
index 47539a621cb..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_dev_guide.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<toc label="How to implement your own Papyrus refactoring" link_to="../../../plugins/doc/org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocDev" topic="doc/Dev_doc.html">
- <topic href="doc/Dev_doc.html" label="How to implement your own Papyrus refactoring">
- </topic>
-
-</toc>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_user_guide.xml b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_user_guide.xml
deleted file mode 100644
index fcafc102743..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/doc/refactoring_user_guide.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<toc label="Model Refactor" link_to="../../../plugins/doc/org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocUser" topic="doc/Dev_user.html">
- <topic href="doc/Dev_user.html" label="Model Refactor">
- <topic href="resource/Dev_user.html" label="Model Refactor Wizard">
- </topic>
- <topic label="Available Refactorings">
- <anchor id="refactoring_list"/>
- </topic>
- </topic>
-
-</toc>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/Papyrus_16x16.gif b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/Papyrus_16x16.gif
deleted file mode 100644
index 8a31f458379..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/Papyrus_16x16.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/refactor.png b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/refactor.png
deleted file mode 100644
index 049da9f00bd..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/icons/refactor.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.properties b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.properties
deleted file mode 100644
index 677c201ba35..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2015 CEA LIST.
-#
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - initial API and implementation
-
-pluginName=Papyrus Refactoring Core
-vendorName=Eclipse Modeling Project
-
-refactoringContribution.label=Refactor
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.xml b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.xml
deleted file mode 100644
index 94e2a464766..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/plugin.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <!-- <extension
- point="org.eclipse.search.searchPages">
- <page
- canSearchEnclosingProjects="true"
- class="org.eclipse.papyrus.refactoring.ui.RefactoringPapyrusSearchPage"
- enabled="true"
- extensions="di:99"
- icon="icons/PapyrusSearch.png"
- id="org.eclipse.papyrus.search.ui.pages.PapyrusSearchPage"
- label="%searchPageLabel"
- showScopeSection="true">
- </page>
- </extension> -->
- <extension
- point="org.eclipse.ltk.ui.refactoring.changePreviewViewers">
- <changePreviewViewer
- class="org.eclipse.papyrus.refactoring.ui.PapyrusRefactoringPreview"
- id="org.eclipse.papyrus.refactoring.changePreviewViewer">
- <enablement>
- <instanceof
- value="org.eclipse.papyrus.refactoring.core.IPreviewablePapyrusChange">
- </instanceof>
- </enablement>
- </changePreviewViewer>
- </extension>
- <extension
- point="org.eclipse.ltk.ui.refactoring.statusContextViewers">
- <statusContextViewer
- class="org.eclipse.papyrus.refactoring.ui.PapyrusStatusContextViewer"
- id="org.eclipse.papyrus.infra.refactoring.statusContextViewer">
- <enablement>
- <instanceof
- value="org.eclipse.papyrus.refactoring.core.PapyrusRefactoringValidationStatusContext">
- </instanceof>
- </enablement>
- </statusContextViewer>
- </extension>
-
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.views.modelexplorer.popup.validation">
- <menu
- icon="icons/Papyrus_16x16.gif"
- id="org.eclipse.papyrus.refactoring.menu"
- label="%refactoringContribution.label">
- <visibleWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- <count
- value="+">
- </count>
- </or>
- </visibleWhen>
- </menu>
- </menuContribution>
-
- <menuContribution
- locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?after=org.eclipse.papyrus.views.modelexplorer.popup.validation">
- <menu
- icon="icons/Papyrus_16x16.gif"
- id="org.eclipse.papyrus.refactoring.menu"
- label="%refactoringContribution.label">
- <visibleWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- <count
- value="+">
- </count>
- </or>
- </visibleWhen>
- </menu>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="doc/refactoring_user_guide.xml"
- primary="false">
- </toc>
- <toc
- file="doc/refactoring_dev_guide.xml"
- primary="true">
- </toc>
- </extension>
-
-</plugin>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/pom.xml b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/pom.xml
deleted file mode 100644
index 33f424440b7..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.eclipse.papyrus.refactoring</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <groupId>org.eclipse.papyrus</groupId>
- <packaging>eclipse-plugin</packaging>
- <parent>
- <relativePath>../../../releng/extra</relativePath>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
- <version>${mylyn.wikitext.version}</version>
- <configuration>
- <sourceFolder>doc</sourceFolder>
- <outputFolder>${project.build.directory}/site/generated-eclipse-help</outputFolder>
- <multipleOutputFiles>false</multipleOutputFiles>
- <navigationImages>true</navigationImages>
- <formatOutput>true</formatOutput>
- <htmlFilenameFormat>$1.html</htmlFilenameFormat>
- <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
- <helpPrefix>target/site/generated-eclipse-help</helpPrefix>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>eclipse-help</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.mediawiki.core</artifactId>
- <version>${mylyn.wikitext.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/Activator.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/Activator.java
deleted file mode 100644
index e2e9724424d..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/Activator.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.refactoring"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- public static Image shellImage;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- // shellImage = getImage("icons/Papyrus_16x16.gif");
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Get the image from its path in the current plugin
- *
- * @param path
- * @return
- * The {@link #org.eclipse.swt.graphics.Image image}
- */
- public Image getImage(String path) {
- return getImage(PLUGIN_ID, path);
- }
-
- /**
- * Get the image from its path in the specified plugin
- *
- * @param pluginId
- * @param path
- * @return
- * The {@link #org.eclipse.swt.graphics.Image image}
- */
- public Image getImage(String pluginId, String path) {
- final ImageRegistry registry = getImageRegistry();
- String key = pluginId + "/" + path; //$NON-NLS-1$
- Image image = registry.get(key);
- if (image == null) {
- registry.put(key, AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, path));
- image = registry.get(key);
- }
- return image;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * @return the image descriptor
- */
- public ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/AbstractPapyrusTransformation.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/AbstractPapyrusTransformation.java
deleted file mode 100644
index f5ee0934e1b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/AbstractPapyrusTransformation.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Class to be subclassed by clients who want to implement their own refactoring.
- * Represents a specific transformation in the Papyrus refactoring tool.
- *
- * <p>
- * The {@link #checkFinalConditions} method is called when the 'OK' or 'Preview' button is pressed. If the requested conditions for executing
- * this transformation are fulfilled the {@link #execute} method is called.
- * </p>
- *
- * @see org.eclipse.ltk.core.refactoring.RefactoringStatus
- * @see org.eclipse.jface.wizard.IWizardPage
- */
-public abstract class AbstractPapyrusTransformation extends UserInputWizardPage {
-
- /** The {@link ModelSet} on which the transformation will be done. */
- protected ModelSet fModelSet;
-
- /** The element selected to transform */
- protected EObject fElementToTransform;
-
- /**
- * Constructor.
- *
- * @param label
- * The label provided to the transformation
- */
- public AbstractPapyrusTransformation(String label) {
- super(label);
-
- }
-
- /**
- * Check the conditions before opening the UI page of this refactoring.
- * The default status is 'OK'. Clients may override this method if they have some initial conditions to check.
- *
- * @return refactoring status if the initial conditions are fulfilled or not. If the status is <code>RefactoringStatus#FATAL</code>
- * the refactoring is considered as not being executable.
- */
- public RefactoringStatus checkInitialConditions() {
- return new RefactoringStatus();
- }
-
- /**
- * Checks if all conditions for executing this transformation are fulfilled. This method is called after the {@link #checkInitialConditions},
- * when the 'OK' or 'Preview' button is pressed to check if we can execute the transformation.
- *
- * @return refactoring status if the final conditions are fulfilled or not.If the status is <code>RefactoringStatus#FATAL</code>
- * the refactoring is considered as not being executable.
- */
- public abstract RefactoringStatus checkFinalConditions();
-
- /**
- *
- */
- /**
- * Method where the source code of the transformation has to be implemented.
- * If all conditions are fulfilled this method is called to execute this Papyrus transformation.
- * The transformation has to be done on modelSetToTransform parameter (which is an instance of ModelSet).
- *
- * @param modelSetToTransform
- */
- public abstract void execute(ModelSet modelSetToTransform);
-
- /**
- * Construct the UI for this transformation
- *
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- *
- * @param parent
- * The shell in which to create it
- */
- @Override
- public abstract void createControl(Composite parent);
-
-
-
- /**
- * @return true if it is possible to launch the refactoring, false otherwise.
- */
- public boolean isEnable() {
- if (checkInitialConditions().getSeverity() == RefactoringStatus.OK) {
- return true;
- }
- return false;
- }
-
- /**
- * Set the modelSet in order to fetch it later
- *
- * @param modelSet
- */
- public void setModelSet(ModelSet modelSet) {
- fModelSet = modelSet;
- }
-
- /**
- * Set the element to transform in order to fetch it later
- *
- * @param elementToTransform
- */
- public void setElementToTransform(EObject elementToTransform) {
- fElementToTransform = elementToTransform;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/IPreviewablePapyrusChange.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/IPreviewablePapyrusChange.java
deleted file mode 100644
index 4a25e968b0f..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/IPreviewablePapyrusChange.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * Interface to present comparison between two files.
- *
- * @noimplement This class is not intended to be implemented by clients.
- *
- */
-public interface IPreviewablePapyrusChange {
-
- /**
- *
- * @return The preview "di" file.
- */
- public IFile getPreviewFile();
-
- /**
- *
- * @return The original "di" file.
- */
- public IFile getInitialFile();
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusChange.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusChange.java
deleted file mode 100644
index 94ab493a40d..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusChange.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import java.io.IOException;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelsReader;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
-import org.eclipse.papyrus.infra.emf.utils.ResourceUtils;
-import org.eclipse.papyrus.refactoring.Activator;
-import org.eclipse.papyrus.refactoring.messages.Messages;
-
-
-/**
- * A {@link Change} for Papyrus refactoring.
- *
- * @noextend This class is not intended to be extended by clients.
- *
- */
-public class PapyrusChange extends Change implements IPreviewablePapyrusChange {
-
- /** The ModelSet on which we apply the change. */
- protected ModelSet fModelSet;
-
- /** The Papyrus Refactoring to execute. */
- protected AbstractPapyrusTransformation fPapyrusRefactoringTransformation;
-
- /** The name of the refactoring. */
- private final String fName;
-
- /** The preview modelSet containing the change used to compare it to the original in the compare view */
- private ModelSet fPreviewModelSet;
-
- /** The element to change */
- private Object fElementToTransform;
-
- /**
- * Constructor.
- *
- * @param papyrusRefactoringTransformation
- * The transformation to execute
- * @param name
- * The tag associated to the transformation
- * @param modelSet
- * The modelSet containing the element to transform
- */
- public PapyrusChange(AbstractPapyrusTransformation papyrusRefactoringTransformation, String name, ModelSet modelSet) {
- fName = name;
- fModelSet = modelSet;
- fPapyrusRefactoringTransformation = papyrusRefactoringTransformation;
- fElementToTransform = papyrusRefactoringTransformation.fElementToTransform;
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getName() {
- return fName;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void initializeValidationData(IProgressMonitor pm) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- RefactoringStatus status = new RefactoringStatus();
- try {
- pm.beginTask(Messages.PAPYRUSCHANGE_CHECKVALIDITY, 3);
- if (fModelSet == null) {
- status.merge(RefactoringStatus.createFatalErrorStatus(Messages.PAPYRUSCHANGE_MODELOPEN_ERROR));
- }
- return status;
- } finally {
- pm.done();
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Change perform(IProgressMonitor pm) throws CoreException {
- return performRefactor(fModelSet, Messages.PAPYRUSCHANGE_SET_PERFORM);
- }
-
- /**
- * Apply the refactoring on the given ModelSet
- *
- * @param modelSet
- * The ModelSet on which we do the refactoring.
- * @return
- */
- protected Change performRefactor(ModelSet modelSet, String label) {
- final TransactionalEditingDomain editingDomain = modelSet.getTransactionalEditingDomain();
- // final PapyrusRefactoringCommand refactoringCommand = new PapyrusRefactoringCommand(editingDomain, fPapyrusRefactoringTransformation, modelSet);
- final PapyrusRefactoringCommand emfOperation = new PapyrusRefactoringCommand(editingDomain, fPapyrusRefactoringTransformation, modelSet, label + fName);
-
- try {
- emfOperation.execute(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
-
- return new UndoPapyrusChange(emfOperation, fElementToTransform, fName);
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object getModifiedElement() {
- // return fModelSet;
- return fElementToTransform;
- }
-
- // TODO a proper clone, so as to get the preview working !
- /**
- * Clones the current modelSet to apply it the Changes
- *
- * @return
- * The preview modelSet
- */
- public ModelSet getChangePreviewModelSet() {
- ModelSet previewModelSet = new ModelSet();
- ModelsReader reader = new ModelsReader();
- reader.readModel(previewModelSet);
- try {
- previewModelSet.loadModels(fModelSet.getURIWithoutExtension());
-
- } catch (ModelMultiException e) {
- Activator.log.error(e);
- }
-
- return previewModelSet;
- // getPreviewFile();
- // return fPreviewModelSet;
- }
-
- /**
- * Creates a copy of the original ModelSet and execute the refactoring on it.
- *
- * @return A preview file of the refactoring which shows the refactoring effects.
- */
- @Override
- public IFile getPreviewFile() {
- String nameProject = Messages.PAPYRUSCHANGE_PREVIEWPROJECT_NAME;
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- IProject project = root.getProject(nameProject);
- // System.err.println("getPreviewFile");
-
- try {
- if (!project.exists()) {
- project.create(null);
- }
- project.open(null);
- } catch (CoreException e1) {
- Activator.log.error(e1);
- }
-
- IPath path = new Path(project.getFullPath().toString() + Messages.PAPYRUSCHANGE_PREVIEWMODEL_NAME);
- IFile previewFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- fModelSet.saveCopy(path.removeFileExtension());
- ModelSet previewModelSet = new ModelSet();
- ModelsReader reader = new ModelsReader();
- reader.readModel(previewModelSet);
- // System.err.println("initPreviewModelSet");
-
- try {
- previewModelSet.loadModels(URI.createPlatformResourceURI(path.toString(), true));
-
- } catch (ModelMultiException e) {
- Activator.log.error(e);
- }
-
- performRefactor(previewModelSet, Messages.PAPYRUSCHANGE_PREVIEW_PERFORM);
-
- try {
- // modelSetForPreviewFile.saveAs(URI.createPlatformResourceURI(path.toString(), true));
- previewModelSet.saveAs(URI.createPlatformResourceURI(path.toString(), true));
- } catch (IOException e) {
- Activator.log.error(e);
- }
- // Assert.isNotNull(modelSetForPreviewFile, Messages.PAPYRUSCHANGE_PREVIEWCREATION_ERROR);
- Assert.isNotNull(previewModelSet, Messages.PAPYRUSCHANGE_PREVIEWCREATION_ERROR);
-
- return previewFile;
- }
-
-
- /**
- * Return the original "di" file.
- */
- @Override
- public IFile getInitialFile() {
- // Resource diResource = DiModelUtils.getDiResource(fModelSet);
- Resource diResource = ((DiModel) fModelSet.getModel(DiModel.DI_MODEL_ID)).getResource();
- IFile file = ResourceUtils.getFile(diResource);
-
- return file;
- }
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoring.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoring.java
deleted file mode 100644
index ae437b06d0c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoring.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.Refactoring;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.services.validation.internal.EcoreDiagnostician;
-import org.eclipse.papyrus.refactoring.Activator;
-import org.eclipse.papyrus.refactoring.messages.Messages;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.AbstractTransformationOnElement;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.PapyrusCompositeChange;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * This class represents the {@link Refactoring} for Papyrus refactoring.
- *
- * @noextend This class is not intended to be extended by clients.
- *
- */
-@SuppressWarnings("restriction")
-public class PapyrusRefactoring extends Refactoring {
-
- /** The human readable name */
- protected String fName;
-
- /** The ModelSet to be modified */
- protected ModelSet fModelSet;
-
- /** The {@link AbstractPapyrusTransformation} corresponding to this Papyrus refactoring */
- protected AbstractPapyrusTransformation fPapyrusRefactoringTransformation;
-
- /** Parameter used to remove duplicates when running the diagnostic on the preview and the getting the related change */
- private Change change;
-
- /**
- * A {@link Runnable} to check final conditions before executing the transformation
- */
- private class FinalConditionsRunnable implements Runnable {
-
- private RefactoringStatus finalRefactoringStatus;
-
- @Override
- public void run() {
- finalRefactoringStatus = fPapyrusRefactoringTransformation.checkFinalConditions();
- }
-
- public RefactoringStatus getfinalRefactoringStatus() {
- return finalRefactoringStatus;
- }
- }
-
- /**
- * A {@link Runnable} to check initial conditions before executing the transformation
- */
- private class InitialConditionsRunnable implements Runnable {
-
- private RefactoringStatus initialRefactoringStatus;
-
- @Override
- public void run() {
- initialRefactoringStatus = fPapyrusRefactoringTransformation.checkInitialConditions();
- }
-
- public RefactoringStatus getInitialRefactoringStatus() {
- return initialRefactoringStatus;
- }
- }
-
- /**
- * Constructor.
- *
- * @param name
- * The name associated to this transformation
- * @param modelSet
- * The modelSet to modify
- * @param papyrusRefactoringTransformation
- * The transformation to execute (rename, mutation,...)
- */
- public PapyrusRefactoring(String name, ModelSet modelSet, AbstractPapyrusTransformation papyrusRefactoringTransformation) {
- fName = name;
- fModelSet = modelSet;
- fPapyrusRefactoringTransformation = papyrusRefactoringTransformation;
- }
-
-
- @Override
- public String getName() {
- return fName;
- }
-
- /**
- * Verify that the modelSet to transform has been provided prior to the execution
- *
- * @see org.eclipse.ltk.core.refactoring.Refactoring#checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor)
- *
- * @param pm
- * @return
- * OK status if the modelSet was provided, null otherwise
- * @throws CoreException
- * @throws OperationCanceledException
- */
- @Override
- public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
-
- RefactoringStatus status = new RefactoringStatus();
-
- try {
- pm.beginTask(Messages.PAPYRUSREFACTORING_CHECKPRECONDITIONS, 1);
- if (fModelSet == null) {
- status.merge(RefactoringStatus.createFatalErrorStatus(Messages.PAPYRUSREFACTORING_RESOURCEOPEN_ERROR));
-
- } else {
- InitialConditionsRunnable initialConditionsRunnable = new InitialConditionsRunnable();
- Display.getDefault().syncExec(initialConditionsRunnable);
- // Display.getDefault().asyncExec(initialConditionsRunnable);
- return initialConditionsRunnable.getInitialRefactoringStatus();
- }
-
- } finally {
- pm.done();
- }
-
- return null;
- }
-
- /**
- * Verify that the transformation has not been canceled and that the transformation executed itself without errors
- *
- * @see org.eclipse.ltk.core.refactoring.Refactoring#checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor)
- *
- * @param pm
- * @return
- * @throws CoreException
- * @throws OperationCanceledException
- */
- @Override
- public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException {
-
- try {
- pm.beginTask(Messages.PAPYRUSREFACTORING_MODELVALIDITY, 2);
- FinalConditionsRunnable finalConditionRunnable = new FinalConditionsRunnable();
- Display.getDefault().syncExec(finalConditionRunnable);
- // Display.getDefault().asyncExec(finalConditionRunnable);
-
- RefactoringStatus status = finalConditionRunnable.getfinalRefactoringStatus();
-
- if (status.getSeverity() != RefactoringStatus.FATAL) {
- Diagnostic diagnostic = diagnosticRefactoring();
-
- if (diagnostic != null && diagnostic.getSeverity() != Diagnostic.OK) {
- status.addError(Messages.PAPYRUSREFACTORING_MODELVALIDITY_ERROR, new PapyrusRefactoringValidationStatusContext(diagnostic));
- }
- }
-
- return status;
-
- } finally {
- pm.done();
- }
-
- }
-
- /**
- * Verify if the refactoring will affect the model validity.
- *
- * @return a Diagnostic of the impact of the refactoring.
- */
- private Diagnostic diagnosticRefactoring() {
- ModelSet previewModelSet = null;
- if (fPapyrusRefactoringTransformation instanceof AbstractTransformationOnElement) {
- change = new PapyrusCompositeChange((AbstractTransformationOnElement) fPapyrusRefactoringTransformation, fModelSet);
- // previewModelSet = change.getCompositePreviewModelSet();
- previewModelSet = ((PapyrusCompositeChange) change).getChangePreviewModelSet();
- } else {
- change = new PapyrusChange(fPapyrusRefactoringTransformation, fName, fModelSet);
- previewModelSet = ((PapyrusChange) change).getChangePreviewModelSet();
- }
-
- if (previewModelSet != null) {
- UmlModel umlModel = UmlUtils.getUmlModel(previewModelSet);
- if (umlModel != null) {
- EObject root;
- try {
- root = umlModel.lookupRoot();
- TransactionalEditingDomain domain = previewModelSet.getTransactionalEditingDomain();
- EcoreDiagnostician diagnostician = new EcoreDiagnostician();
- AdapterFactory adapterFactory = domain instanceof AdapterFactoryEditingDomain ? ((AdapterFactoryEditingDomain) domain).getAdapterFactory() : null;
- diagnostician.initialize(adapterFactory, new NullProgressMonitor());
-
- return diagnostician.validate(root);
- } catch (NotFoundException e) {
- Activator.log.error(e);
- }
-
- }
- }
-
- return null;
- }
-
- @Override
- public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- try {
- pm.beginTask(Messages.PAPYRUSREFACTORING_EXECUTE, 1);
-
- if (fPapyrusRefactoringTransformation instanceof AbstractTransformationOnElement) {
- fPapyrusRefactoringTransformation.setModelSet(fModelSet);
- // PapyrusCompositeChange compositeChange = new PapyrusCompositeChange((AbstractTransformationOnElement) fPapyrusRefactoringTransformation, fModelSet);
- // return compositeChange;
- } else {
- // PapyrusChange change = new PapyrusChange(fPapyrusRefactoringTransformation, fName, fModelSet);
- // return change;
- }
-
- return change;
-
- } finally {
- pm.done();
- }
- }
-
-
-
- /**
- * @return The corresponding {@link AbstractPapyrusTransformation}
- */
- public AbstractPapyrusTransformation getPapyrusTransformation() {
- return fPapyrusRefactoringTransformation;
- }
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringCommand.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringCommand.java
deleted file mode 100644
index 1cbb949516d..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringCommand.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.AbstractEMFOperation;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-
-/**
- * A {@link RecordingCommand} to execute a Papyrus refactoring transformation
- *
- * @noextend This class is not intended to be extended by clients.
- */
-public class PapyrusRefactoringCommand extends AbstractEMFOperation {
-
- /** The modelSet to transform */
- private ModelSet fModelSet;
-
- /** The papyrus transformation to execute */
- protected AbstractPapyrusTransformation fPapyrusRefactoringTransformation;
-
-
- /**
- * Constructor.
- *
- * @param domain
- * The editingDomain used to executed the command
- * @param papyrusRefactoringTransformation
- * The transformation to execute inside the command
- * @param modelSet
- * The modelSet to change
- * @param label
- * The label of the command
- */
- public PapyrusRefactoringCommand(TransactionalEditingDomain domain, AbstractPapyrusTransformation papyrusRefactoringTransformation,
- ModelSet modelSet, String label) {
- super(domain, label);
- fPapyrusRefactoringTransformation = papyrusRefactoringTransformation;
- fPapyrusRefactoringTransformation.setModelSet(modelSet);
- fModelSet = modelSet;
- }
-
- @Override
- protected IStatus doExecute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- fPapyrusRefactoringTransformation.execute(fModelSet);
- return null;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringOperation.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringOperation.java
deleted file mode 100644
index f2b237b2d11..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringOperation.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.refactoring.ui.PapyrusRefactoringWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Activate the refactoring cycle.
- *
- * @noextend This class is not intended to be extended by clients.
- */
-public class PapyrusRefactoringOperation {
-
- /** The papyrus transformation to execute */
- private AbstractPapyrusTransformation fPapyrusTransformation;
-
- /**
- * Constructor.
- *
- * @param PapyrusTransformation
- * The transformation linked to this operation
- */
- public PapyrusRefactoringOperation(AbstractPapyrusTransformation PapyrusTransformation) {
- fPapyrusTransformation = PapyrusTransformation;
- }
-
- /**
- * Create the refactoring linked to the transformation, then create the wizard related to this refactoring, then the operation to run
- * {@link org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.RefactoringWizardOpenOperation(RefactoringWizard wizard)}
- *
- */
- public void run() {
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
- ModelSet modelSet = getModelSet();
- fPapyrusTransformation.setModelSet(modelSet);
- String label = fPapyrusTransformation.getName();
- PapyrusRefactoring currentRefactoring = new PapyrusRefactoring(label, modelSet, fPapyrusTransformation);
- PapyrusRefactoringWizard refactoringWizard = new PapyrusRefactoringWizard(currentRefactoring, label);
- RefactoringWizardOpenOperation operation = new RefactoringWizardOpenOperation(refactoringWizard);
-
- try {
- operation.run(win.getShell(), label);
- } catch (InterruptedException e) {
- Activator.log.error(e);
- }
-
- }
-
-
- /**
- * Get the model which is the target of this refactoring operation
- *
- * @return
- * The modelSet to transform
- */
- public ModelSet getModelSet() {
- try {
- ModelSet modelSet = org.eclipse.papyrus.infra.ui.util.ServiceUtilsForHandlers.getInstance().getModelSet(null);
- return modelSet;
-
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
- return null;
- }
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringValidationStatusContext.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringValidationStatusContext.java
deleted file mode 100644
index 447713cec41..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/PapyrusRefactoringValidationStatusContext.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.ltk.core.refactoring.RefactoringStatusContext;
-import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry;
-
-/**
- * {@link RefactoringStatusContext} for annotating a the {@link RefactoringStatusEntry} linked to
- * the verification of the model validity after the refactoring.
- *
- */
-public class PapyrusRefactoringValidationStatusContext extends RefactoringStatusContext {
-
- /** The {@link Diagnostic} that represents the model validity after the refactoring. */
- private Diagnostic fDiagnostic;
-
-
- public PapyrusRefactoringValidationStatusContext(Diagnostic diagnostic) {
- fDiagnostic = diagnostic;
- }
-
- public Diagnostic getfDiagnostic() {
- return fDiagnostic;
- }
-
- @Override
- public Object getCorrespondingElement() {
- return fDiagnostic;
- }
-
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/UndoPapyrusChange.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/UndoPapyrusChange.java
deleted file mode 100644
index 428ac046aed..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/core/UndoPapyrusChange.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.core;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.emf.workspace.AbstractEMFOperation;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.refactoring.messages.Messages;
-
-
-/**
- * This class manages the undo operation of the transformation based on the LTK refactoring framework
- *
- * @noextend This class is not intended to be extended by clients.
- *
- */
-public class UndoPapyrusChange extends Change {
-
- /** The EMFOperation encappsulating the execution of the Change to enable a proper undo */
- private AbstractEMFOperation emfOperation;
-
- /** The name of the executed command */
- private String fName;
-
- /** The element to transform through the execution of the change */
- private Object fElementToTransform;
-
- /** Boolean used to mark if the change can be undone or not */
- private boolean fCanUndo;
-
- private static final String CHECKING_CONDITIONS = Messages.UNDOPAPYRUSCHANGE_VALIDITYCHECK;
-
- private static final String INVALID_UNDO = Messages.UNDOPAPYRUSCHANGE_ERROR;
-
- /**
- * Constructor.
- *
- * @param emfOperation
- * The operation rewinded by the change
- * @param elementToTransform
- * The element rewinded
- * @param elementName
- * The name of the rewinded element
- */
- public UndoPapyrusChange(AbstractEMFOperation emfOperation, Object elementToTransform, String elementName) {
- this.emfOperation = emfOperation;
- this.fName = elementName;
- this.fElementToTransform = elementToTransform;
- }
-
- @Override
- public Change perform(IProgressMonitor pm) throws CoreException {
- try {
- emfOperation.undo(new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- Activator.log.error(e);
- }
-
- // Can't only return null if the command needs to be redone
- // This undoChange undo the previous one
- return new UndoPapyrusChange(emfOperation, fElementToTransform, fName);
- }
-
- @Override
- public String getName() {
- return fName + "_ChangeUndo"; // $NON-NLS-0$
- }
-
- @Override
- public void initializeValidationData(IProgressMonitor pm) {
- fCanUndo = emfOperation.canUndo();
- }
-
- @Override
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- RefactoringStatus status = new RefactoringStatus();
- try {
- pm.beginTask(CHECKING_CONDITIONS, 1);
- if (!fCanUndo) {
- status.merge(RefactoringStatus.createFatalErrorStatus(INVALID_UNDO));
- }
- return status;
- } finally {
- pm.done();
- }
- }
-
- @Override
- public Object getModifiedElement() {
- return fElementToTransform;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractAllModelTransformation.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractAllModelTransformation.java
deleted file mode 100644
index 93cb1a77850..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractAllModelTransformation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.helper;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.AbstractTransformationOnElement;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-
-/**
- * Clients who want to implement a Papyrus Refactoring which affects all the model elements may override this class.
- * By overriding this class you don't need to override {@link #getElementsListToTransform()}
- *
- */
-public abstract class AbstractAllModelTransformation extends AbstractTransformationOnElement {
-
- /**
- * Constructor.
- *
- * @param label
- * The name of the user input page (name of the transformation)
- */
- public AbstractAllModelTransformation(String label) {
- super(label);
- }
-
- @Override
- public Collection<EObject> getElementsListToTransform() {
- return PapyrusRefactoringUtils.getAllElements(fModelSet);
- }
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractChoiceOnUIParticipantsTransformation.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractChoiceOnUIParticipantsTransformation.java
deleted file mode 100644
index 556f43da96e..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractChoiceOnUIParticipantsTransformation.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.helper;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.refactoring.messages.Messages;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.AbstractTransformationOnElement;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * This class offers a generic graphical interface which gives the user the possibility to choose the kind of refactoring he wants.
- * He can choose between doing the refactor on:
- * - All the elements of the current Papyrus model
- * - Selected elements on the Papyrus Editor
- */
-public abstract class AbstractChoiceOnUIParticipantsTransformation extends AbstractTransformationOnElement {
-
- /** Combobox containing the scope of the transformation to execute */
- protected Combo fSelectParticipants;
-
- private static final int ALL_MODEL_REFACTOR = 0;
-
- private static final int SELECTED_ELEMENTS_REFACTOR = 1;
-
- /**
- * Constructor.
- *
- * @param label
- * The name of the user input page (name of the transformation)
- */
- public AbstractChoiceOnUIParticipantsTransformation(String label) {
- super(label);
- }
-
- /**
- * Create the specific input of this Papyrus Refactoring Wizard Page
- *
- * @param parent
- */
- public abstract void createContent(Composite parent);
-
-
- @Override
- public void createControl(Composite parent) {
- Composite result = new Composite(parent, SWT.NONE);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- result.setLayout(layout);
- setControl(result);
- Label label = new Label(result, SWT.NONE);
- label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
- label.setText(Messages.REFACTORINGPAGE_SCOPE_LABEL);
-
- fSelectParticipants = new Combo(result, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
- fSelectParticipants.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false, 1, 1));
- fSelectParticipants.add(Messages.REFACTORINGPAGE_SCOPE_MODEL);
- fSelectParticipants.add(Messages.REFACTORINGPAGE_SCOPE_SELECTION);
- // Default selection
- fSelectParticipants.select(ALL_MODEL_REFACTOR);
-
-
- Composite composite = new Composite(result, SWT.NONE);
- GridLayout layout2 = new GridLayout();
- layout2.numColumns = 1;
- composite.setLayout(layout2);
-
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
- data.verticalIndent = 8;
- composite.setLayoutData(data);
-
- createContent(composite);
-
- }
-
- /**
- * @see org.eclipse.papyrus.refactoring.refactoringOnElement.AbstractTransformationOnElement#getElementsListToTransform()
- *
- * @return
- * The elements found inside the scope of the transformation
- */
- @Override
- public Collection<EObject> getElementsListToTransform() {
- if (fSelectParticipants.getSelectionIndex() == ALL_MODEL_REFACTOR) {
- return PapyrusRefactoringUtils.getAllElements(fModelSet);
- } else if (fSelectParticipants.getSelectionIndex() == SELECTED_ELEMENTS_REFACTOR) {
- return PapyrusRefactoringUtils.getSelectedElements(fModelSet);
- }
- return null;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractSelectedElementsTransformation.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractSelectedElementsTransformation.java
deleted file mode 100644
index e3888933815..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/helper/AbstractSelectedElementsTransformation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.helper;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.AbstractTransformationOnElement;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-
-
-/**
- * Clients who want to implement a Papyrus Refactoring which affects only the selected elements by the user may override this class.
- * By overriding this class you don't need to override {@link #getElementsListToTransform()}
- *
- */
-public abstract class AbstractSelectedElementsTransformation extends AbstractTransformationOnElement {
-
- /**
- * Constructor.
- *
- * @param label
- * The name of the user input page (name of the transformation)
- */
- public AbstractSelectedElementsTransformation(String label) {
- super(label);
- }
-
- @Override
- public Collection<EObject> getElementsListToTransform() {
- return PapyrusRefactoringUtils.getSelectedElements(fModelSet);
- }
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/Messages.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/Messages.java
deleted file mode 100644
index e9e08428f69..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/Messages.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.refactoring.messages.messages"; //$NON-NLS-1$
-
- public static String PAPYRUSCHANGE_CHECKVALIDITY;
- public static String PAPYRUSCHANGE_MODELOPEN_ERROR;
- public static String PAPYRUSCHANGE_PREVIEWPROJECT_NAME;
- public static String PAPYRUSCHANGE_PREVIEWMODEL_NAME;
- public static String PAPYRUSCHANGE_PREVIEWCREATION_ERROR;
- public static String PAPYRUSCHANGE_PREVIEW_PERFORM;
- public static String PAPYRUSCHANGE_SET_PERFORM;
-
- public static String PAPYRUSREFACTORING_CHECKPRECONDITIONS;
- public static String PAPYRUSREFACTORING_RESOURCEOPEN_ERROR;
- public static String PAPYRUSREFACTORING_MODELVALIDITY;
- public static String PAPYRUSREFACTORING_MODELVALIDITY_ERROR;
- public static String PAPYRUSREFACTORING_EXECUTE;
-
- public static String UNDOPAPYRUSCHANGE_ERROR;
- public static String UNDOPAPYRUSCHANGE_EXECUTE;
- public static String UNDOPAPYRUSCHANGE_VALIDITYCHECK;
-
- public static String REFACTORINGPAGE_SCOPE_LABEL;
- public static String REFACTORINGPAGE_SCOPE_MODEL;
- public static String REFACTORINGPAGE_SCOPE_SELECTION;
-
- public static String PAPYRUSCOMPOSITECHANGE_CHANGELABEL_BEGIN;
- public static String PAPYRUSCOMPOSITECHANGE_CHANGELABEL_END;
- public static String PAPYRUSCOMPOSITECHANGE_PREVIEWPROJECT_NAME;
- public static String PAPYRUSCOMPOSITECHANGE_PREVIEWMODEL_NAME;
- public static String PAPYRUSCOMPOSITECHANGE_PREVIEWMODEL_CREATIONERROR;
-
- public static String PAPYRUSREFACTORPREVIEW_CHANGEDMODEL;
- public static String PAPYRUSREFACTORPREVIEW_ORIGINALMODEL;
- public static String PAPYRUSREFACTORPREVIEW_CHANGEDETAILS;
-
- public static String PAPYRUSREFACTORING_REPLACE_LABEL;
- public static String REFACTORINGPAGE_REPLACE_HINT;
- public static String REFACTORINGPAGE_REPLACE_EQUALERROR;
- public static String REFACTORINGPAGE_REPLACE_ORIGINALSTRINGLABEL;
- public static String REFACTORINGPAGE_REPLACE_TOREPLACESTRINGLABEL;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/messages.properties b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/messages.properties
deleted file mode 100644
index ba2f1b85369..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/messages/messages.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-PAPYRUSCHANGE_CHECKVALIDITY=Checking validity of the transformation
-PAPYRUSCHANGE_MODELOPEN_ERROR=Impossible to open the model
-PAPYRUSCHANGE_PREVIEWPROJECT_NAME=.org.eclipse.papyrus.infra.refactoring.projectForPreview
-PAPYRUSCHANGE_PREVIEWMODEL_NAME=/previewFile.di
-PAPYRUSCHANGE_PREVIEWCREATION_ERROR=Error during the creation of the preview model
-PAPYRUSCHANGE_PREVIEW_PERFORM=Perform Change on Preview_
-PAPYRUSCHANGE_SET_PERFORM=Perform Change on Set_
-
-PAPYRUSREFACTORING_CHECKPRECONDITIONS=Checking preconditions
-PAPYRUSREFACTORING_RESOURCEOPEN_ERROR=Error opening resource
-PAPYRUSREFACTORING_MODELVALIDITY=Checking conditions and model validity
-PAPYRUSREFACTORING_MODELVALIDITY_ERROR=After executing this refactoring the model won't be valid
-PAPYRUSREFACTORING_EXECUTE=Operating transformation
-
-UNDOPAPYRUSCHANGE_ERROR=Can not undo this operation
-UNDOPAPYRUSCHANGE_EXECUTE=Performing undo
-UNDOPAPYRUSCHANGE_VALIDITYCHECK=Checking validity conditions
-
-REFACTORINGPAGE_SCOPE_LABEL=Apply refactor on:
-REFACTORINGPAGE_SCOPE_MODEL=All model
-REFACTORINGPAGE_SCOPE_SELECTION=Selected elements
-
-PAPYRUSCOMPOSITECHANGE_CHANGELABEL_BEGIN=<
-PAPYRUSCOMPOSITECHANGE_CHANGELABEL_END=>
-PAPYRUSCOMPOSITECHANGE_PREVIEWPROJECT_NAME=.org.eclipse.papyrus.infra.refactoring.projectForPreview
-PAPYRUSCOMPOSITECHANGE_PREVIEWMODEL_NAME=/previewFile.di
-PAPYRUSCOMPOSITECHANGE_PREVIEWMODEL_CREATIONERROR=Error during the creation of the preview model
-
-PAPYRUSREFACTORPREVIEW_CHANGEDMODEL=Refactored model
-PAPYRUSREFACTORPREVIEW_ORIGINALMODEL=Original model
-PAPYRUSREFACTORPREVIEW_CHANGEDETAILS=Details
-
-PAPYRUSREFACTORING_REPLACE_LABEL=Replace
-REFACTORINGPAGE_REPLACE_HINT=Please indicate the new value which should replace the original.
-REFACTORINGPAGE_REPLACE_EQUALERROR=Original and new strings are same.
-REFACTORINGPAGE_REPLACE_ORIGINALSTRINGLABEL=&Replace:
-REFACTORINGPAGE_REPLACE_TOREPLACESTRINGLABEL=&With:
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/AbstractTransformationOnElement.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/AbstractTransformationOnElement.java
deleted file mode 100644
index 71778a69f11..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/AbstractTransformationOnElement.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.refactoringOnElement;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.refactoring.core.AbstractPapyrusTransformation;
-
-/**
- * Clients who want to apply a transformation on a specified list of element should override this class
- *
- */
-public abstract class AbstractTransformationOnElement extends AbstractPapyrusTransformation {
-
- public static final int ALL_MODEL_REFACTOR = 0;
- public static final int SELECTED_ELEMENTS_REFACTOR = 1;
-
- /**
- * Constructor.
- *
- * @param label
- * The name of the user input page (name of the transformation)
- */
- public AbstractTransformationOnElement(String label) {
- super(label);
- }
-
-
- @Override
- public void execute(ModelSet modelSetToTransform) {
- if (fElementToTransform != null) {
- // TODO return a status if the operations resulting in the mutation cannot be done
- // e.g. an association in an artifact
- transformElement(fElementToTransform);
- }
- }
-
- /** Return the list of elements which may be affected by the refactoring */
- public abstract Collection<EObject> getElementsListToTransform();
-
- /** @return The implementation of {@link ITransformationOnElement} */
- public abstract ITransformationOnElement getTransformationOnElement();
-
- /**
- *
- * @param elementToTransform
- * the element that will be transformed.
- */
- private void transformElement(EObject elementToTransform) {
- ITransformationOnElement refactoring = getTransformationOnElement();
- refactoring.transformationToExecute(elementToTransform);
- }
-
- @Override
- public void setElementToTransform(EObject elementToTransform) {
- fElementToTransform = elementToTransform;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ITransformationOnElement.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ITransformationOnElement.java
deleted file mode 100644
index cc96d04a7d6..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ITransformationOnElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.refactoringOnElement;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Interface to be implemented by clients who override {@link AbstractTransformationOnElement}
- *
- */
-public abstract interface ITransformationOnElement {
-
-
- /**
- * Runs the transformation using the given element.
- *
- * @param element
- * the {@link EObject} on which the transformation will be done.
- */
- public void transformationToExecute(EObject element);
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusCompositeChange.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusCompositeChange.java
deleted file mode 100644
index e2f5b0f1b0f..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusCompositeChange.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.refactoringOnElement;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-//import org.eclipse.emf.compare.Comparison;
-//import org.eclipse.emf.compare.EMFCompare;
-//import org.eclipse.emf.compare.scope.DefaultComparisonScope;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.papyrus.infra.core.Activator;
-import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelsReader;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
-import org.eclipse.papyrus.infra.emf.utils.ResourceUtils;
-import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
-import org.eclipse.papyrus.refactoring.core.IPreviewablePapyrusChange;
-import org.eclipse.papyrus.refactoring.messages.Messages;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * {@link CompositeChange} for managing {@link AbstractTransformationOnElement}.
- * It is composed of {@link PapyrusRefactoringOnElementChange}.
- *
- */
-public class PapyrusCompositeChange extends CompositeChange implements IPreviewablePapyrusChange {
-
- /** The ModelSet on which we apply the change */
- private ModelSet fModelSet;
-
- /** The Papyrus Refactoring to execute */
- private AbstractTransformationOnElement fPapyrusRefactoringTransformation;
-
- /** The virtual {@link ModelSet} on which we executed the refactoring. */
- private ModelSet fPreviewModelSet;
-
- /** The Change to execute */
- private Change perfomChange;
-
-
- /**
- * Constructor.
- *
- * @param papyrusRefactoringPage
- * The page contributed to the Refactoring wizard
- * @param modelSet
- * The modelSet to which w eapply the Change
- */
- public PapyrusCompositeChange(AbstractTransformationOnElement papyrusRefactoringPage, ModelSet modelSet) {
- super(papyrusRefactoringPage.getName());
- fPapyrusRefactoringTransformation = papyrusRefactoringPage;
- fModelSet = modelSet;
-
- // Display.getDefault().syncExec(new Runnable() {
- Display.getDefault().asyncExec(new Runnable() {
-
- @Override
- public void run() {
- initChanges();
- }
- });
-
- // fPreviewModelSet = initPreviewModelSet();
- }
-
- @Override
- public Change perform(IProgressMonitor pm) throws CoreException {
- Display.getDefault().syncExec(new Runnable() {
- // Display.getDefault().asyncExec(new Runnable() {
-
- @Override
- public void run() {
- try {
- perfomChange = PapyrusCompositeChange.super.perform(pm);
- } catch (Exception e) {
- Activator.log.error(e);
- }
- }
- });
-
- return perfomChange;
- }
-
- /**
- * Create the {@link PapyrusRefactoringOnElementChange} that correspond to this refactoring.
- */
- private void initChanges() {
- createAllChanges();
-
- // The following part slows the programm considerably without adding a lot of value as the empty changes are nearly non existant
- // Executing the comparator for each change takes about .5s per change
- // A possible solution could be to execute them in multiple threads but there need to be sufficient cores on the user's end
-
- // ModelSet initialModelSet = fModelSet;
- // EMFCompare comparator = EMFCompare.builder().build();
- //
- // for (Change change : getChildren()) {
- // if (change instanceof PapyrusRefactoringOnElementChange) {
- // PapyrusRefactoringOnElementChange changeToProceed = (PapyrusRefactoringOnElementChange) change;
- // ModelSet changeModelSet = changeToProceed.getChangePreviewModelSet();
- //
- // Comparison comparison = comparator.compare(new DefaultComparisonScope(initialModelSet, changeModelSet, null));
- //
- // // If there is any difference between the original model and the refactored model, this change doesn't modify the model so it is useless, we can delete it.
- // if (comparison.getDifferences().size() == 0) {
- // System.err.println("initChanges " + changeToProceed.getModifiedElement());
- // remove(changeToProceed);
- // }
- // }
- // }
- }
-
- /**
- * Create one {@link PapyrusRefactoringOnElementChange} for each element from {@link AbstractTransformationOnElement#getElementsListToTransform()}.
- */
- private void createAllChanges() {
-
- for (EObject element : fPapyrusRefactoringTransformation.getElementsListToTransform()) {
- LabelProviderService labelProvider = new LabelProviderServiceImpl();
- String elementText = Messages.PAPYRUSCOMPOSITECHANGE_CHANGELABEL_BEGIN + element.eClass().getName() + Messages.PAPYRUSCOMPOSITECHANGE_CHANGELABEL_END
- + labelProvider.getLabelProvider().getText(element);
-
- // Create the PapyrusRefactoringOnElementChange
- PapyrusRefactoringOnElementChange change = new PapyrusRefactoringOnElementChange(fPapyrusRefactoringTransformation, elementText, fModelSet, element);
-
- // Add it to this CompositeChange
- this.add(change);
- }
-
- }
-
- // TODO a proper clone, so as to get the preview working !
- /**
- * Clones the current modelSet to apply it the Changes
- *
- * @return
- * The preview modelSet
- */
- public ModelSet getChangePreviewModelSet() {
- ModelSet previewModelSet = new ModelSet();
- ModelsReader reader = new ModelsReader();
- reader.readModel(previewModelSet);
- try {
- previewModelSet.loadModels(fModelSet.getURIWithoutExtension());
-
- } catch (ModelMultiException e) {
- Activator.log.error(e);
- }
-
- return previewModelSet;
- // getPreviewFile();
- // return fPreviewModelSet;
- }
-
- /**
- * Creates a copy of the original ModelSet and execute the refactoring on it.
- *
- * @return A preview file of the refactoring which shows the refactoring effects.
- */
- @Override
- public IFile getPreviewFile() {
- String nameProject = Messages.PAPYRUSCOMPOSITECHANGE_PREVIEWPROJECT_NAME;
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- IProject project = root.getProject(nameProject);
- // System.err.println("getPreviewFile");
-
- try {
- if (!project.exists()) {
- project.create(null);
- }
- project.open(null);
- } catch (CoreException e1) {
- Activator.log.error(e1);
- }
-
- IPath path = new Path(project.getFullPath().toString() + Messages.PAPYRUSCOMPOSITECHANGE_PREVIEWMODEL_NAME);
- IFile previewFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- fModelSet.saveCopy(path.removeFileExtension());
- ModelSet previewModelSet = new ModelSet();
- ModelsReader reader = new ModelsReader();
- reader.readModel(previewModelSet);
- // System.err.println("initPreviewModelSet");
-
- try {
- previewModelSet.loadModels(URI.createPlatformResourceURI(path.toString(), true));
- } catch (ModelMultiException e) {
- Activator.log.error(e);
- }
-
- for (Change changeChild : getChildren()) {
- if (changeChild.isEnabled()) {
- ((PapyrusRefactoringOnElementChange) changeChild).performRefactor(previewModelSet, Messages.PAPYRUSCHANGE_PREVIEW_PERFORM);
- }
- }
-
- try {
- // modelSetForPreviewFile.saveAs(URI.createPlatformResourceURI(path.toString(), true));
- previewModelSet.saveAs(URI.createPlatformResourceURI(path.toString(), true));
- } catch (IOException e) {
- Activator.log.error(e);
- }
- // Assert.isNotNull(moelSetForPreviewFile, Messages.PAPYRUSCOMPOSITECHANGE_PREVIEWMODEL_CREATIONERROR);
- Assert.isNotNull(previewModelSet, Messages.PAPYRUSCOMPOSITECHANGE_PREVIEWMODEL_CREATIONERROR);
- fPreviewModelSet = previewModelSet;
-
- return previewFile;
- }
-
-
- @Override
- public IFile getInitialFile() {
- // Resource diResource = DiModelUtils.getDiResource(fModelSet);
- Resource diResource = ((DiModel) fModelSet.getModel(DiModel.DI_MODEL_ID)).getResource();
- IFile file = ResourceUtils.getFile(diResource);
-
- return file;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusRefactoringOnElementChange.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusRefactoringOnElementChange.java
deleted file mode 100644
index bceab430eb5..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/PapyrusRefactoringOnElementChange.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.refactoringOnElement;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.refactoring.core.IPreviewablePapyrusChange;
-import org.eclipse.papyrus.refactoring.core.PapyrusChange;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-
-/**
- * A {@link Change} for managing the transformation of a specified element.
- */
-public class PapyrusRefactoringOnElementChange extends PapyrusChange {
-
- /** The element to transform */
- private EObject fElementToApplyChange;
-
-
- /**
- * Constructor.
- *
- * @param papyrusRefactoringTransformation
- * The transformation to execute
- * @param name
- * The name of the transformation
- * @param modelSet
- * The modelSet containing the element to transform
- * @param elementToTransform
- * The element to transform
- */
- public PapyrusRefactoringOnElementChange(AbstractTransformationOnElement papyrusRefactoringTransformation, String name, ModelSet modelSet, EObject elementToTransform) {
- super(papyrusRefactoringTransformation, name, modelSet);
- fModelSet = modelSet;
- fElementToApplyChange = elementToTransform;
- }
-
- /**
- * Override the perform of the original LTK Refactoring to substitute the PapyrusChange one
- *
- * @see org.eclipse.papyrus.refactoring.core.PapyrusChange#performRefactor(org.eclipse.papyrus.infra.core.resource.ModelSet, java.lang.String)
- *
- * @param modelSet
- * The modelSet containing the element to transform
- * @param label
- * The label of the transformation
- * @return
- * The change computed for the transformation
- */
- @Override
- protected Change performRefactor(ModelSet modelSet, String label) {
- EObject elementToApplyRefactoring = PapyrusRefactoringUtils.findEObjectInModelSet(fElementToApplyChange, modelSet);
- ((AbstractTransformationOnElement) fPapyrusRefactoringTransformation).setElementToTransform(elementToApplyRefactoring);
-
- return super.performRefactor(modelSet, label);
- }
-
- /**
- * @see org.eclipse.papyrus.refactoring.core.PapyrusChange#getPreviewFile()
- *
- * @return
- * The modified model's IFile
- */
- @Override
- public IFile getPreviewFile() {
- return ((IPreviewablePapyrusChange) getParent()).getPreviewFile();
- }
-
- /**
- * @see org.eclipse.papyrus.refactoring.core.PapyrusChange#getModifiedElement()
- *
- * @return
- * The element to modify
- */
- @Override
- public Object getModifiedElement() {
- return fElementToApplyChange;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ReplaceTransformationOnElement.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ReplaceTransformationOnElement.java
deleted file mode 100644
index 26826ec0464..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/refactoringOnElement/ReplaceTransformationOnElement.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.refactoringOnElement;
-
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
-import org.eclipse.papyrus.uml.search.ui.query.PapyrusQuery;
-import org.eclipse.papyrus.views.search.regex.PatternHelper;
-import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
-import org.eclipse.papyrus.views.search.results.AttributeMatch;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Stereotype;
-
-/**
- * Class used to replace Strings in the model depending on the scope previously selected by the user
- *
- */
-public class ReplaceTransformationOnElement implements ITransformationOnElement {
-
- /** The {@link AbstractResultEntry} list representing textual matches with the String pattern to be replaced */
- private Set<AbstractResultEntry> fAttributeMatchList;
-
- /** The {@link AbstractPapyrusQuery} representing the search of matches */
- private AbstractPapyrusQuery fQuery;
-
- /** The string that should replace the String pattern to be replaced */
- private String fNewString;
-
-
- /**
- * Constructor.
- *
- * @param toProcess
- * The results of the query
- * @param query
- * The {@link org.eclipse.papyrus.uml.search.ui.query.PapyrusQuery PapyrusQuery} used to get the occurrences to replace
- * @param newString
- * The string to replace in the selected scope
- */
- public ReplaceTransformationOnElement(Set<AbstractResultEntry> toProcess, AbstractPapyrusQuery query, String newString) {
- fAttributeMatchList = toProcess;
- fQuery = query;
- fNewString = newString;
- }
-
- /**
- * Verify that the string can indeed be replaced in the parsed element
- *
- * @see org.eclipse.papyrus.refactoring.refactoringOnElement.ITransformationOnElement#transformationToExecute(org.eclipse.emf.ecore.EObject)
- *
- * @param element
- * Executes the replacement in all the occurrences of the string in the provided element wherever possible
- */
- @Override
- public void transformationToExecute(EObject element) {
- for (AbstractResultEntry match : fAttributeMatchList) {
- if (match.getSource() instanceof EObject && match instanceof AttributeMatch) {
- AttributeMatch attributeMatch = (AttributeMatch) match;
- if (EcoreUtil.equals(element, (EObject) match.getSource())) {
- Object attributeObject = attributeMatch.getMetaAttribute();
- // Object attributeObject = attributeMatch.getSource();
-
- if (attributeObject instanceof EAttribute) {
- EAttribute eAttribute = (EAttribute) attributeObject;
- // This test is to prevent any attempt to edit a non-existent feature or a non changeable feature
- if (element.eGet(eAttribute, true) != null && eAttribute.isChangeable()) {
- Object value = element.eGet(eAttribute);
-
- if (value != null) {
- if (value instanceof String) {
- String originalvalue = (String) value;
- Pattern pattern = PatternHelper.getInstance().createPattern(fQuery.getSearchQueryText(), fQuery.isCaseSensitive(), fQuery.isRegularExpression());
-
- String newValue = computeReplacementString(pattern, originalvalue, fNewString);
-
- element.eSet(eAttribute, newValue);
- }
- }
- }
- }
-
- else if (attributeObject instanceof Property) {
- Property source = (Property) attributeObject;
- Class containingClass = source.getClass_();
-
- if (containingClass instanceof Stereotype) {
- if (element instanceof Element) {
- Stereotype stereotype = ((Element) element).getAppliedStereotype(containingClass.getQualifiedName());
- Object tagValue = ((Element) element).getValue(stereotype, source.getName());
- if (tagValue instanceof String) {
- Object value = tagValue;
-
- if (value != null) {
- if (value instanceof String) {
- String originalvalue = (String) value;
- Pattern pattern = PatternHelper.getInstance().createPattern(fQuery.getSearchQueryText(), fQuery.isCaseSensitive(), fQuery.isRegularExpression());
-
- String newValue = computeReplacementString(pattern, originalvalue, fNewString);
-
- ((Element) element).setValue(stereotype, source.getName(), newValue);
-
- }
- }
-
- }
- }
- }
- }
- }
- }
- }
- }
-
-
- /**
- * Compute the replacement
- *
- * @param pattern
- * The pattern that we will us to compute the replacement.
- * @param originalText
- * The String to be modified.
- * @param replacementText
- * The String to append.
- * @return The new String.
- */
- private String computeReplacementString(Pattern pattern, String originalText, String replacementText) throws PatternSyntaxException {
- if (pattern != null) {
- try {
-
- Matcher matcher = pattern.matcher(originalText);
- StringBuffer sb = new StringBuffer();
- matcher.reset();
- if (matcher.find()) {
- matcher.appendReplacement(sb, replacementText);
- } else {
- return null;
- }
- matcher.appendTail(sb);
- return sb.toString();
- } catch (IndexOutOfBoundsException ex) {
- throw new PatternSyntaxException(ex.getLocalizedMessage(), replacementText, -1);
- }
- }
- return replacementText;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringPreview.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringPreview.java
deleted file mode 100644
index 73db088e2ed..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringPreview.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.ui;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.internal.CompareContainer;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.ltk.ui.refactoring.ChangePreviewViewerInput;
-import org.eclipse.ltk.ui.refactoring.IChangePreviewViewer;
-import org.eclipse.papyrus.refactoring.Activator;
-import org.eclipse.papyrus.refactoring.core.IPreviewablePapyrusChange;
-import org.eclipse.papyrus.refactoring.messages.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ViewForm;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
-import org.eclipse.team.internal.ui.synchronize.SaveablesCompareEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The purpose of this class is to show the user the differences between the original model and the model after the transformation.
- *
- */
-@SuppressWarnings("restriction")
-public class PapyrusRefactoringPreview implements IChangePreviewViewer {
-
- /** Main composite of the preview page */
- private ViewForm fComposite;
-
- /** Change storing the intial and preview file */
- private IPreviewablePapyrusChange fChange;
-
- /** Control used to manipulate the page's previewed content */
- private Control fPreviewControl;
-
- /** Resource from the preview model retrieved from the previewed change */
- private IFile fPreviewResource;
-
- /** Resource from the original model retrieved from the previewed change */
- private IFile fOriginalResource;
-
-
- @Override
- public void createControl(Composite parent) {
-
- if (fComposite == null) {
- fComposite = new ViewForm(parent, SWT.NONE);
- fComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- fComposite.setLayout(new GridLayout(1, true));
- }
-
- }
-
-
- @Override
- public Control getControl() {
- return fComposite;
- }
-
-
- @Override
- public void setInput(ChangePreviewViewerInput input) {
- if (fPreviewControl != null) {
- fPreviewControl.dispose();
- }
- if (input.getChange() instanceof IPreviewablePapyrusChange) {
- setChange(input);
- CompareEditorInput preview = initiateComparison();
- if (preview != null) {
- showPreview(preview);
- }
- }
- }
-
-
- /**
- * Show the UI comparison between the original model and the refactored model
- *
- * @param preview
- * The {@link CompareEditorInput} for the comparison between the preview model and the original model
- */
- private void showPreview(final CompareEditorInput preview) {
-
- CompareUIPlugin plugin = CompareUIPlugin.getDefault();
-
-
- if (plugin != null) {
- if (plugin.compareResultOK(preview, null)) {
- Runnable runnable = new Runnable() {
-
- @Override
- public void run() {
- CompareConfiguration compareConfiguration = preview.getCompareConfiguration();
- compareConfiguration.setLeftEditable(false);
- compareConfiguration.setLeftLabel(Messages.PAPYRUSREFACTORPREVIEW_CHANGEDMODEL);
- compareConfiguration.setRightEditable(false);
- compareConfiguration.setRightLabel(Messages.PAPYRUSREFACTORPREVIEW_ORIGINALMODEL);
-
- preview.setContainer(new CompareContainer());
-
- fPreviewControl = preview.createContents(fComposite);
-
- fComposite.setContent(fPreviewControl);
- }
- };
- syncExec(runnable);
-
- fComposite.getShell().setSize(new Point(1000, 900));
- }
- }
- fPreviewControl.addDisposeListener(new DisposeListener() {
-
- @Override
- public void widgetDisposed(DisposeEvent e) {
- IProject projectToDestroy = fPreviewResource.getProject();
- if (projectToDestroy.exists()) {
- try {
- projectToDestroy.delete(true, true, new NullProgressMonitor());
- } catch (CoreException e1) {
- Activator.log.error(e1);
- }
- }
- }
- });
- }
-
- /** Sets the change variable from the input */
- private void setChange(ChangePreviewViewerInput input) {
- fChange = (IPreviewablePapyrusChange) input.getChange();
- }
-
- /** Just an util method */
- private void syncExec(Runnable runnable) {
- if (Display.getCurrent() == null) {
- Display.getDefault().syncExec(runnable);
- } else {
- runnable.run();
- }
- }
-
-
- /**
- * Do the comparison between the original and the refactored model
- *
- * @return
- * the input that enables compare to display the result of the comparison between the original and the refactored model.
- */
- private CompareEditorInput initiateComparison() {
-
- if (fOriginalResource == null) {
- fOriginalResource = fChange.getInitialFile();
- }
-
- fPreviewResource = fChange.getPreviewFile();
-
- LocalResourceTypedElement initialResource = new LocalResourceTypedElement(fPreviewResource);
- LocalResourceTypedElement previewResource = new LocalResourceTypedElement(fOriginalResource);
-
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
- IWorkbenchPage page = win.getActivePage();
- SaveablesCompareEditorInput preview = new SaveablesCompareEditorInput(null, initialResource, previewResource, page);
-
- return preview;
-
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringWizard.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringWizard.java
deleted file mode 100644
index 527e3d17f68..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusRefactoringWizard.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.ui;
-
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-import org.eclipse.papyrus.refactoring.Activator;
-import org.eclipse.papyrus.refactoring.core.PapyrusRefactoring;
-
-/**
- * {@link RefactoringWizard} for Papyrus Refactoring
- *
- * @noextend This class is not intended to be extended by clients.
- */
-public class PapyrusRefactoringWizard extends RefactoringWizard {
-
-
- /**
- * Constructor.
- *
- * @param refactoring
- * The refactoring linked to this wizard (replace, mutate, ...)
- * @param pageTitle
- * The default page title
- */
- public PapyrusRefactoringWizard(PapyrusRefactoring refactoring, String pageTitle) {
- super(refactoring, DIALOG_BASED_USER_INTERFACE | SHOW_HELP_CONTROL);
- setDefaultPageTitle(pageTitle);
- // Window.setDefaultImage(Activator.shellImage);
- }
-
- @Override
- protected void addUserInputPages() {
- // Adds the user page built with the tranformation by default
- addPage(((PapyrusRefactoring) getRefactoring()).getPapyrusTransformation());
- }
-
- @Override
- public void setContainer(IWizardContainer wizardContainer) {
- // Used to deactivate the Help button until the help is created
- super.setContainer(wizardContainer);
- if (getContainer() instanceof TrayDialog) {
- ((TrayDialog) getContainer()).setHelpAvailable(false);
- }
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusStatusContextViewer.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusStatusContextViewer.java
deleted file mode 100644
index ad1a735c528..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/PapyrusStatusContextViewer.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.ui;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.ltk.core.refactoring.RefactoringStatusContext;
-import org.eclipse.ltk.ui.refactoring.IStatusContextViewer;
-import org.eclipse.papyrus.refactoring.core.PapyrusRefactoringValidationStatusContext;
-import org.eclipse.papyrus.refactoring.messages.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Device;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.ExpandBar;
-import org.eclipse.swt.widgets.ExpandItem;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * Implementation of {@link IStatusContextViewer} to present a {@link PapyrusRefactoringValidationStatusContext} to review potential conflicts
- *
- */
-public class PapyrusStatusContextViewer implements IStatusContextViewer {
-
- /** Page's main composite doubling as the Control for the status page */
- private Composite fParentComposite;
-
- /** Child composite */
- private Composite childDiagComposite;
-
- /** Expanding the details from the status check */
- private ExpandBar fBar;
-
-
- @Override
- public void createControl(Composite parent) {
- fParentComposite = new Composite(parent, SWT.BORDER | SWT.FLAT);
- fParentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- fParentComposite.setLayout(new GridLayout(1, true));
-
- Composite detailComposite = new Composite(fParentComposite, SWT.BORDER | SWT.FLAT);
-
- detailComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- detailComposite.setLayout(new GridLayout(1, true));
-
- Device device = Display.getCurrent();
-
- fBar = new ExpandBar(detailComposite, SWT.V_SCROLL | SWT.H_SCROLL);
- fBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- fBar.setBackground(new Color(device, 255, 255, 255));
- fBar.setForeground(new Color(device, 0, 0, 255));
-
- // First item
- childDiagComposite = new Composite(fBar, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginLeft = layout.marginTop = layout.marginRight = layout.marginBottom = 10;
- layout.verticalSpacing = 10;
- childDiagComposite.setLayout(layout);
- childDiagComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
-
- }
-
- @Override
- public Control getControl() {
- return fParentComposite;
- }
-
- @Override
- public void setInput(RefactoringStatusContext input) {
- if (input instanceof PapyrusRefactoringValidationStatusContext && fBar == null) {
- Diagnostic diagnostic = ((PapyrusRefactoringValidationStatusContext) input).getfDiagnostic();
-
- for (Diagnostic childDiagnostic : diagnostic.getChildren()) {
- Label label = new Label(childDiagComposite, SWT.NONE);
- label.setText(childDiagnostic.getMessage());
- }
-
- ExpandItem item0 = new ExpandItem(fBar, SWT.V_SCROLL | SWT.H_SCROLL, 0);
- item0.setText(Messages.PAPYRUSREFACTORPREVIEW_CHANGEDETAILS);
- item0.setHeight(childDiagComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
- item0.setControl(childDiagComposite);
-
- item0.setExpanded(false);
- }
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/ReplaceRefactoring.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/ReplaceRefactoring.java
deleted file mode 100644
index fd81e136b67..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/ui/ReplaceRefactoring.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/// *****************************************************************************
-// * Copyright (c) 2016 CEA LIST.
-// *
-// *
-// * 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
-// * http://www.eclipse.org/legal/epl-v10.html
-// *
-// * Contributors:
-// * CEA LIST - Initial API and implementation
-// *
-// *****************************************************************************/
-// package org.eclipse.papyrus.refactoring.ui;
-//
-// import java.util.ArrayList;
-// import java.util.Arrays;
-// import java.util.Collection;
-// import java.util.HashSet;
-// import java.util.List;
-// import java.util.Set;
-//
-// import org.eclipse.emf.ecore.EObject;
-// import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-// import org.eclipse.papyrus.refactoring.messages.Messages;
-// import org.eclipse.papyrus.refactoring.refactoringOnElement.AbstractTransformationOnElement;
-// import org.eclipse.papyrus.refactoring.refactoringOnElement.ITransformationOnElement;
-// import org.eclipse.papyrus.refactoring.refactoringOnElement.ReplaceTransformationOnElement;
-// import org.eclipse.papyrus.uml.search.ui.pages.PapyrusSearchResultPage;
-// import org.eclipse.papyrus.uml.search.ui.query.AbstractPapyrusQuery;
-// import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
-// import org.eclipse.papyrus.views.search.results.AttributeMatch;
-// import org.eclipse.papyrus.views.search.utils.MatchUtils;
-// import org.eclipse.swt.SWT;
-// import org.eclipse.swt.layout.GridData;
-// import org.eclipse.swt.layout.GridLayout;
-// import org.eclipse.swt.widgets.Composite;
-// import org.eclipse.swt.widgets.Label;
-// import org.eclipse.swt.widgets.Text;
-//
-//
-/// **
-// * Refactoring based on the {@link org.eclipse.papyrus.uml.search.ui.pages.PapyrusSearchResultPage}
-// *
-// */
-// @SuppressWarnings("restriction")
-// public class ReplaceRefactoring extends AbstractTransformationOnElement {
-//
-// /** The String to replace the old one */
-// private Text fNewValueText;
-//
-// /** The old String to be replaced */
-// private Text fOldValueText;
-//
-// /** */
-// private PapyrusSearchResultPage fResultPage;
-//
-// private AbstractPapyrusQuery fQuery;
-//
-// private Object[] fSelection;
-//
-// private Set<AbstractResultEntry> fListMatch;
-//
-//
-// /**
-// * Constructor.
-// *
-// * @param resultPage
-// * @param selection
-// */
-// public ReplaceRefactoring(PapyrusSearchResultPage resultPage, Object[] selection) {
-// super(Messages.PAPYRUSREFACTORING_REPLACE_LABEL);
-// fResultPage = resultPage;
-// fSelection = selection;
-// fQuery = (AbstractPapyrusQuery) fResultPage.getInput().getQuery();
-// initListMatches();
-// }
-//
-//
-// private Text createNameField(Composite result) {
-// Text field = new Text(result, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
-// field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// return field;
-// }
-//
-//
-// @Override
-// public RefactoringStatus checkFinalConditions() {
-// RefactoringStatus status = new RefactoringStatus();
-//
-// if (fNewValueText.getText().isEmpty()) {
-// status.merge(RefactoringStatus.createFatalErrorStatus(Messages.REFACTORINGPAGE_REPLACE_HINT));
-// } else if (fNewValueText.getText().equals(fQuery.getSearchQueryText())) {
-// status.merge(RefactoringStatus.createFatalErrorStatus(Messages.REFACTORINGPAGE_REPLACE_EQUALERROR));
-// }
-//
-// return status;
-// }
-//
-//
-// @Override
-// public void createControl(Composite parent) {
-//
-// GridLayout layout = new GridLayout();
-//
-// Composite composite = new Composite(parent, SWT.NONE);
-// layout.marginHeight = 0;
-// layout.marginWidth = 0;
-// layout.numColumns = 2;
-// composite.setLayout(layout);
-// composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
-//
-// setControl(composite);
-//
-// Label label = new Label(composite, SWT.NONE);
-// label.setText(Messages.REFACTORINGPAGE_REPLACE_ORIGINALSTRINGLABEL);
-// fOldValueText = createNameField(composite);
-// fOldValueText.setFocus();
-// fOldValueText.setText(fQuery.getSearchQueryText());
-// fOldValueText.setEnabled(false);
-//
-// label = new Label(composite, SWT.NONE);
-// label.setText(Messages.REFACTORINGPAGE_REPLACE_TOREPLACESTRINGLABEL);
-//
-// fNewValueText = createNameField(composite);
-//
-// GridData data = new GridData();
-// data.horizontalAlignment = SWT.END;
-//
-// }
-//
-//
-// private void initListMatches() {
-// fListMatch = new HashSet<>();
-// if (fSelection == null) {
-// for (AbstractResultEntry resultEntry : MatchUtils.getMatches(fResultPage.getInput(), false)) {
-// if (resultEntry instanceof AttributeMatch) {
-// fListMatch.add(resultEntry);
-// }
-// }
-// } else {
-// for (Object selected : Arrays.asList(fSelection)) {
-// if (selected instanceof AttributeMatch) {
-// fListMatch.add((AttributeMatch) selected);
-// }
-// }
-// }
-// }
-//
-//
-// @Override
-// public Collection<EObject> getElementsListToTransform() {
-// List<EObject> toProcess = new ArrayList<>();
-// for (AbstractResultEntry match : fListMatch) {
-// if (match.getSource() instanceof EObject) {
-// if (!toProcess.contains(match.getSource())) {
-// toProcess.add((EObject) match.getSource());
-// }
-// }
-// }
-// return toProcess;
-// }
-//
-// @Override
-// public ITransformationOnElement getTransformationOnElement() {
-// return new ReplaceTransformationOnElement(fListMatch, fQuery, fNewValueText.getText());
-// }
-//
-// @Override
-// public String getName() {
-// return Messages.PAPYRUSREFACTORING_REPLACE_LABEL;
-// }
-// }
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/util/PapyrusRefactoringUtils.java b/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/util/PapyrusRefactoringUtils.java
deleted file mode 100644
index 58c40215879..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.refactoring/src/org/eclipse/papyrus/refactoring/util/PapyrusRefactoringUtils.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.util;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.refactoring.Activator;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.resource.UMLResource;
-
-/**
- * Utils methods used to browse through the UML models and their {@link org.eclipse.papyrus.infra.core.resource.ModelSet ModelSet}
- *
- */
-public class PapyrusRefactoringUtils {
-
-
- /**
- * Utils methods for refactoring.
- *
- * @param modelSet
- * The provided modelSet
- * @return
- * The EObject associated with the root of the model or null
- */
- public static EObject getUMLRoot(ModelSet modelSet) {
- try {
- UmlModel umlModel = (UmlModel) modelSet.getModelChecked(UmlModel.MODEL_ID);
- EObject root = umlModel.lookupRoot();
- return root;
- } catch (NotFoundException e) {
- Activator.log.error(e);
-
- }
- return null;
- }
-
-
- /**
- * Get the semantic element associated to the specified adapter
- *
- * @param semanticAdapter
- * The provided IAdatptable
- * @return
- * The associated EObject or null if none can be found
- */
- protected EObject getSemanticElement(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
- return null;
- }
- EObject eObject = semanticAdapter.getAdapter(EObject.class);
- if (eObject != null) {
- return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
- }
- return null;
- }
-
- /**
- * Fetch the owner of the provided element, if any
- *
- * @param element
- * The provided element
- * @return
- * The owner or itself if none can be found
- */
- public static Element getOwner(Element element) {
- Element rootElement = element;
- while (rootElement.getOwner() != null) {
- rootElement = rootElement.getOwner();
- }
-
- return rootElement;
- }
-
-
- private static EObject getRootElement(EObject element) {
- return EcoreUtil.getRootContainer(element);
- }
-
- /**
- * Get all the elements contained in the provided modelSet
- *
- * @param modelSet
- * The modelSet
- * @return
- * All the elements of the given modelSet.
- */
- public static Collection<EObject> getAllElements(ModelSet modelSet) {
- List<EObject> elements = new ArrayList<>();
- EObject root = getUMLRoot(modelSet);
- if (root != null) {
- TreeIterator<EObject> iterator = root.eAllContents();
- while (iterator.hasNext()) {
- EObject element = iterator.next();
- if (element instanceof EObject) {
- elements.add(element);
- }
- }
- }
- return elements;
- }
-
- /**
- * Method to get the selected elements in the Papyrus Editor and in the Model Explorer.
- *
- * @param modelSet
- * The modelSet on which we want to get the selected elements.
- * @return The UML elements selected by the user in the Papyrus editor.
- */
- public static Collection<EObject> getSelectedElements(ModelSet modelSet) {
- Object[] selections = lookupSelectedElements();
- Collection<EObject> results = new ArrayList<>();
- Collection<EObject> allElements = getAllElements(modelSet);
- for (Object selectedObject : selections) {
-
- EObject selectedElement = null;
- if (selectedObject instanceof GraphicalEditPart) {
- Object graphicalElement = ((GraphicalEditPart) selectedObject).getModel();
- if ((graphicalElement instanceof View) && ((View) graphicalElement).getElement() instanceof EObject) {
- selectedElement = ((View) graphicalElement).getElement();
- }
- } else if (selectedObject instanceof IAdaptable) {
- EObject selectedEObject = ((IAdaptable) selectedObject).getAdapter(EObject.class);
- if (selectedEObject instanceof EObject) {
- selectedElement = selectedEObject;
- }
- }
-
- if (selectedElement != null) {
- for (EObject modelElement : allElements) {
- if (EcoreUtil.equals(selectedElement, modelElement)) {
- results.add(modelElement);
- break;
- }
- }
- }
-
- }
- return results;
- }
-
-
- private static Collection<EObject> searchElements(EClass[] participantsTypes, ModelSet modelSet) {
- Collection<EClass> participantsTypesList = Arrays.asList(participantsTypes);
- Collection<EObject> results = new HashSet<>();
- for (EObject modelElement : getAllElements(modelSet)) {
- if (participantsTypesList.contains(modelElement.eClass())) {
- results.add(modelElement);
- }
- }
- return results;
- }
-
- /**
- * Search, in a given ModelSet, a specific EObject.
- *
- * @param target
- * The EObject to search.
- * @param modelSet
- * The modelSet from which we want the element.
- * @return The EObject wanted in the given modelSet, null if not found.
- */
- public static EObject findEObjectInModelSet(EObject target, ModelSet modelSet) {
- for (EObject element : PapyrusRefactoringUtils.getAllElements(modelSet)) {
- if (EcoreUtil.equals(element, target)) {
- return element;
- }
- }
- return null;
- }
-
- /**
- * Fetch all the currently selected elements in the active workbench window
- *
- * @return
- * The graphicaly selected elements
- */
- private static Object[] lookupSelectedElements() {
-
- IWorkbenchWindow page = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelectionService service = page.getSelectionService();
- // set structured selection
- ISelection selection = service.getSelection();
-
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- return structuredSelection.toArray();
- } else if (selection instanceof TreeSelection) {
- TreeSelection treeSelection = (TreeSelection) selection;
- return treeSelection.toArray();
- }
-
- return null;
- }
-
-
- /**
- * Get the associated UID of a selected EObject from the provided modelSet, if any
- *
- * @param element
- * The provided element
- * @param fModelSet
- * The provided modelSet in xhich the element should be
- * @return
- * The element's UID or null if it deos not exists in the provided modelSet
- */
- public static String getRelatedXMIID(EObject element, ModelSet fModelSet) {
- String oldID = null;
- for (Resource resource : fModelSet.getResources()) {
- if (!(resource instanceof UMLResource) || oldID != null) {
- continue;
- }
-
- UMLResource umlResource = (UMLResource) resource;
- oldID = umlResource.getID(element);
- }
-
- return oldID;
- }
-
- /**
- * Retrives the Eobject from its UID and the provided modelSet
- *
- * @param XMIID
- * THe provided UID
- * @param fModelSet
- * The provided modelSet in which the element should be referenced by the provided XMIID
- * @return
- * The element or null if there is no instance of the provided UID in the modelSet
- */
- public static EObject getRelatedElement(String XMIID, ModelSet fModelSet) {
- EObject eObject = null;
- for (Resource resource : fModelSet.getResources()) {
- if (!(resource instanceof UMLResource) || eObject != null) {
- continue;
- }
-
- UMLResource umlResource = (UMLResource) resource;
- eObject = umlResource.getEObject(XMIID);
- }
-
- return eObject;
- }
-
-
- private static void setXMIID(Element elementToMutate, EObject newElement, ModelSet fModelSet) {
- String oldID = getRelatedXMIID(elementToMutate, fModelSet);
- for (Resource resource : fModelSet.getResources()) {
- if (!(resource instanceof UMLResource)) {
- continue;
- }
-
- UMLResource umlResource = (UMLResource) resource;
- if (umlResource.getID(newElement) == null) {
- continue;
- }
-
- umlResource.setID(newElement, oldID);
- }
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.classpath b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.classpath
deleted file mode 100644
index 098194ca4b7..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.project b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.project
deleted file mode 100644
index f1b922ab2b4..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.refactoring.mutation</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.settings/org.eclipse.jdt.core.prefs b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363afa..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/META-INF/MANIFEST.MF b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/META-INF/MANIFEST.MF
deleted file mode 100644
index a5c90152a07..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.uml.refactoring.mutation;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.refactoring.mutation.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
- org.eclipse.core.runtime;bundle-version="3.11.0",
- org.eclipse.ltk.core.refactoring;bundle-version="3.6.200",
- org.eclipse.ltk.ui.refactoring;bundle-version="3.7.200",
- org.eclipse.uml2.uml;bundle-version="5.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="2.0.0",
- org.eclipse.papyrus.refactoring;bundle-version="0.0.1",
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
- org.eclipse.emf.ecore;bundle-version="2.11.0",
- org.eclipse.emf.transaction;bundle-version="1.9.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.9.0",
- org.eclipse.gmf.runtime.notation.edit;bundle-version="1.7.0",
- org.eclipse.papyrus.uml.diagram.usecase;bundle-version="2.0.0",
- org.eclipse.papyrus.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.views.modelexplorer.newchild,
- org.eclipse.papyrus.infra.newchild,
- org.eclipse.help;bundle-version="3.6.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.papyrus.commands,
- org.eclipse.papyrus.infra.services.labelprovider.service,
- org.eclipse.papyrus.infra.services.labelprovider.service.impl,
- org.eclipse.papyrus.uml.diagram.profile.custom.requests
-Bundle-Vendor: %vendorName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.papyrus.uml.refactoring.mutation.helper,
- org.eclipse.papyrus.uml.refactoring.mutation.ui,
- org.eclipse.papyrus.uml.refactoring.mutation.utils
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/about.html b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/build.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/build.properties
deleted file mode 100644
index 69d0f2e3ef2..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- icons/,\
- about.html
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/images/mutate.png b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/images/mutate.png
deleted file mode 100644
index c53f93a7372..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/images/mutate.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate-toc.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate-toc.xml
deleted file mode 100644
index f139ba4494b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate-toc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<toc label="Mutate" link_to="../org.eclipse.papyrus.refactoring/doc/refactoring_user_guide.xml#refactoring_list" topic="doc/mutate.html">
- <topic href="doc/mutate.html" label="Mutate">
- </topic>
-
-</toc>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.html b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.html
deleted file mode 100644
index 106729ec556..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>
-<body>
- <h1 id="Mutate">Mutate</h1>
- <p>The "mutate" refactoring gives the user the possibility to change the type of an UML element.
- You can select several elements but they have to be instances of the same type to execute this refactoring. </p>
- <p>The following image illustrates the Mutate refactoring dialog.</p><p><img border="0" src="images/mutate.png"/> </p>
- <p>All the types are displayed in a list refined from the selected element and its context. You have to select the type the selected element(s) will be instance(s) of.</p>
-</body>
-</html> \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.mediawiki b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.mediawiki
deleted file mode 100644
index 8ed1aed55e6..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/doc/mutate.mediawiki
+++ /dev/null
@@ -1,11 +0,0 @@
-=Mutate=
-
-The "mutate" refactoring gives the user the possibility to change the type of an UML element.
-You can select several elements but they have to be instances of the same type to execute this refactoring.
-
-The following image illustrates the Mutate refactoring dialog.
-
-
-[[image:images/mutate.png]]
-
-All the types are displayed in a list refined from the selected element and its context. You have to select the new type the selected element(s) will be instance(s) of. \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/icons/refactor.png b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/icons/refactor.png
deleted file mode 100644
index 049da9f00bd..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/icons/refactor.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.properties
deleted file mode 100644
index 96a71dee738..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2015 CEA LIST.
-#
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - initial API and implementation
-
-pluginName=Papyrus Refactoring Mutation
-vendorName=Eclipse Modeling Project
-
-mutationContribution.label=Mutate
-mutationContribution.tooltip=Mutate an element into another (e.g. Class into Interface)
-mutationCommand.name=MutationCommand \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.xml
deleted file mode 100644
index e8a6e8cc96b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/plugin.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.refactoring.menu?after=org.eclipse.papyrus.refactoring.replace.command">
- <command
- commandId="org.eclipse.papyrus.refactoring.mutation.command"
- id="org.eclipse.papyrus.refactoring.mutation"
- icon="icons/refactor.png"
- label="%mutationContribution.label"
- style="push"
- tooltip="%mutationContribution.tooltip">
- </command>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.papyrus.refactoring.mutation.command"
- name="%mutationCommand.name">
- </command>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.refactoring.mutation.handler.MutationHandler"
- commandId="org.eclipse.papyrus.refactoring.mutation.command">
- </handler>
- </extension>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="doc/mutate-toc.xml"
- primary="false">
- </toc>
- </extension>
-
-</plugin>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/pom.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/pom.xml
deleted file mode 100644
index 55f89b1f416..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.eclipse.papyrus.uml.refactoring.mutation</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <groupId>org.eclipse.papyrus</groupId>
- <packaging>eclipse-plugin</packaging>
- <parent>
- <relativePath>../../../releng/extra</relativePath>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
- <version>${mylyn.wikitext.version}</version>
- <configuration>
- <sourceFolder>doc</sourceFolder>
- <outputFolder>${project.build.directory}/site/generated-eclipse-help</outputFolder>
- <multipleOutputFiles>false</multipleOutputFiles>
- <navigationImages>true</navigationImages>
- <formatOutput>true</formatOutput>
- <htmlFilenameFormat>$1.html</htmlFilenameFormat>
- <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
- <helpPrefix>target/site/generated-eclipse-help</helpPrefix>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>eclipse-help</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.mediawiki.core</artifactId>
- <version>${mylyn.wikitext.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/Activator.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/Activator.java
deleted file mode 100644
index 11b27aeb324..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/Activator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.mutation"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- public static String REFACTORING_MUTATION_TRACE = "MutationTrace";
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/handler/MutationHandler.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/handler/MutationHandler.java
deleted file mode 100644
index a38a0e56515..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/handler/MutationHandler.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.papyrus.refactoring.core.PapyrusRefactoringOperation;
-import org.eclipse.papyrus.uml.refactoring.mutation.ui.MutationRefactoring;
-
-
-/**
- * Handler called by the dropdown menu to mutate the selected element
- *
- */
-public class MutationHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- MutationRefactoring mutationRefactoring = new MutationRefactoring();
- PapyrusRefactoringOperation operation = new PapyrusRefactoringOperation(mutationRefactoring);
- operation.run();
- return null;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/helper/MutationTransformation.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/helper/MutationTransformation.java
deleted file mode 100644
index 6862af59108..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/helper/MutationTransformation.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.helper;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewRefactorHelper;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.AbstractEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticElementAdapter;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.visualtype.VisualTypeService;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.ITransformationOnElement;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-import org.eclipse.papyrus.uml.refactoring.mutation.Activator;
-import org.eclipse.papyrus.uml.refactoring.mutation.utils.ElementCreationUtils;
-import org.eclipse.papyrus.uml.refactoring.mutation.utils.ModelNotationUtils;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.DirectedRelationship;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Relationship;
-import org.eclipse.uml2.uml.Stereotype;
-
-/**
- * Class use to mutate an UML element
- *
- */
-public class MutationTransformation extends ViewRefactorHelper implements ITransformationOnElement {
- /** The ModelSet where the element is defined. */
- private ModelSet fModelSet;
-
- /** The {@link IElementEditService} related to the new metaClass. */
- private IElementEditService fProvider;
-
- /** The elementType the element will be an instance of. */
- private IElementType fNewElementType;
-
- /** The actual metaClass the element is an instance of. */
- private EClass fOldMetaClass;
-
- /** The new element created */
- private EObject newElement;
-
- /** The new view created */
- private View newView;
-
- /** The container of the new element */
- private EObject fContainer;
-
-
- /**
- * Basic Constructor
- *
- * @param modelSet
- * @param metaClassToMutate
- * @param typeSelected
- */
- public MutationTransformation(ModelSet modelSet, EClass metaClassToMutate, IElementType typeSelected) {
- fModelSet = modelSet;
- fNewElementType = typeSelected;
- fOldMetaClass = metaClassToMutate;
- }
-
- /**
- * Constructor used in case of a relationship transformation or if the user wants to specify the container
- *
- * @param modelSet
- * @param metaClassToMutate
- * @param typeSelected
- * @param container
- */
- public MutationTransformation(ModelSet modelSet, EClass metaClassToMutate, IElementType typeSelected, EObject container) {
- fModelSet = modelSet;
- fNewElementType = typeSelected;
- fOldMetaClass = metaClassToMutate;
- fContainer = container;
- }
-
-
- @Override
- public void transformationToExecute(EObject element) {
- if (fContainer != null) {
- mutateElement(element, fContainer);
- } else {
- mutateElement(element, element.eContainer());
- }
- }
-
- /**
- * Execute the steps to Mutate the element.
- *
- * @param oldElement
- * The {@link EObject} to Mutate.
- */
- private void mutateElement(EObject oldElement, EObject parent) {
-
- if (oldElement.eClass() != fOldMetaClass) {
- return;
- }
-
- fProvider = ElementEditServiceUtils.getCommandProvider(fNewElementType);
- if (fProvider == null) {
- return;
- }
-
- EObject newElement = createElement(fNewElementType, parent, oldElement);
- if (newElement == null
- || !(newElement instanceof Element && oldElement instanceof Element)) {
- return;
- }
-
- Element elementToMutate = (Element) oldElement;
- Element mutatedElement = (Element) newElement;
-
- copyAppliedStereotypes(elementToMutate, mutatedElement);
- copyStructuralFeaturesValue(elementToMutate, mutatedElement);
-
- reorientRelationship(elementToMutate, mutatedElement);
- moveOwnedElements(elementToMutate, mutatedElement);
- updateReferences(elementToMutate, mutatedElement);
-
- updateNotation(elementToMutate, mutatedElement);
-
- destroyElement(elementToMutate);
- this.newElement = newElement;
-
- }
-
- /**
- * Update the *.notation file to add the newElement's view to the model
- *
- * @param elementToMutate
- * The old element
- * @param newElement
- * The new element
- */
- private void updateNotation(Element elementToMutate, EObject newElement) {
- View oldView = ModelNotationUtils.getRelatedView(elementToMutate, fModelSet);
-
- // Create a View corresponding to the new element based on the old configuration
- if (oldView != null) {
- if (oldView instanceof Node) {
- createNewNode((Node) oldView, newElement);
- }
- if (oldView instanceof Edge) {
- createNewEdge((Edge) oldView, newElement);
- }
- }
- }
-
- /**
- * Create a new node to replace the old one
- *
- * @param oldNode
- * @param newElement
- */
- private void createNewNode(Node oldNode, EObject newElement) {
- // New view inside its designed container or the default
- View containerView = ViewUtil.getViewContainer(oldNode);
- // if (containerView == null) {
- View containerView2 = fContainer != null ? ModelNotationUtils.getRelatedView(fContainer, fModelSet) : null;
- // }
- String visualID = VisualTypeService.getInstance().getNodeType(containerView, newElement);
-
- Node newNode = ViewService.createNode(containerView, newElement, visualID, getPreferencesHint());
-
- if (newNode != null) {
- copyNodeFeatures(oldNode, newNode);
- addOldVisibleChildren(newNode, ModelNotationUtils.getVisibleChildren(oldNode));
- }
-
- newView = newNode;
- }
-
-
- /**
- * Find, if any exists, the corresponding type from *.elementtypeconfigurations in *di.elementtypeconfigurations
- * used to find and create the visual representation of the element
- *
- * @param visualID
- * @return
- * The {@link ISpecializationType} corresponding to the {@link IElementType} selected
- */
- private ISpecializationType getSpecializationType(String visualID) {
- // TODO find a better way to filter the found element, e.g. ask the user which he wants
- for (ISpecializationType specializationType : ElementTypeRegistry.getInstance().getSpecializationsOf(fNewElementType.getId())) {
- if (!(specializationType instanceof IHintedType)) {
- continue;
- }
-
- IHintedType hintedType = (IHintedType) specializationType;
- if (hintedType.getSemanticHint().equalsIgnoreCase(visualID)) {
- // A type has been found
- return specializationType;
- }
- }
-
- return null;
- }
-
- /**
- * Add the pertinent views to the notation node depending on th previous visibility
- *
- * @param newView
- * @param oldVisibleChildren
- */
- private void addOldVisibleChildren(View newView, Set<View> oldVisibleChildren) {
- EObject newViewElement = newView.getElement();
- for (View oldViewChild : oldVisibleChildren) {
- // This in order to filter out the compartments
- if (!(oldViewChild instanceof Shape || oldViewChild instanceof Edge)) {
- continue;
- }
-
- EObject oldViewChildElement = oldViewChild.getElement();
- if (newViewElement.eContents().contains(oldViewChildElement)) {
- String visualID = null;
- View newViewChild = null;
- // Iterate on the contents of the node to see who can accommodate the subNode
- for (Object object : newView.getChildren()) {
- if (!(object instanceof View) || visualID != null) {
- continue;
- }
-
- newViewChild = (View) object;
- visualID = VisualTypeService.getInstance().getNodeType(newViewChild, oldViewChildElement);
- }
-
- Node newNode = ViewService.createNode(newViewChild, oldViewChildElement, visualID, getPreferencesHint());
- if (newNode != null) {
- Node oldNode = oldViewChild instanceof Node ? (Node) oldViewChild : null;
- if (oldNode != null) {
- copyNodeFeatures(oldNode, newNode);
- }
- }
- }
- }
- }
-
- /**
- * Get hte active diagram's editPart from the multi diagram editor
- *
- * @return
- * The active diagram's DiagramEditPart
- */
- public DiagramEditPart getHost() {
- IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- PapyrusMultiDiagramEditor papyrusEditor = editorPart instanceof PapyrusMultiDiagramEditor ? (PapyrusMultiDiagramEditor) editorPart : null;
- DiagramEditPart diagramEditPart = (DiagramEditPart) papyrusEditor.getAdapter(DiagramEditPart.class);
-
- return diagramEditPart;
- }
-
- /**
- * Create a new edge to replace the old one
- *
- * @param oldEdge
- * @param newElement
- */
- private void createNewEdge(Edge oldEdge, EObject newElement) {
- // New view inside its designed container or the default
- View containerView = fContainer != null ? ModelNotationUtils.getRelatedView(fContainer, fModelSet) : ViewUtil.getViewContainer(oldEdge);
- String visualID = VisualTypeService.getInstance().getLinkType(containerView.getDiagram(), newElement);
-
- // The IElementTypes required by the creation of a graphical representation are those inside the *di.elementtypesconfigurations
- // Else the Hint required by the Providers does not match the view and the view and the view wont be created
- ISpecializationType specializationType = getSpecializationType(visualID);
- SemanticElementAdapter semanticElementAdapter = new SemanticElementAdapter(newElement, specializationType);
-
- Edge newEdge = (Edge) ViewService.getInstance().createEdge(semanticElementAdapter, oldEdge.getDiagram(),
- visualID, ViewUtil.APPEND, getPreferencesHint());
-
- if (newEdge != null) {
- // copyEdgeFeatures(oldEdge, newEdge);
- // copyStructuralFeaturesValue(oldEdge, newEdge);
- newEdge.setSource(oldEdge.getSource());
- newEdge.setSourceAnchor(oldEdge.getSourceAnchor());
- newEdge.setTarget(oldEdge.getTarget());
- newEdge.setTargetAnchor(oldEdge.getTargetAnchor());
- newEdge.setBendpoints(oldEdge.getBendpoints());
- }
-
- newView = newEdge;
- }
-
- /**
- * Create a new UML element.
- *
- * @param elementType
- * The UML elementType the new element will be instance of.
- * @param container
- * Represents the container of the new element to create.
- * @param elementToMutate
- * @return The new UML element
- */
- private Element createElement(IElementType elementType, EObject container, EObject elementToMutate) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
- CreateElementRequest creationRequest = ElementCreationUtils.createElementRequest(fNewElementType, container, elementToMutate, fModelSet);
-
- ICommand createElementCommand = createCommand(provider, creationRequest);
- executeCommand(createElementCommand);
-
- EObject newElement = creationRequest.getNewElement();
-
- return ((newElement instanceof Element) ? (Element) newElement : null);
- }
-
-
- /**
- * Apply, to a given element, the stereotypes,which are actually applied to an other UML element.
- *
- * @param elementToMutate
- * The element with the wanted stereotypes.
- * @param newElement
- * The element on which we will apply the stereotypes.
- */
- private void copyAppliedStereotypes(Element elementToMutate, Element newElement) {
- for (Stereotype stereotype : elementToMutate.getAppliedStereotypes()) {
- if (newElement.isStereotypeApplicable(stereotype)) {
- EObject stereotypeApplied = newElement.applyStereotype(stereotype);
- if (stereotypeApplied instanceof Element) {
- copyStructuralFeaturesValue(stereotype, (Element) stereotypeApplied);
- }
- }
- }
- }
-
- /**
- * Do a copy/paste of the {@link EStructuralFeature} from a source element to a target element.
- *
- * @param elementToMutate
- * The source element.
- * @param newElement
- * The target element.
- */
- private void copyStructuralFeaturesValue(Element elementToMutate, Element newElement) {
- ICommand compositeCommand = null;
-
- for (EStructuralFeature structuralFeature : elementToMutate.eClass().getEAllStructuralFeatures()) {
- if (elementToMutate.eGet(structuralFeature) != null
- && newElement.eClass().getEAllStructuralFeatures().contains(structuralFeature)
- && !newElement.eClass().getEStructuralFeature(structuralFeature.getFeatureID()).isUnsettable()) {
-
- Activator.log.trace(Activator.REFACTORING_MUTATION_TRACE, structuralFeature.getName() + ", " + elementToMutate.eGet(structuralFeature));
- // if (structuralFeature.getName().equalsIgnoreCase("owner") && newElement instanceof DirectedRelationship
- // && !(elementToMutate instanceof DirectedRelationship) && elementToMutate instanceof Relationship) {
- // SetRequest setRequest = new SetRequest(newElement, structuralFeature, fContainer);
- // compositeCommand = CompositeCommand.compose(compositeCommand, createCommand(fProvider, setRequest));
- // } else {
- SetRequest setRequest = new SetRequest(newElement, structuralFeature, elementToMutate.eGet(structuralFeature));
- compositeCommand = CompositeCommand.compose(compositeCommand, createCommand(fProvider, setRequest));
- // }
- }
- }
-
- executeCommand(compositeCommand);
- }
-
- /**
- * Move each element contained in a sourceElement to a targetElement (if the targetElement can contain the
- * element owned by the source).
- *
- * @param elementToMutate
- * @param newElement
- */
- private void moveOwnedElements(Element elementToMutate, Element newElement) {
- MoveRequest moveReq;
- ICommand compositeCommand = null;
-
- if (fProvider != null) {
- for (Element ownedElement : elementToMutate.getOwnedElements()) {
- moveReq = new MoveRequest(TransactionUtil.getEditingDomain(newElement), newElement, ownedElement);
- compositeCommand = CompositeCommand.compose(compositeCommand, createCommand(fProvider, moveReq));
- }
- }
-
- executeCommand(compositeCommand);
- }
-
- /**
- * Find all usage references of a source element, and set this references to a target element.
- *
- * @param elementToMutate
- * The source element.
- * @param newElement
- * The target element.
- */
- private void updateReferences(Element elementToMutate, Element newElement) {
- Collection<Setting> settingReferences = EcoreUtil.UsageCrossReferencer.find(elementToMutate,
- PapyrusRefactoringUtils.getAllElements(fModelSet));
- ICommand compositeCommand = null;
- Set<EObject> cacheUpdatedObjects = new HashSet<>();
-
- for (Setting setting : settingReferences) {
- EObject objectToUpdate = setting.getEObject();
- if (!cacheUpdatedObjects.contains(objectToUpdate)) {
- cacheUpdatedObjects.add(objectToUpdate);
- SetRequest setRequest = new SetRequest(setting.getEObject(), setting.getEStructuralFeature(), newElement);
- compositeCommand = CompositeCommand.compose(compositeCommand, createCommand(fProvider, setRequest));
- }
- }
-
- executeCommand(compositeCommand);
- }
-
- /**
- * Find all the {@link Relationship} in which a source element is involved, then replace this source element
- * by a target element in each {@link Relationship} found.
- *
- * @param elementToMutate
- * The source element.
- * @param newElement
- * The target element.
- */
- private void reorientRelationship(Element elementToMutate, Element newElement) {
- ICommand compositeCommand = null;
-
- for (Relationship relationship : elementToMutate.getRelationships()) {
-
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(relationship);
- ReorientRelationshipRequest reorientReq;
- if (relationship instanceof DirectedRelationship) {
- if (((DirectedRelationship) relationship).getSources().contains(elementToMutate)) {
- reorientReq = new ReorientRelationshipRequest(TransactionUtil.getEditingDomain(relationship), relationship,
- newElement, elementToMutate, ReorientRequest.REORIENT_SOURCE);
- } else {
- reorientReq = new ReorientRelationshipRequest(TransactionUtil.getEditingDomain(relationship), relationship,
- newElement, elementToMutate, ReorientRequest.REORIENT_TARGET);
- }
-
- if (provider != null && reorientReq != null) {
- compositeCommand = CompositeCommand.compose(compositeCommand, createCommand(provider, reorientReq));
- }
- } else {
- Element source = (fContainer != null && fContainer instanceof Element) ? (Element) fContainer : relationship.getRelatedElements().get(1);
-
- if (EcoreUtil.equals(source, elementToMutate)) {
- reorientReq = new ReorientRelationshipRequest(TransactionUtil.getEditingDomain(relationship), relationship,
- newElement, elementToMutate, ReorientRequest.REORIENT_SOURCE);
- } else {
- reorientReq = new ReorientRelationshipRequest(TransactionUtil.getEditingDomain(relationship), relationship,
- newElement, elementToMutate, ReorientRequest.REORIENT_TARGET);
- }
-
- if (provider != null && reorientReq != null) {
- compositeCommand = CompositeCommand.compose(compositeCommand, createCommand(provider, reorientReq));
- }
- }
- }
-
- executeCommand(compositeCommand);
- }
-
- /**
- * Destroy an element
- *
- * @param elementToDestroy
- * The element to destroy.
- */
- private void destroyElement(Element elementToDestroy) {
- DestroyElementRequest destroyReq = new DestroyElementRequest(elementToDestroy, false);
- ICommand compositeCommand = null;
-
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToDestroy);
- if (provider != null) {
- compositeCommand = CompositeCommand.compose(compositeCommand, createCommand(provider, destroyReq));
- }
-
- executeCommand(compositeCommand);
- }
-
-
-
- /**
- * Create a command for a given request
- *
- * @param request
- * The request to create the command for.
- * @return The wanted command.
- */
- private ICommand createCommand(IElementEditService provider, AbstractEditCommandRequest request) {
- ICommand command = provider.getEditCommand(request);
- return command;
- }
-
- /**
- * If the command is valid, we execute it.
- *
- * @param command
- */
- private void executeCommand(ICommand command) {
- if (command != null && command.canExecute() /* && command.canUndo() */) {
- // try {
- // command.execute(new NullProgressMonitor(), null);
- // } catch (ExecutionException e) {
- // Activator.log.error(e);
- // }
- Command emfCommand = GMFtoEMFCommandWrapper.wrap(command);
- if (emfCommand.canExecute() /* && emfCommand.canUndo() */) {
- emfCommand.execute();
- }
- }
- }
-
- public EObject getMutatedElement() {
- return newElement;
- }
-
- public View getMutatedView() {
- return newView;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/Messages.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/Messages.java
deleted file mode 100644
index a24d45506bc..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/Messages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.refactoring.Mutation.messages.messages"; //$NON-NLS-1$
-
- public static String MUTATIONREFACTORING_PAGETITLE;
- public static String MUTATIONREFACTORING_SELECTIONLABEL;
- public static String MUTATIONREFACTORING_SELECTIONWARNING_EMPTY;
- public static String MUTATIONREFACTORING_SELECTIONWARNING_UNIFORM;
-
- public static String MUTATIONREFACTORING_PAGEICON;
- public static String MUTATIONREFACTORING_PAGEICON_TYPE;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/messages.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/messages.properties
deleted file mode 100644
index 569a893c491..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/messages/messages.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-MUTATIONREFACTORING_PAGETITLE=Mutation
-MUTATIONREFACTORING_SELECTIONLABEL=Select the new type
-MUTATIONREFACTORING_SELECTIONWARNING_EMPTY=Select at least one element.
-MUTATIONREFACTORING_SELECTIONWARNING_UNIFORM=All elements selected have to be instances of the same UML metaClass.
-
-MUTATIONREFACTORING_PAGEICON=/icons/full/obj16/
-MUTATIONREFACTORING_PAGEICON_TYPE=.gif \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElemenetTypeContentProvider.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElemenetTypeContentProvider.java
deleted file mode 100644
index 2950f0ef77f..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElemenetTypeContentProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.providers;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Provider used to get the possible types for the mutated element
- *
- */
-public class ElemenetTypeContentProvider implements ITreeContentProvider {
-
- @Override
- public Object[] getElements(Object inputElement) {
- // Map<IElementType, EObject> elementsToDisaplay = new HashMap<>();
- @SuppressWarnings("unchecked")
- HashMap<IElementType, EObject> inputElements = (HashMap<IElementType, EObject>) inputElement;
- // for (IElementType elementType : inputElements) {
- // if (!(elementType instanceof IHintedType)) {
- // continue;
- // }
- //
- // elementsToDisaplay.add(elementType);
- // }
-
- return inputElements.entrySet().toArray();
- }
-
- @Override
- public void dispose() {
-
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- return null;
- }
-
- @Override
- public Object getParent(Object element) {
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- return false;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElementTypeLabelProvider.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElementTypeLabelProvider.java
deleted file mode 100644
index ed8f6832208..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/providers/ElementTypeLabelProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.providers;
-
-import java.util.Arrays;
-import java.util.Map.Entry;
-
-/**
- * Label provider used to display the possible types of the mmutated element
- *
- */
-import org.eclipse.gmf.runtime.common.ui.services.icon.IconService;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * The label provider used to display the input in the viewer
- *
- */
-public class ElementTypeLabelProvider extends LabelProvider {
-
- @Override
- public Image getImage(Object element) {
- if (element instanceof Entry) {
- Entry entry = (Entry) element;
- Object key = entry.getKey();
-
- if (key instanceof IElementType) {
- IElementType elementType = (IElementType) key;
-
- return IconService.getInstance().getIcon(elementType);
- }
- }
- return null;
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof Entry) {
- Entry entry = (Entry) element;
- Object key = entry.getKey();
-
- if (key instanceof IElementType) {
- IElementType elementType = (IElementType) key;
- String defaultName = elementType.getDisplayName();
- String name = "";
- if (defaultName.contains("::")) {
- name = Arrays.asList(elementType.getDisplayName().split("::")).get(1);
- } else {
- name = defaultName;
- }
-
- return name;
- }
- }
-
- return "ElementNotFound";
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/ui/MutationRefactoring.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/ui/MutationRefactoring.java
deleted file mode 100644
index 380383e62b6..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/ui/MutationRefactoring.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.ui;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.newchild.CreationMenuRegistry;
-import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu;
-import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder;
-import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.refactoring.Activator;
-import org.eclipse.papyrus.refactoring.helper.AbstractSelectedElementsTransformation;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.ITransformationOnElement;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-import org.eclipse.papyrus.uml.refactoring.mutation.helper.MutationTransformation;
-import org.eclipse.papyrus.uml.refactoring.mutation.messages.Messages;
-import org.eclipse.papyrus.uml.refactoring.mutation.providers.ElemenetTypeContentProvider;
-import org.eclipse.papyrus.uml.refactoring.mutation.providers.ElementTypeLabelProvider;
-import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.uml2.uml.DirectedRelationship;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Relationship;
-
-
-
-/**
- * Class used to propose the next type of the mutated element through a new wizard page and {@link AbstractSelectedElementsTransformation} used to mutate the selected elements.
- *
- */
-@SuppressWarnings("restriction")
-public class MutationRefactoring extends AbstractSelectedElementsTransformation {
-
- /** The {@link TreeViewer} that displays the UML Meta-Classes in the UI. */
- private TreeViewer fNewTypeTreeViewer;
-
- /** The {@link FilteredTree} to help the user to find the UML Meta-class he is looking for. */
- private FilteredTree fNewMetaClassTree;
-
- /** The {@link Composite} for this UI. */
- private Composite mutationComposite;
-
-
- public MutationRefactoring() {
- super(Messages.MUTATIONREFACTORING_PAGETITLE);
- }
-
- @Override
- public void createControl(Composite parent) {
- mutationComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 1;
-
- mutationComposite.setLayout(layout);
- mutationComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- setControl(mutationComposite);
-
- initElementTypesViewer();
- }
-
-
- /**
- * Initiate and display {@link #fNewTypeTreeViewer}.
- */
- private void initElementTypesViewer() {
- Label newMetaClassLabel = new Label(mutationComposite, SWT.NONE);
- newMetaClassLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
- newMetaClassLabel.setText(Messages.MUTATIONREFACTORING_SELECTIONLABEL);
-
- fNewMetaClassTree = new FilteredTree(mutationComposite, SWT.RIGHT | SWT.V_SCROLL | SWT.H_SCROLL, new PatternFilter(), true);
- fNewTypeTreeViewer = fNewMetaClassTree.getViewer();
- GridData listViewerGridData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
- listViewerGridData.heightHint = 300;
-
- fNewMetaClassTree.setLayoutData(listViewerGridData);
- fNewTypeTreeViewer.setComparator(new ViewerComparator());
-
- Map<IElementType, EObject> umlTypesInput = new HashMap<>();
- try {
- // EObject modelRoot = PapyrusRefactoringUtils.getUMLRoot(fModelSet);
- // Model model = modelRoot instanceof Model ? (Model) modelRoot : null;
- // if (model != null) {
- // for (Profile profile : model.getAllAppliedProfiles()) {
- // // TODO retrieve the elementTypes according to the applied profiles
- // }
- // }
-
-
- ElementTypeRegistry registry = ElementTypeRegistry.getInstance();
- EObject elementToMutate = getElementToMutate();
- EObject elementToMutateParent = elementToMutate.eContainer() != null ? elementToMutate.eContainer() : elementToMutate;
- IElementType relationshipType = UMLElementTypes.RELATIONSHIP;
- IClientContext clientContext = TypeContext.getContext();
- IElementType elementToMutateType = registry.getElementType(elementToMutate, clientContext);
- boolean elementToMutateIsRelationship = Arrays.asList(elementToMutateType.getAllSuperTypes()).contains(relationshipType);
-
- Set<IElementType> relationshipTypes = new HashSet<>();
- Set<IElementType> nodeTypes = new HashSet<>();
-
- for (Folder folder : CreationMenuRegistry.getInstance().getRootFolder()) {
- // System.err.println(folder.getLabel() + ", " + folder.eContents().size());
- for (EObject eObject : folder.eContents()) {
- if (eObject instanceof CreationMenu) {
- CreationMenu creationMenu = (CreationMenu) eObject;
- IElementType menuElementType = registry.getType(creationMenu.getElementTypeIdRef());
- if (menuElementType == null) {
- continue;
- }
-
- if (Arrays.asList(menuElementType.getAllSuperTypes()).contains(relationshipType)) {
- relationshipTypes.add(menuElementType);
- } else {
- nodeTypes.add(menuElementType);
- }
- }
- }
- }
-
- if (elementToMutateIsRelationship) {
- umlTypesInput = getRelationshipTypes(elementToMutateParent, elementToMutate, relationshipTypes);
- } else {
- umlTypesInput = getNodeTypes(elementToMutateParent, elementToMutate, nodeTypes);
- }
-
- umlTypesInput.remove(elementToMutateType);
- // System.err.println("finalMenu, " + umlTypesInput.size());
-
-
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
-
- fNewTypeTreeViewer.setLabelProvider(new ElementTypeLabelProvider());
- fNewTypeTreeViewer.setContentProvider(new ElemenetTypeContentProvider());
- fNewTypeTreeViewer.setInput(umlTypesInput);
-
- }
-
- /**
- * Retrieves all the possible relationship that can be created from the selected element's context
- *
- * @param elementToMutateParent
- * The relationship's container
- * @param elementToMutate
- * The relationship
- * @param relationshipTypes
- * The possible relationship types the are declared in the registry
- * @return
- * The filtered relationships to display in the viewer
- */
- private Map<IElementType, EObject> getRelationshipTypes(EObject elementToMutateParent, EObject elementToMutate, Set<IElementType> relationshipTypes) {
- Map<IElementType, EObject> filteredTypes = new HashMap<>();
-
- Relationship relationshipToMutate = (Relationship) elementToMutate;
- Element relationshipSource = null;
- Element relationshipTarget = null;
- if (relationshipToMutate instanceof DirectedRelationship) {
- // System.err.println("DirectedRelationship");
- // System.err.println(relationshipToMutate.getRelatedElements());
- relationshipSource = ((DirectedRelationship) relationshipToMutate).getSources().get(0);
- relationshipTarget = ((DirectedRelationship) relationshipToMutate).getTargets().get(0);
- } else {
- // System.err.println("Relationship");
- // System.err.println(relationshipToMutate.getRelatedElements());
- // This is to check the validity of the create command, hence the inverted ends are not that problematic
- relationshipSource = relationshipToMutate.getRelatedElements().get(1);
- relationshipTarget = relationshipToMutate.getRelatedElements().get(0);
- }
- // System.err.println(relationshipSource);
- // System.err.println(relationshipTarget);
-
- IElementEditService parentProvider = ElementEditServiceUtils.getCommandProvider(elementToMutateParent);
- IElementEditService sourceProvider = ElementEditServiceUtils.getCommandProvider(relationshipSource);
- if (parentProvider == null && sourceProvider == null) {
- return null;
- }
-
- for (IElementType elementType : relationshipTypes) {
- if (parentProvider != null) {
- ICommand createGMFCommandParent = null;
- TransactionalEditingDomain editingDomainParent = TransactionUtil.getEditingDomain(elementToMutateParent);
- CreateRelationshipRequest relationshipParentRequest = new CreateRelationshipRequest(editingDomainParent, elementToMutateParent, relationshipSource, relationshipTarget, elementType);
- createGMFCommandParent = parentProvider.getEditCommand(relationshipParentRequest);
-
- if (createGMFCommandParent != null && createGMFCommandParent.canExecute()) {
- filteredTypes.putIfAbsent(elementType, relationshipSource);
- }
- }
-
- if (sourceProvider != null) {
- ICommand createGMFCommandSource = null;
- TransactionalEditingDomain editingDomainSource = TransactionUtil.getEditingDomain(relationshipSource);
- CreateRelationshipRequest relationshipRequestSource = new CreateRelationshipRequest(editingDomainSource, relationshipSource, relationshipSource, relationshipTarget, elementType);
- createGMFCommandSource = parentProvider.getEditCommand(relationshipRequestSource);
-
- if (createGMFCommandSource != null && createGMFCommandSource.canExecute()) {
- filteredTypes.putIfAbsent(elementType, relationshipSource);
- }
- }
-
- }
-
- return filteredTypes;
- }
-
- /**
- * Retrieves all the possible nodes that can be created from the element's context
- *
- * @param elementToMutateParent
- * The element's parent
- * @param elementToMutate
- * The element
- * @param nodeTypes
- * The possible nodes that are declared in the registry
- * @return
- * The filtered nodes to be displayed in the viewer
- */
- private Map<IElementType, EObject> getNodeTypes(EObject elementToMutateParent, EObject elementToMutate, Set<IElementType> nodeTypes) {
- Map<IElementType, EObject> filteredTypes = new HashMap<>();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToMutateParent);
- if (provider == null) {
- return null;
- }
-
- for (IElementType elementType : nodeTypes) {
- ICommand createGMFCommand = null;
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(elementToMutate);
- CreateElementRequest elementRequest = new CreateElementRequest(editingDomain, elementToMutateParent, elementType);
- createGMFCommand = provider.getEditCommand(elementRequest);
-
- if (createGMFCommand == null || !createGMFCommand.canExecute()) {
- continue;
- }
- filteredTypes.putIfAbsent(elementType, elementToMutateParent);
- }
-
- return filteredTypes;
- }
-
- @Override
- public ITransformationOnElement getTransformationOnElement() {
- Entry selectedEntry = getTypeSelected(fNewTypeTreeViewer.getSelection());
- // The null condition is already checked by the finalConditions method
- IElementType selectedType = (IElementType) selectedEntry.getKey();
- EObject associatedContainer = selectedEntry.getValue() != null ? (EObject) selectedEntry.getValue() : null;
-
- MutationTransformation mutation = new MutationTransformation(fModelSet, getMetaClassToMutate(),
- selectedType, associatedContainer);
-
- return mutation;
- }
-
-
- @Override
- /**
- * Check that a meta-class is selected by the user in the {@link #fNewMetaClassTreeViewer}.
- */
- public RefactoringStatus checkFinalConditions() {
- RefactoringStatus status = new RefactoringStatus();
- if (getTypeSelected(fNewTypeTreeViewer.getSelection()) == null) {
- status.addFatalError(Messages.MUTATIONREFACTORING_SELECTIONLABEL);
- }
-
- return status;
- }
-
-
- /**
- * Verify that the operation can proceed and is not lacking parameters
- *
- * @param selection
- * The selected Type to transform the object into
- * @return
- * The {@link IElementType} that represents the new UML element.
- */
- private Entry<IElementType, EObject> getTypeSelected(ISelection selection) {
-
- if (selection instanceof IStructuredSelection) {
- Object selectedElement = ((IStructuredSelection) selection).getFirstElement();
- if (selectedElement instanceof Entry) {
- Entry selectedEntry = (Entry) selectedElement;
- Object selectedType = selectedEntry.getKey();
- Object associatedContainer = selectedEntry.getValue();
-
- if (selectedType instanceof IElementType) {
- if (associatedContainer instanceof EObject) {
- return selectedEntry;
- }
-
- // We can't simply resolve the provided container therefore fall back on the default transformation
- selectedEntry.setValue(null);
- return selectedEntry;
- }
- }
- }
-
- return null;
- }
-
-
- /**
- * Retrieves the EClass of the element to mutate
- *
- * @return
- */
- // We have checked in the checkIntialConditions method that all selected elements are instances of the same
- // UML metaClass, so to get the EClass to mutate we just need to get the EClass of one element of the selected
- // elements list.
- private EClass getMetaClassToMutate() {
- EObject elementToMutate = getElementToMutate();
- if (elementToMutate != null) {
- return elementToMutate.eClass();
- }
-
- return null;
- }
-
- /**
- * Retrieves the EObject linked to the element to mutate
- *
- * @return
- */
- private EObject getElementToMutate() {
- if (fModelSet != null) {
- Iterator<EObject> it = PapyrusRefactoringUtils.getSelectedElements(fModelSet).iterator();
- if (it.hasNext()) {
- return it.next();
- }
- }
-
- return null;
- }
-
-
- @Override
- /**
- * Check that at least one element is selected,and that all selected elements are instances of the same UML metaClass.
- */
- public RefactoringStatus checkInitialConditions() {
- RefactoringStatus status = new RefactoringStatus();
- HashSet<EClass> eClassSelectedList = new HashSet<>();
- if (PapyrusRefactoringUtils.getSelectedElements(fModelSet).size() == 0) {
- status.addFatalError(Messages.MUTATIONREFACTORING_SELECTIONWARNING_EMPTY);
-
- } else {
- for (EObject element : PapyrusRefactoringUtils.getSelectedElements(fModelSet)) {
- eClassSelectedList.add(element.eClass());
- }
-
- if (eClassSelectedList.size() != 1) {
- status.addFatalError(Messages.MUTATIONREFACTORING_SELECTIONWARNING_UNIFORM);
- }
- }
-
- return status;
- }
-
-
- @Override
- public String getName() {
- return Messages.MUTATIONREFACTORING_PAGETITLE;
- }
-
- @Override
- public void performHelp() {
- // TODO Write the help
- // http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_help_contexts.html
- PlatformUI.getWorkbench().getHelpSystem().displayHelp("help context id");
- }
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ElementCreationUtils.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ElementCreationUtils.java
deleted file mode 100644
index f4293246560..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ElementCreationUtils.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.utils;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.core.util.PackageUtil;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
-import org.eclipse.uml2.uml.DirectedRelationship;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Relationship;
-
-/**
- * Utils methods used to create new elements from the old elements when the refactoring occurs
- *
- */
-public class ElementCreationUtils {
-
- /**
- * Create a new UML element.
- *
- * @param elementType
- * The UML elementType the new element will be instance of.
- * @param container
- * Represents the container of the new element to create.
- * @param elementToMutate
- * @return The new UML element
- */
- public static CreateElementRequest createElementRequest(IElementType elementType, EObject container, EObject elementToMutate, ModelSet fModelSet) {
-
- TransactionalEditingDomain editingDomain = fModelSet.getTransactionalEditingDomain();
- if (elementToMutate instanceof Relationship) {
- Element relationshipSource = null;
- Element relationshipTarget = null;
- if (elementToMutate instanceof DirectedRelationship) {
- relationshipSource = ((DirectedRelationship) elementToMutate).getSources().get(0);
- relationshipTarget = ((DirectedRelationship) elementToMutate).getTargets().get(0);
- } else {
- relationshipSource = ((Relationship) elementToMutate).getRelatedElements().get(1);
- relationshipTarget = ((Relationship) elementToMutate).getRelatedElements().get(0);
- }
-
- return new CreateRelationshipRequest(editingDomain, container, relationshipSource, relationshipTarget, elementType);
-
- } else {
-
- return new CreateElementRequest(editingDomain, container, elementType);
- }
-
- }
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ModelNotationUtils.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ModelNotationUtils.java
deleted file mode 100644
index 9199e319519..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation/src/org/eclipse/papyrus/uml/refactoring/mutation/utils/ModelNotationUtils.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.mutation.utils;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
-import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
-import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Utils methods used to browse through the notation model
- *
- */
-public class ModelNotationUtils {
-
- /**
- * Retrieves all the {@link org.eclipse.gmf.runtime.notation.Edge edges} of the diagram
- *
- * @param cssDiagram
- * @return
- * The list of the diagram edges
- */
- public static Set<View> getAllEdges(CSSDiagram cssDiagram) {
- Set<View> allChildren = new HashSet<>();
- for (Object object : cssDiagram.getEdges()) {
- if (!(object instanceof Edge)) {
- continue;
- }
-
- Edge view = (Edge) object;
- allChildren.add(view);
- allChildren.addAll(getAllEdges(view));
- }
-
- return allChildren;
- }
-
- /**
- * Retrieves all the children {@link org.eclipse.gmf.runtime.notation.Edge edges} of the provided View
- *
- * @param currentView
- * @return
- * The list of the children edges
- */
- public static Set<View> getAllEdges(Edge currentView) {
- Set<View> allChildren = new HashSet<>();
- for (Object object : currentView.getChildren()) {
- if (!(object instanceof Edge)) {
- continue;
- }
-
- Edge view = (Edge) object;
- allChildren.add(view);
- allChildren.addAll(getAllEdges(view));
- }
-
- return allChildren;
- }
-
- /**
- * Retrieves all the {@link org.eclipse.gmf.runtime.notation.View views} of the diagram
- *
- * @param cssDiagram
- * @return
- * The list of the diagram views
- */
- public static Set<View> getAllChildren(CSSDiagram cssDiagram) {
- Set<View> allChildren = new HashSet<>();
- for (Object object : cssDiagram.getChildren()) {
- if (!(object instanceof View)) {
- continue;
- }
-
- View view = (View) object;
- allChildren.add(view);
- allChildren.addAll(getAllChildren(view));
- }
-
- return allChildren;
- }
-
- /**
- * Retrieves all the children {@link org.eclipse.gmf.runtime.notation.View views} of the provided View
- *
- * @param currentView
- * @return
- * The list of the children views
- */
- public static Set<View> getAllChildren(View currentView) {
- Set<View> allChildren = new HashSet<>();
- for (Object object : currentView.getChildren()) {
- if (!(object instanceof View)) {
- continue;
- }
-
- View view = (View) object;
- allChildren.add(view);
- allChildren.addAll(getAllChildren(view));
- }
-
- return allChildren;
- }
-
- /**
- * Get all the visible {@link org.eclipse.gmf.runtime.notation.View children} of the old node
- *
- * @param oldView
- * @return
- * The list of all the views
- */
- public static Set<View> getVisibleChildren(View oldView) {
- Set<View> visibleChildren = new HashSet<>();
-
- for (Object viewChild : oldView.getVisibleChildren()) {
- if (!(viewChild instanceof View)) {
- continue;
- }
-
- View view = (View) viewChild;
- visibleChildren.add(view);
- visibleChildren.addAll(getVisibleChildren(view));
- }
-
- return visibleChildren;
- }
-
- /**
- * Retrive the {@link org.eclipse.gmf.runtime.notation.View View} associated with the provided element in the provided model
- *
- * @param element
- * The {@link org.eclipse.emf.ecore.EObject element} to match
- * @param fModelSet
- * The {@link org.eclipse.papyrus.infra.core.resource.ModelSet model} to search
- * @return
- * The associated View or null if none can be found
- */
- public static View getRelatedView(EObject element, ModelSet fModelSet) {
-
- NotationModel notationModel = (NotationModel) fModelSet.getModel(NotationModel.MODEL_ID);
-
- CSSNotationResource notationResource = (CSSNotationResource) notationModel.getResource();
- for (EObject eObject : notationResource.getContents()) {
- if (!(eObject instanceof CSSDiagram)) {
- continue;
- }
-
- CSSDiagram cssDiagram = (CSSDiagram) eObject;
- // if (!(EcoreUtil.equals(element, cssDiagram.getElement()))) {
- // if (cssDiagram instanceof View) {
- // // The View has been found in case of the element to mutate is the root model
- // return cssDiagram;
- // }
- // }
-
- // First iterate through all the Nodes
- for (Object object : ModelNotationUtils.getAllChildren(cssDiagram)) {
- if (!(object instanceof Shape)) {
- continue;
- }
-
- Shape shape = (Shape) object;
- if (!(EcoreUtil.equals(element, shape.getElement()))) {
- continue;
- }
-
- if (object instanceof Node) {
- // The View has been found
- return (Node) object;
- }
- }
-
- // Then iterate through all the Edges
- for (Object object : ModelNotationUtils.getAllEdges(cssDiagram)) {
- if (!(object instanceof Connector)) {
- continue;
- }
-
- Connector connector = (Connector) object;
- if (!(EcoreUtil.equals(element, connector.getElement()))) {
- continue;
- }
-
- if (object instanceof Edge) {
- // The View has been found
- return (Edge) object;
- }
- }
- }
-
- // The element has no *.notation representation
- return null;
- }
-
-
- private static String getVisualID(View containerView, EObject newElement, ModelSet modelSet) {
- // View diagramView = containerView.getDiagram();
- // Diagram diagram = (Diagram) diagramView;
- // List<View> children = diagram.getChildren();
- // String diagramType = diagram.getType();
- //
- // DropObjectsRequest dropRequest = new DropObjectsRequest();
- // RequestUtils.setUseGUI(dropRequest, false);
- // dropRequest.setObjects(Collections.singletonList(newElement));
- // dropRequest.setLocation(new Point());
-
- // DiagramExpansionsRegistry registry = new DiagramExpansionsRegistry();
- // UseContext useContent = registry.getUsage(diagramType);
- // ChildrenListRepresentation childrenListRepresentation = registry.mapChildreen.get(diagramType);
- // List<String> childrenList = childrenListRepresentation.parentChildrenRelation.get(diagramType);
-
- IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- PapyrusMultiDiagramEditor papyrusEditor = editorPart instanceof PapyrusMultiDiagramEditor ? (PapyrusMultiDiagramEditor) editorPart : null;
- // DiagramEditPart diagramEditPart = multiDiagramEditor.getDiagramEditPart();
- // diagramEditPart.getChildren();
- DiagramEditPart diagramEditPart = (DiagramEditPart) papyrusEditor.getAdapter(DiagramEditPart.class);
- // List<EditPart> childrenPart = diagramEditPart.getChildren();
- // for (EditPart editPart : childrenPart) {
- // GraphicalEditPart graphicalEditPart = editPart instanceof GraphicalEditPart ? (GraphicalEditPart) editPart : null;
- // if (EcoreUtil.equals(containerView.getElement(), graphicalEditPart.getNotationView().getElement())) {
- // Command command = graphicalEditPart.getCommand(dropRequest);
- // editPart.getViewer().getEditDomain().getCommandStack().execute(command);
- // }
- // }
- // if (EcoreUtil.equals(containerView.getElement(), diagramEditPart.getNotationView().getElement())) {
- // Command command = diagramEditPart.getCommand(dropRequest);
- // diagramEditPart.getViewer().getEditDomain().getCommandStack().execute(command);
- // }
-
-
-
- return null;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.classpath b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.classpath
deleted file mode 100644
index ad32c83a788..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.project b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.project
deleted file mode 100644
index ebf256381bf..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.refactoring.qvtTransformation</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.settings/org.eclipse.jdt.core.prefs b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 3d20f96b316..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Aug 25 14:15:47 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/META-INF/MANIFEST.MF b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/META-INF/MANIFEST.MF
deleted file mode 100644
index b6eca214b11..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.uml.refactoring.qvtTransformation;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.refactoring.qvttransformation.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
- org.eclipse.core.runtime;bundle-version="3.11.0",
- org.eclipse.core.resources;bundle-version="3.9.100",
- org.eclipse.emf.ecore;bundle-version="2.11.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0",
- org.eclipse.m2m.qvt.oml;bundle-version="3.5.0",
- org.eclipse.m2m.qvt.oml.runtime;bundle-version="3.5.0",
- org.eclipse.m2m.qvt.oml.common;bundle-version="3.5.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.ltk.core.refactoring;bundle-version="3.6.200",
- org.eclipse.ltk.ui.refactoring;bundle-version="3.7.200",
- org.eclipse.papyrus.refactoring;bundle-version="0.0.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-Vendor: %vendorName
-Bundle-Localization: plugin
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/about.html b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/build.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/build.properties
deleted file mode 100644
index 23d6cb6d05c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- plugin.properties,\
- about.html
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/refactor.png b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/refactor.png
deleted file mode 100644
index 049da9f00bd..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/refactor.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/transformationIcon.gif b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/transformationIcon.gif
deleted file mode 100644
index 2c1ceaf036e..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/icons/transformationIcon.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.properties
deleted file mode 100644
index fd08ce804d8..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2015 CEA LIST.
-#
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - initial API and implementation
-
-pluginName=Papyrus Refactoring QvtTransformation
-vendorName=Eclipse Modeling Project
-
-transformationContribution.label=QVT Transformation
-transformationContribution.tooltip=Execute a QVT transformation model selected from the workspace
-transformationCommand.name=QVT Transformation \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.xml
deleted file mode 100644
index aeaa42c8b8b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/plugin.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <!-- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.refactoring.menu?after=org.eclipse.papyrus.refactoring.mutation">
- <command
- commandId="org.eclipse.papyrus.refactoring.qvtTransformation.command"
- id="org.eclipse.papyrus.refactoring.qvtTransformation.command"
- icon="icons/refactor.png"
- label="%transformationContribution.label"
- style="push"
- tooltip="%transformationContribution.tooltip">
- </command>
- </menuContribution> -->
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.papyrus.refactoring.qvtTransformation.command"
- name="%transformationCommand.name">
- </command>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.refactoring.qvttransformation.handler.SelectQVTTransformationHandler"
- commandId="org.eclipse.papyrus.refactoring.qvtTransformation.command">
- </handler>
- </extension>
-
-</plugin>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/pom.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/pom.xml
deleted file mode 100644
index 86dc268f8dd..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.eclipse.papyrus.uml.refactoring.qvtTransformation</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <groupId>org.eclipse.papyrus</groupId>
- <packaging>eclipse-plugin</packaging>
- <parent>
- <relativePath>../../../releng/extra</relativePath>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-</project>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/Activator.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/Activator.java
deleted file mode 100644
index 52f17a2c028..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/Activator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.qvttransformation;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.qvtTransformation"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/handler/SelectQVTTransformationHandler.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/handler/SelectQVTTransformationHandler.java
deleted file mode 100644
index bdc9026015d..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/handler/SelectQVTTransformationHandler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.qvttransformation.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.papyrus.refactoring.core.PapyrusRefactoringOperation;
-import org.eclipse.papyrus.refactoring.qvttransformation.popup.actions.SelectQVTTransformation;
-
-/**
- * handler linked to refactoring the dropdown menu for the QVTo transformation
- *
- */
-public class SelectQVTTransformationHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- PapyrusRefactoringOperation refactoringOperation = new PapyrusRefactoringOperation(new SelectQVTTransformation());
- refactoringOperation.run();
- return null;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/popup/actions/SelectQVTTransformation.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/popup/actions/SelectQVTTransformation.java
deleted file mode 100644
index 0bf911ab6d8..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation/src/org/eclipse/papyrus/refactoring/qvttransformation/popup/actions/SelectQVTTransformation.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.qvttransformation.popup.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.m2m.internal.qvt.oml.common.MdaException;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtInterpretedTransformation;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter;
-import org.eclipse.m2m.internal.qvt.oml.runtime.project.QvtTransformation.TransformationParameter.DirectionKind;
-import org.eclipse.m2m.qvt.oml.BasicModelExtent;
-import org.eclipse.m2m.qvt.oml.ExecutionContextImpl;
-import org.eclipse.m2m.qvt.oml.ModelExtent;
-import org.eclipse.m2m.qvt.oml.TransformationExecutor;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.refactoring.core.AbstractPapyrusTransformation;
-import org.eclipse.papyrus.refactoring.qvttransformation.Activator;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * This class implements a possible integration of QVTo transformation in Papyrus
- *
- */
-@SuppressWarnings("restriction")
-public class SelectQVTTransformation extends AbstractPapyrusTransformation {
-
- private IFile fTransformationFile;
- private TreeViewer fViewer;
- private Composite selectionComposite;
-
-
- public SelectQVTTransformation() {
- super("QVT Transformation");
- }
-
-
- @Override
- public RefactoringStatus checkFinalConditions() {
- RefactoringStatus status = new RefactoringStatus();
- if (((IStructuredSelection) fViewer.getSelection()).size() == 0) {
- status.addFatalError("You have to select one \"qvto\" file.");
- } else if (((IStructuredSelection) fViewer.getSelection()).size() > 1) {
- status.addFatalError("You can not select several files.");
- } else {
- Object selectedElement = ((IStructuredSelection) fViewer.getSelection()).getFirstElement();
- if (selectedElement instanceof IFile) {
- fTransformationFile = (IFile) selectedElement;
- if (!fTransformationFile.getFileExtension().contains("qvt")) {
- status.addFatalError("You have to select a \"qvto\" file.");
- }
- }
- }
-
- return status;
- }
-
-
- @Override
- public void execute(ModelSet modelSetToTransform) {
-
- // Reification of the transformation
- QvtTransformation transfo = new QvtInterpretedTransformation(fTransformationFile);
- // Retrieve transformation's parameters
- List<TransformationParameter> params;
- try {
- params = transfo.getParameters();
-
- // The transformation must have only one parameter.
- if (params.size() == 1) {
- // Retrieve first parameter's metamodels
- List<EPackage> metamodels = params.get(0).getMetamodels();
-
- // The parameter must be INOUT and it only have UML as metamodel
- if (params.get(0).getDirectionKind() == DirectionKind.INOUT && metamodels.size() == 1 && metamodels.get(0).getNsPrefix().compareToIgnoreCase("uml") == 0) {
-
- // Define the command in Papyrus' editing domain
-
- URI uri = URI.createPlatformResourceURI(fTransformationFile.getFullPath().toString(), true);
-
- // Create a executor for the transformation
- TransformationExecutor executor = new TransformationExecutor(uri);
-
- // Define the input as the model that contains the selected diagramEditPart
- List<EObject> contents = new ArrayList<EObject>();
-
- if (PapyrusRefactoringUtils.getSelectedElements(modelSetToTransform).size() == 0) {
- contents.add(PapyrusRefactoringUtils.getUMLRoot(modelSetToTransform));
- } else {
- contents.addAll(PapyrusRefactoringUtils.getSelectedElements(modelSetToTransform));
- }
-
-
- ModelExtent input = new BasicModelExtent(contents);
- // ModelExtent output = new BasicModelExtent();
-
- ExecutionContextImpl context = new ExecutionContextImpl();
- // Execute the transformation
-
- // ExecutionDiagnostic diagnostic = executor.execute(context, input);
- executor.execute(context, input);
-
- }
- }
- } catch (MdaException e) {
- Activator.log.error(e);
- }
-
- }
-
-
- @Override
- public void createControl(Composite parent) {
-
- selectionComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 1;
-
- selectionComposite.setLayout(layout);
- selectionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- setControl(selectionComposite);
-
- fViewer = new TreeViewer(selectionComposite, SWT.FILL);
- fViewer.setContentProvider(new BaseWorkbenchContentProvider());
- fViewer.setLabelProvider(new WorkbenchLabelProvider());
- fViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
-
- GridData data = new GridData(GridData.FILL_BOTH);
- Tree treeWidget = fViewer.getTree();
- treeWidget.setLayoutData(data);
- treeWidget.setFont(parent.getFont());
- }
-
- @Override
- public void performHelp() {
- // TODO Write the help
- // http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_help_contexts.html
- PlatformUI.getWorkbench().getHelpSystem().displayHelp("help context id");
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.classpath b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.classpath
deleted file mode 100644
index 098194ca4b7..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project
deleted file mode 100644
index f1a1f592967..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.refactoring.replace</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363afa..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF
deleted file mode 100644
index 8794cc69ebc..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.uml.refactoring.replace;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.refactoring.replace.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="3.107.0",
- org.eclipse.core.runtime;bundle-version="3.11.0",
- org.eclipse.ltk.core.refactoring;bundle-version="3.6.200",
- org.eclipse.ltk.ui.refactoring;bundle-version="3.7.200",
- org.eclipse.papyrus.uml.search.ui;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.refactoring;bundle-version="0.0.1",
- org.eclipse.uml2.uml;bundle-version="5.1.0",
- org.eclipse.help;bundle-version="3.6.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: %vendorName
-Bundle-Localization: plugin
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/about.html b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties
deleted file mode 100644
index 2dfc6eae828..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- plugin.xml,\
- icons/,\
- about.html
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.png b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.png
deleted file mode 100644
index 7ebcbfc693b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/images/replace.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml
deleted file mode 100644
index 26a1b8a5033..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace-toc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<toc label="Replace" link_to="../org.eclipse.papyrus.refactoring/doc/refactoring_user_guide.xml#refactoring_list" topic="doc/replace.html">
- <topic href="doc/replace.html" label="Replace">
- </topic>
-
-</toc>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html
deleted file mode 100644
index 6c2ce2758ea..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head>
-<body>
- <h1 id="Replace">Replace</h1>
- <p>The replace refactoring permits to replace all occurrences of a string by another string.</p>
- <p>The following image illustrates the Replace refactoring dialog.</p><p><img border="0" src="images/replace.png"/></p>
- <ul>
- <li>In the A area the user indicates the string to be replaced and the new string which should replace the old.</li>
- <li>In the B area the user indicates if the refactoring should consider the case when it finds the old string. </li>
- <li>In the C area the user indicates if the wants to replace only name or all strings.</li>
- </ul>
-</body>
-</html> \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki
deleted file mode 100644
index 41f333f5ef5..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/doc/replace.mediawiki
+++ /dev/null
@@ -1,11 +0,0 @@
-=Replace=
-
-The replace refactoring permits to replace all occurrences of a string by another string.
-
-The following image illustrates the Replace refactoring dialog.
-
-[[image:images/replace.png]]
-
-* In the A area the user indicates the string to be replaced and the new string which should replace the old.
-* In the B area the user indicates if the refactoring should consider the case when it finds the old string.
-* In the C area the user indicates if the wants to replace only name or all strings. \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.png b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.png
deleted file mode 100644
index 049da9f00bd..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/icons/refactor.png
+++ /dev/null
Binary files differ
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties
deleted file mode 100644
index 9e0e186c950..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (c) 2015 CEA LIST.
-#
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - initial API and implementation
-
-pluginName=Papyrus Refactoring Replace
-vendorName=Eclipse Modeling Project
-
-replaceContribution.label=Replace
-replaceContribution.tooltip=Replace the specified Strings in the model
-replaceCommand.name=ReplaceCommand \ No newline at end of file
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml
deleted file mode 100644
index 1506692da9c..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/plugin.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.refactoring.menu?after=additions">
- <command
- commandId="org.eclipse.papyrus.refactoring.replace.command"
- id="org.eclipse.papyrus.refactoring.replace.command"
- icon="icons/refactor.png"
- label="%replaceContribution.label"
- style="push"
- tooltip="%replaceContribution.tooltip">
- </command>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.papyrus.refactoring.replace.command"
- name="%replaceCommand.name">
- </command>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.refactoring.replace.handler.ReplaceHandler"
- commandId="org.eclipse.papyrus.refactoring.replace.command">
- </handler>
- </extension>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="doc/replace-toc.xml"
- primary="false">
- </toc>
- </extension>
-
-</plugin>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml
deleted file mode 100644
index 3ef2532bde4..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.eclipse.papyrus.uml.refactoring.replace</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <groupId>org.eclipse.papyrus</groupId>
- <packaging>eclipse-plugin</packaging>
- <parent>
- <relativePath>../../../releng/extra</relativePath>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
- <version>${mylyn.wikitext.version}</version>
- <configuration>
- <sourceFolder>doc</sourceFolder>
- <outputFolder>${project.build.directory}/site/generated-eclipse-help</outputFolder>
- <multipleOutputFiles>false</multipleOutputFiles>
- <navigationImages>true</navigationImages>
- <formatOutput>true</formatOutput>
- <htmlFilenameFormat>$1.html</htmlFilenameFormat>
- <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
- <helpPrefix>target/site/generated-eclipse-help</helpPrefix>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>eclipse-help</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.mylyn.docs</groupId>
- <artifactId>org.eclipse.mylyn.wikitext.mediawiki.core</artifactId>
- <version>${mylyn.wikitext.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java
deleted file mode 100644
index b87cce6e1a1..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/Activator.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.refactoring.replace"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java
deleted file mode 100644
index 7db4300bb3f..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/handler/ReplaceHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.papyrus.refactoring.core.PapyrusRefactoringOperation;
-import org.eclipse.papyrus.uml.refactoring.replace.ui.ReplaceRefactoring;
-
-/**
- * Replace handler linked to the dropdown menu
- *
- */
-public class ReplaceHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ReplaceRefactoring replaceRefactoring = new ReplaceRefactoring();
- PapyrusRefactoringOperation operation = new PapyrusRefactoringOperation(replaceRefactoring);
- operation.run();
- return null;
- }
-
-
-
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java
deleted file mode 100644
index 77fa1c877de..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/Messages.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.refactoring.replace.messages.messages"; //$NON-NLS-1$
-
- public static String REPLACEREFACTORING_PAGELABEL;
- public static String REPLACEREFACTORING_INITALTEXT;
- public static String REPLACEREFACTORING_NEWTEXT;
- public static String REPLACEREFACTORING_INITIALTEXT_LABEL;
- public static String REPLACEREFACTORING_CASE;
- public static String REPLACEREFACTORING_NEWTEXT_LABEL;
- public static String REPLACEREFACTORING_NAMESCOPE;
- public static String REPLACEREFACTORING_MODELSCOPE;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties
deleted file mode 100644
index b6d630c642f..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/messages/messages.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-REPLACEREFACTORING_PAGELABEL=Replace
-REPLACEREFACTORING_INITALTEXT=Please indicate the original value which should be replaced.
-REPLACEREFACTORING_NEWTEXT=Please indicate the new value which should replace the original.
-REPLACEREFACTORING_INITIALTEXT_LABEL=&Replace:
-REPLACEREFACTORING_CASE=Case sensitive
-REPLACEREFACTORING_NEWTEXT_LABEL=&With:
-REPLACEREFACTORING_NAMESCOPE=&Replace only name
-REPLACEREFACTORING_MODELSCOPE=&Replace all strings
diff --git a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java b/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java
deleted file mode 100644
index 7f4e8fd550b..00000000000
--- a/extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace/src/org/eclipse/papyrus/uml/refactoring/replace/ui/ReplaceRefactoring.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.refactoring.replace.ui;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
-import org.eclipse.papyrus.refactoring.helper.AbstractChoiceOnUIParticipantsTransformation;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.ITransformationOnElement;
-import org.eclipse.papyrus.refactoring.refactoringOnElement.ReplaceTransformationOnElement;
-import org.eclipse.papyrus.uml.refactoring.replace.messages.Messages;
-import org.eclipse.papyrus.uml.search.ui.query.PapyrusQuery;
-import org.eclipse.papyrus.views.search.scope.ScopeEntry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * Refactoring Participant defining the Replace dialog and specifying the methods to call for a replace action
- *
- */
-public class ReplaceRefactoring extends AbstractChoiceOnUIParticipantsTransformation {
-
- /** The field where the user indicates the new string. */
- private Text fNewValueText;
-
- /** The field where the user indicates the string to replace. */
- private Text fOldValueText;
-
- /** A button to know if the string indicated by the user is case sensitive. */
- private Button fBtnCaseSensitive;
-
- /** A button to indicate if we have to replace all strings. */
- private Button fReplaceAllStringAttributes;
-
- /** A button to indicate if we have to replace only the name. */
- private Button fReplaceNameAttribute;
-
-
- /**
- * Constructor.
- *
- */
- public ReplaceRefactoring() {
- super(Messages.REPLACEREFACTORING_PAGELABEL);
- // super(Messages.ReplaceRefactoring_8);
- }
-
- /**
- * Create a {@link Text} in a composite.
- *
- * @param result
- * The composite where we have to create the {@link Text}.
- * @return
- * The {@link Text} created.
- */
- private Text createNameField(Composite result) {
- Text field = new Text(result, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
- field.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return field;
- }
-
-
-
- @Override
- public RefactoringStatus checkFinalConditions() {
- RefactoringStatus status = new RefactoringStatus();
- if (fOldValueText.getText().isEmpty()) {
- status.merge(RefactoringStatus.createFatalErrorStatus(Messages.REPLACEREFACTORING_INITALTEXT));
- } else if (fNewValueText.getText().isEmpty()) {
- status.merge(RefactoringStatus.createFatalErrorStatus(Messages.REPLACEREFACTORING_NEWTEXT));
-
- }
- return status;
- }
-
-
- @Override
- public void createContent(Composite parent) {
-
- GridLayout layout = new GridLayout();
-
- Composite composite = new Composite(parent, SWT.NONE);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 3;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
- Label label = new Label(composite, SWT.NONE);
- label.setText(Messages.REPLACEREFACTORING_INITIALTEXT_LABEL);
- fOldValueText = createNameField(composite);
- fOldValueText.setFocus();
-
- fBtnCaseSensitive = new Button(composite, SWT.CHECK);
- fBtnCaseSensitive.setText(Messages.REPLACEREFACTORING_CASE);
-
- label = new Label(composite, SWT.NONE);
- label.setText(Messages.REPLACEREFACTORING_NEWTEXT_LABEL);
-
- fNewValueText = createNameField(composite);
-
- GridData data = new GridData();
- data.horizontalAlignment = SWT.END;
-
-
- fReplaceNameAttribute = new Button(parent, SWT.RADIO);
- fReplaceNameAttribute.setText(Messages.REPLACEREFACTORING_NAMESCOPE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- data.verticalIndent = 15;
- fReplaceNameAttribute.setLayoutData(data);
- fReplaceNameAttribute.setSelection(true);
-
- fReplaceAllStringAttributes = new Button(parent, SWT.RADIO);
- fReplaceAllStringAttributes.setText(Messages.REPLACEREFACTORING_MODELSCOPE);
- GridData data2 = new GridData(GridData.FILL_HORIZONTAL);
-
-
- data2.horizontalSpan = 3;
- fReplaceAllStringAttributes.setLayoutData(data2);
-
- }
-
-
- @Override
- public ITransformationOnElement getTransformationOnElement() {
-
- Collection<ScopeEntry> scpEntry = new ArrayList<>();
- scpEntry.add(createScopeEntry());
- PapyrusQuery query = new PapyrusQuery(fOldValueText.getText(), fBtnCaseSensitive.getSelection(), false, scpEntry, getMetaClassesList(), fReplaceAllStringAttributes.getSelection());
- query.run(new NullProgressMonitor());
- return new ReplaceTransformationOnElement(query.getResults(), query, fNewValueText.getText());
- }
-
- /**
- * Retrieves all the metaclasses of the UMLPackage in order to parse the model during the search query
- *
- * @return
- * The list containing the metaclasses
- */
- private Object[] getMetaClassesList() {
- Set<EClassifier> umlMetaClasses = new HashSet<>();
- for (EClassifier eClassifier : UMLPackage.eINSTANCE.getEClassifiers()) {
- if (eClassifier instanceof EClass) {
- umlMetaClasses.add(eClassifier);
- }
- }
- return umlMetaClasses.toArray();
- }
-
- /**
- * Sets the entry, i.e. the scope of the query, as the selected element's model
- *
- * @return
- */
- private ScopeEntry createScopeEntry() {
- // Resource diResource = DiModelUtils.getDiResource(fModelSet);
- Resource diResource = ((DiModel) fModelSet.getModel(DiModel.DI_MODEL_ID)).getResource();
- return new ScopeEntry(diResource.getURI());
- }
-
-
- @Override
- public String getName() {
- return Messages.REPLACEREFACTORING_PAGELABEL;
- }
-
- @Override
- public void performHelp() {
- // TODO Write the help
- // http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_help_contexts.html
- PlatformUI.getWorkbench().getHelpSystem().displayHelp("help context id");
- }
-
-}
-
-
diff --git a/releng/extra-tests/pom.xml b/releng/extra-tests/pom.xml
index af1b000dfb5..a7997085802 100755
--- a/releng/extra-tests/pom.xml
+++ b/releng/extra-tests/pom.xml
@@ -32,8 +32,6 @@
<module>../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests</module>
<module>../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests</module>
- <!-- <module>../../tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests</module> -->
-
<!-- Temporarily disabled - Bug 490206 -->
<!-- module>../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests</module-->
diff --git a/releng/extra/pom.xml b/releng/extra/pom.xml
index f956b9826de..8cde5a5d7c7 100644
--- a/releng/extra/pom.xml
+++ b/releng/extra/pom.xml
@@ -83,12 +83,6 @@
<module>../../extraplugins/migration/org.eclipse.papyrus.m2m.qvto</module>
<module>../../extraplugins/migration/org.eclipse.papyrus.migration.rsa</module>
- <!-- Refactoring plugins -->
- <module>../../extraplugins/refactoring/org.eclipse.papyrus.refactoring</module>
- <module>../../extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.mutation</module>
- <!-- <module>../../extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.qvtTransformation</module> -->
- <module>../../extraplugins/refactoring/org.eclipse.papyrus.uml.refactoring.replace</module>
-
<!-- Papyrus 4 Education -->
<module>../../extraplugins/papyrus4education/org.eclipse.papyrus.uml.diagram.education</module>
<module>../../features/papyrus-extra-features/org.eclipse.papyrus.uml.diagram.education.feature</module>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath
deleted file mode 100644
index eca7bdba8f0..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project
deleted file mode 100644
index c9d720467a4..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.refactoring.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61dca8..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index e8b0c46af47..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.refactoring.tests
-Bundle-Version: 0.0.1.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.ui.workbench;bundle-version="3.108.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
- org.eclipse.papyrus.refactoring;bundle-version="0.0.1",
- org.eclipse.core.resources;bundle-version="3.11.0",
- org.eclipse.emf.transaction;bundle-version="1.9.0",
- org.eclipse.papyrus.junit.utils;bundle-version="2.0.0",
- org.eclipse.uml2.uml;bundle-version="5.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="2.0.0",
- org.eclipse.ltk.core.refactoring;bundle-version="3.7.0",
- org.eclipse.papyrus.infra.emf.gmf;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="2.0.0",
- org.eclipse.papyrus.uml.refactoring.mutation;bundle-version="0.0.1",
- org.eclipse.papyrus.infra.types;bundle-version="2.0.0",
- org.eclipse.papyrus.infra.types.core;bundle-version="2.0.0",
- org.eclipse.emf.ecore;bundle-version="2.12.0",
- org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.7.0"
-Bundle-Vendor: %vendorName
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties
deleted file mode 100644
index 34d2e4d2dad..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch
deleted file mode 100644
index e1bc69fd4b2..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/org.eclipse.papyrus.refactoring.tests.launch
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<listAttribute key="classFilters">
-<listEntry value="ClassFilter(include, *test)"/>
-</listAttribute>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.refactoring.tests"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.papyrus.refactoring.tests"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.refactoring.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties
deleted file mode 100644
index b137e2296f0..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2015 CEA LIST.
-#
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - initial API and implementation
-
-pluginName=Refactoring Tests
-vendorName=Eclipse Modeling Project
-
-refactoringContribution.label=Refactor
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml
deleted file mode 100644
index 32ca213a8f3..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.eclipse.papyrus.refactoring.tests</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <groupId>org.eclipse.papyrus</groupId>
- <packaging>eclipse-test-plugin</packaging>
- <parent>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.extra.tests.releng</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/extra-tests/pom.xml</relativePath>
- </parent>
-</project>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di
deleted file mode 100644
index 8634d4c00e0..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.di
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation
deleted file mode 100644
index 2b0b49a3ec5..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.notation
+++ /dev/null
@@ -1,268 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_Kn1_kDxlEeahauIA6xbtgA" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_LuBkgDxlEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_LuDZsDxlEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_LuDZsTxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_LuDZsjxlEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_LuEAwDxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_LuEAwTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_LuEAwjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_LuEAwzxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuEAxDxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_LuEAxTxlEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_LuEAxjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_LuEAxzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_LuEAyDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuEAyTxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_LuEAyjxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_LuEAyzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_LuEAzDxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_LuEAzTxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuEAzjxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LuBkgTxlEeahauIA6xbtgA" x="40" y="40"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_NzL6MDxlEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_NzNIUDxlEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_NzNIUTxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_NzNIUjxlEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_NzNIUzxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <children xmi:type="notation:Shape" xmi:id="_YQJBQDxlEeahauIA6xbtgA" type="Property_ClassAttributeLabel">
- <element xmi:type="uml:Property" href="mainPModel1.uml#_YP_3UDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_YQJBQTxlEeahauIA6xbtgA"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_NzNIVDxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_NzNIVTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_NzNIVjxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzNIVzxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_NzNIWDxlEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_NzNIWTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_NzNIWjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_NzNIWzxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzNIXDxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_NzNIXTxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_NzNIXjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_NzNIXzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_NzNIYDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzNIYTxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_NzKFADxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NzL6MTxlEeahauIA6xbtgA" x="40" y="200" width="141"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_bSpI8DxlEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_bSpI8jxlEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_bSpI8zxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bSpwADxlEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_bSpwATxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_bSpwAjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bSpwAzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bSpwBDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpwBTxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_bSpwBjxlEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_bSpwBzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bSpwCDxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bSpwCTxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpwCjxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_bSpwCzxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_bSpwDDxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bSpwDTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bSpwDjxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpwDzxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_bSmFoDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bSpI8TxlEeahauIA6xbtgA" x="40" y="360" width="141"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_d-gSQDxlEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_d-gSQjxlEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_d-g5UDxlEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_d-g5UTxlEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_d-g5UjxlEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_d-g5UzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_d-g5VDxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_d-g5VTxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-g5VjxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_d-g5VzxlEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_d-g5WDxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_d-g5WTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_d-g5WjxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-g5WzxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_d-g5XDxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_d-g5XTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_d-g5XjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_d-g5XzxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-g5YDxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_d-cn4DxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_d-gSQTxlEeahauIA6xbtgA" x="360" y="360" width="141" height="101"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_q4y-cDxlEeahauIA6xbtgA" type="Package_Shape" fillColor="8905185">
- <children xmi:type="notation:DecorationNode" xmi:id="_q4zlgDxlEeahauIA6xbtgA" type="Package_NameLabel"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_q40MkDxlEeahauIA6xbtgA" type="Package_PackagedElementCompartment">
- <children xmi:type="notation:Shape" xmi:id="_t7rgoDxlEeahauIA6xbtgA" type="Package_Shape_CN">
- <children xmi:type="notation:DecorationNode" xmi:id="_t7sHsDxlEeahauIA6xbtgA" type="Package_NameLabel_CN"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_t7sHsTxlEeahauIA6xbtgA" type="Package_PackagedElementCompartment_CN">
- <children xmi:type="notation:Shape" xmi:id="_zZcw4DxlEeahauIA6xbtgA" type="Class_Shape_CN">
- <children xmi:type="notation:DecorationNode" xmi:id="_zZdX8DxlEeahauIA6xbtgA" type="Class_NameLabel_CN"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_zZdX8TxlEeahauIA6xbtgA" type="Class_FloatingNameLabel_CN">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_zZdX8jxlEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_zZdX8zxlEeahauIA6xbtgA" type="Class_AttributeCompartment_CN">
- <children xmi:type="notation:Shape" xmi:id="_8-hCIDxvEeahauIA6xbtgA" type="Property_ClassAttributeLabel" fontColor="15053796" fontHeight="12">
- <element xmi:type="uml:Property" href="mainPModel1.uml#_8-PVUDxvEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_8-hCITxvEeahauIA6xbtgA"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_zZdX9DxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_zZdX9TxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_zZdX9jxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZdX9zxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_zZd_ADxlEeahauIA6xbtgA" type="Class_OperationCompartment_CN">
- <styles xmi:type="notation:TitleStyle" xmi:id="_zZd_ATxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_zZd_AjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_zZd_AzxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZd_BDxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_zZd_BTxlEeahauIA6xbtgA" type="Class_NestedClassifierCompartment_CN">
- <styles xmi:type="notation:TitleStyle" xmi:id="_zZd_BjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_zZd_BzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_zZd_CDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZd_CTxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_zZPVgDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zZcw4TxlEeahauIA6xbtgA" x="14" y="32" width="141" height="101"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_2C7UkDxlEeahauIA6xbtgA" type="Component_Shape_CN" fillColor="15053796">
- <children xmi:type="notation:DecorationNode" xmi:id="_2C77oDxlEeahauIA6xbtgA" type="Component_NameLabel_CN"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_2C77oTxlEeahauIA6xbtgA" type="Component_FloatingNameLabel_CN">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_2C77ojxlEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_2C77ozxlEeahauIA6xbtgA" type="Component_AttributeCompartment_CN">
- <styles xmi:type="notation:TitleStyle" xmi:id="_2C77pDxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_2C77pTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_2C77pjxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C77pzxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_2C77qDxlEeahauIA6xbtgA" visible="false" type="Component_OperationCompartment_CN">
- <styles xmi:type="notation:TitleStyle" xmi:id="_2C77qTxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_2C77qjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_2C77qzxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C77rDxlEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_2C77rTxlEeahauIA6xbtgA" visible="false" type="Component_NestedClassifierCompartment_CN">
- <styles xmi:type="notation:TitleStyle" xmi:id="_2C77rjxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_2C77rzxlEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_2C77sDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C77sTxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Component" href="mainPModel1.uml#_2CsrEDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2C7UkTxlEeahauIA6xbtgA" x="254" y="32" width="141" height="101"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_B9L_ZD6QEeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_B9L_ZT6QEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_B9L_Zz6QEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_zZPVgDxlEeahauIA6xbtgA"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_B9L_Zj6QEeahauIA6xbtgA" x="214" y="32"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_t7sHsjxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t7sHszxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Package" href="mainPModel1.uml#_t7ghgDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t7rgoTxlEeahauIA6xbtgA" x="14" y="12" width="421" height="201"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_q40MkTxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q40MkjxlEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Package" href="mainPModel1.uml#_q4v7IDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q4y-cTxlEeahauIA6xbtgA" x="40" y="520" width="461" height="261"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_JzBxJD4KEeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_JzBxJT4KEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_JzBxJz4KEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_d-cn4DxlEeahauIA6xbtgA"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JzBxJj4KEeahauIA6xbtgA" x="560" y="360"/>
- </children>
- <styles xmi:type="notation:StringValueStyle" xmi:id="_Kn1_kTxlEeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_Kn1_kjxlEeahauIA6xbtgA"/>
- <styles xmi:type="style:PapyrusViewStyle" xmi:id="_Kn1_kzxlEeahauIA6xbtgA">
- <owner xmi:type="uml:Model" href="mainPModel1.uml#_KnzjUDxlEeahauIA6xbtgA"/>
- </styles>
- <element xmi:type="uml:Model" href="mainPModel1.uml#_KnzjUDxlEeahauIA6xbtgA"/>
- <edges xmi:type="notation:Connector" xmi:id="_i4690DxlEeahauIA6xbtgA" type="Association_Edge" source="_bSpI8DxlEeahauIA6xbtgA" target="_d-gSQDxlEeahauIA6xbtgA">
- <children xmi:type="notation:DecorationNode" xmi:id="_i4690zxlEeahauIA6xbtgA" type="Association_StereotypeLabel">
- <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ou2PYDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_i4691DxlEeahauIA6xbtgA" y="-20"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_i47k4DxlEeahauIA6xbtgA" type="Association_NameLabel">
- <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovCcoDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k4TxlEeahauIA6xbtgA" x="-31" y="27"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_i47k4jxlEeahauIA6xbtgA" type="Association_TargetRoleLabel">
- <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovOp4DxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k4zxlEeahauIA6xbtgA" x="-18" y="-63"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_i47k5DxlEeahauIA6xbtgA" type="Association_SourceRoleLabel">
- <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovZB8DxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k5TxlEeahauIA6xbtgA" x="-59" y="105"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_i47k5jxlEeahauIA6xbtgA" type="Association_SourceMultiplicityLabel">
- <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovlPMDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_i47k5zxlEeahauIA6xbtgA" x="19" y="-33"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_i48L8DxlEeahauIA6xbtgA" type="Association_TargetMultiplicityLabel">
- <styles xmi:type="notation:BooleanValueStyle" xmi:id="_ovuZIDxlEeahauIA6xbtgA" name="IS_UPDATED_POSITION" booleanValue="true"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_i48L8TxlEeahauIA6xbtgA" x="-20" y="67"/>
- </children>
- <styles xmi:type="notation:FontStyle" xmi:id="_i4690TxlEeahauIA6xbtgA"/>
- <element xmi:type="uml:Association" href="mainPModel1.uml#_i4rtQDxlEeahauIA6xbtgA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_i4690jxlEeahauIA6xbtgA" points="[181, 400, -643984, -643984]$[280, 360, -643984, -643984]$[360, 400, -643984, -643984]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_i584kDxlEeahauIA6xbtgA" id="(1.0,0.4)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_i584kTxlEeahauIA6xbtgA" id="(0.0,0.4)"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_64swsDxlEeahauIA6xbtgA" type="Generalization_Edge" source="_zZcw4DxlEeahauIA6xbtgA" target="_2C7UkDxlEeahauIA6xbtgA">
- <children xmi:type="notation:DecorationNode" xmi:id="_64swszxlEeahauIA6xbtgA" type="Generalization_StereotypeLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_64tXwDxlEeahauIA6xbtgA" y="40"/>
- </children>
- <styles xmi:type="notation:FontStyle" xmi:id="_64swsTxlEeahauIA6xbtgA"/>
- <element xmi:type="uml:Generalization" href="mainPModel1.uml#_64U9QDxlEeahauIA6xbtgA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_64swsjxlEeahauIA6xbtgA" points="[221, 680, -643984, -643984]$[320, 680, -643984, -643984]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_65bwgDxlEeahauIA6xbtgA" id="(1.0,0.594059405940594)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_65cXkDxlEeahauIA6xbtgA" id="(0.0,0.594059405940594)"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_JzBxKD4KEeahauIA6xbtgA" type="StereotypeCommentLink" source="_d-gSQDxlEeahauIA6xbtgA" target="_JzBxJD4KEeahauIA6xbtgA">
- <styles xmi:type="notation:FontStyle" xmi:id="_JzBxKT4KEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_JzCYMj4KEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_d-cn4DxlEeahauIA6xbtgA"/>
- </styles>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JzBxKj4KEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JzCYMD4KEeahauIA6xbtgA"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JzCYMT4KEeahauIA6xbtgA"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_B9L_aD6QEeahauIA6xbtgA" type="StereotypeCommentLink" source="_zZcw4DxlEeahauIA6xbtgA" target="_B9L_ZD6QEeahauIA6xbtgA">
- <styles xmi:type="notation:FontStyle" xmi:id="_B9L_aT6QEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_B9Mmcj6QEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="mainPModel1.uml#_zZPVgDxlEeahauIA6xbtgA"/>
- </styles>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_B9L_aj6QEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_B9MmcD6QEeahauIA6xbtgA"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_B9MmcT6QEeahauIA6xbtgA"/>
- </edges>
-</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml
deleted file mode 100644
index 8a61c9fa2ca..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel1.uml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ProfileRootElement="http:///schemas/ProfileRootElement/_ZOaqYD61EeahauIA6xbtgA/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/ProfileRootElement/_ZOaqYD61EeahauIA6xbtgA/5 refactoringProfile.profile.uml#_ZOaqYT61EeahauIA6xbtgA">
- <uml:Model xmi:id="_KnzjUDxlEeahauIA6xbtgA" name="RootElement">
- <packagedElement xmi:type="uml:Class" xmi:id="_Lt2lYDxlEeahauIA6xbtgA" name="basicClass">
- <generalization xmi:type="uml:Generalization" xmi:id="_phGg0DxnEeahauIA6xbtgA">
- <general xmi:type="uml:Component" href="secondaryPModel1.uml#_m2eGkDxnEeahauIA6xbtgA"/>
- </generalization>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_NzKFADxlEeahauIA6xbtgA" name="classWithProperty">
- <ownedAttribute xmi:type="uml:Property" xmi:id="_YP_3UDxlEeahauIA6xbtgA" name="classProperty"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_bSmFoDxlEeahauIA6xbtgA" name="associationSource">
- <ownedAttribute xmi:type="uml:Property" xmi:id="_i4uJgDxlEeahauIA6xbtgA" name="associationtarget" type="_d-cn4DxlEeahauIA6xbtgA" association="_i4rtQDxlEeahauIA6xbtgA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_d-cn4DxlEeahauIA6xbtgA" name="associationTarget"/>
- <packagedElement xmi:type="uml:Association" xmi:id="_i4rtQDxlEeahauIA6xbtgA" name="Association" memberEnd="_i4uJgDxlEeahauIA6xbtgA _i4uwkDxlEeahauIA6xbtgA">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_i4ticDxlEeahauIA6xbtgA" source="org.eclipse.papyrus">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_i4ticTxlEeahauIA6xbtgA" key="nature" value="UML_Nature"/>
- </eAnnotations>
- <ownedEnd xmi:type="uml:Property" xmi:id="_i4uwkDxlEeahauIA6xbtgA" name="associationsource" type="_bSmFoDxlEeahauIA6xbtgA" association="_i4rtQDxlEeahauIA6xbtgA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_q4v7IDxlEeahauIA6xbtgA" name="parentPackage">
- <packagedElement xmi:type="uml:Package" xmi:id="_t7ghgDxlEeahauIA6xbtgA" name="childPackage">
- <packagedElement xmi:type="uml:Class" xmi:id="_zZPVgDxlEeahauIA6xbtgA" name="generalizationSource">
- <generalization xmi:type="uml:Generalization" xmi:id="_64U9QDxlEeahauIA6xbtgA" general="_2CsrEDxlEeahauIA6xbtgA"/>
- <ownedAttribute xmi:type="uml:Property" xmi:id="_8-PVUDxvEeahauIA6xbtgA" name="generalizationSourceProperty"/>
- <ownedAttribute xmi:type="uml:Property" xmi:id="_T2mGcD3LEeahauIA6xbtgA" name="generalizationSourceHiddenProperty"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Component" xmi:id="_2CsrEDxlEeahauIA6xbtgA" name="generalizationTarget"/>
- </packagedElement>
- </packagedElement>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_IjZVQD4KEeahauIA6xbtgA">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bC-YQD61EeahauIA6xbtgA" source="PapyrusVersion">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YQT61EeahauIA6xbtgA" key="Version" value="0.0.6"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YQj61EeahauIA6xbtgA" key="Comment" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YQz61EeahauIA6xbtgA" key="Copyright" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YRD61EeahauIA6xbtgA" key="Date" value="2016-06-30"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bC-YRT61EeahauIA6xbtgA" key="Author" value=""/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IjZ8UD4KEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="refactoringProfile.profile.uml#_ZOaqYT61EeahauIA6xbtgA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="refactoringProfile.profile.uml#_K8sfAD32EeahauIA6xbtgA"/>
- </profileApplication>
- </uml:Model>
- <ProfileRootElement:Stereotype2 xmi:id="_JyuPID4KEeahauIA6xbtgA" base_Class="_d-cn4DxlEeahauIA6xbtgA"/>
- <ProfileRootElement:Stereotype1 xmi:id="_Jzlx0D4KEeahauIA6xbtgA" base_Class="_d-cn4DxlEeahauIA6xbtgA"/>
- <ProfileRootElement:Stereotype1 xmi:id="_B84dYD6QEeahauIA6xbtgA" base_Class="_zZPVgDxlEeahauIA6xbtgA"/>
-</xmi:XMI>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di
deleted file mode 100644
index 8634d4c00e0..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.di
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation
deleted file mode 100644
index 9aa5495dad3..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.notation
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_NMxlADxmEeahauIA6xbtgA" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_OcijwDxmEeahauIA6xbtgA" type="Class_Shape" fillColor="15053796">
- <children xmi:type="notation:DecorationNode" xmi:id="_OcjK0DxmEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_OcjK0TxmEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_OcjK0jxmEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_OcjK0zxmEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_OcjK1DxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_OcjK1TxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_OcjK1jxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcjK1zxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_OcjK2DxmEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_OcjK2TxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_OcjK2jxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_OcjK2zxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcjK3DxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_OcjK3TxmEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_OcjK3jxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_OcjK3zxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_OcjK4DxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcjK4TxmEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel2.uml#_Oce5YDxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OcijwTxmEeahauIA6xbtgA" x="40" y="40"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_2r3HYDxmEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_2r5joDxmEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_2r5joTxmEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_2r6KsDxmEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_2r6KsTxmEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_2r6KsjxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_2r6KszxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_2r6KtDxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r6KtTxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_2r6xwDxmEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_2r6xwTxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_2r6xwjxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_2r6xwzxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r6xxDxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_2r6xxTxmEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_2r6xxjxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_2r6xxzxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_2r6xyDxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r6xyTxmEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2r3HYTxmEeahauIA6xbtgA" x="40" y="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_94z2QDxmEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_940dUDxmEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_940dUTxmEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_940dUjxmEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_941EYDxmEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_941EYTxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_941EYjxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_941EYzxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_941EZDxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_941EZTxmEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_941EZjxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_941EZzxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_941EaDxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_941EaTxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_941EajxmEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_941EazxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_941EbDxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_941EbTxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_941EbjxmEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_94z2QTxmEeahauIA6xbtgA" x="40" y="360"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="___PXQDxmEeahauIA6xbtgA" type="Interface_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="___P-UDxmEeahauIA6xbtgA" type="Interface_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="___QlYDxmEeahauIA6xbtgA" type="Interface_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="___QlYTxmEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="___QlYjxmEeahauIA6xbtgA" type="Interface_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="___QlYzxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="___QlZDxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="___QlZTxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="___QlZjxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="___QlZzxmEeahauIA6xbtgA" type="Interface_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="___QlaDxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="___QlaTxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="___QlajxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="___QlazxmEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="___RMcDxmEeahauIA6xbtgA" type="Interface_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="___RMcTxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="___RMcjxmEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="___RMczxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="___RMdDxmEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Interface" href="mainPModel2.uml#___M7ADxmEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="___PXQTxmEeahauIA6xbtgA" x="300" y="360" width="101" height="101"/>
- </children>
- <styles xmi:type="notation:StringValueStyle" xmi:id="_NMxlATxmEeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_NMxlAjxmEeahauIA6xbtgA"/>
- <styles xmi:type="style:PapyrusViewStyle" xmi:id="_NMxlAzxmEeahauIA6xbtgA">
- <owner xmi:type="uml:Model" href="mainPModel2.uml#_NMreYDxmEeahauIA6xbtgA"/>
- </styles>
- <element xmi:type="uml:Model" href="mainPModel2.uml#_NMreYDxmEeahauIA6xbtgA"/>
- <edges xmi:type="notation:Connector" xmi:id="_D3jsoDxnEeahauIA6xbtgA" type="Association_Edge" source="___PXQDxmEeahauIA6xbtgA" target="_94z2QDxmEeahauIA6xbtgA">
- <children xmi:type="notation:DecorationNode" xmi:id="_D3kTsDxnEeahauIA6xbtgA" type="Association_StereotypeLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_D3kTsTxnEeahauIA6xbtgA" y="-20"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_D3kTsjxnEeahauIA6xbtgA" type="Association_NameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_D3kTszxnEeahauIA6xbtgA" y="20"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_D3k6wDxnEeahauIA6xbtgA" type="Association_TargetRoleLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6wTxnEeahauIA6xbtgA" x="36" y="-87"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_D3k6wjxnEeahauIA6xbtgA" type="Association_SourceRoleLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6wzxnEeahauIA6xbtgA" x="24" y="53"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_D3k6xDxnEeahauIA6xbtgA" type="Association_SourceMultiplicityLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6xTxnEeahauIA6xbtgA" x="-4" y="-67"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_D3k6xjxnEeahauIA6xbtgA" type="Association_TargetMultiplicityLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_D3k6xzxnEeahauIA6xbtgA" x="4" y="33"/>
- </children>
- <styles xmi:type="notation:FontStyle" xmi:id="_D3jsoTxnEeahauIA6xbtgA"/>
- <element xmi:type="uml:Association" href="mainPModel2.uml#_DNjGUDxnEeahauIA6xbtgA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_D3jsojxnEeahauIA6xbtgA" points="[300, 400, -643984, -643984]$[140, 400, -643984, -643984]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_D4A_oDxnEeahauIA6xbtgA" id="(0.0,0.39603960396039606)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_D4A_oTxnEeahauIA6xbtgA" id="(1.0,0.4)"/>
- </edges>
-</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml
deleted file mode 100644
index 5d0a4f5710e..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/mainPModel2.uml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_NMreYDxmEeahauIA6xbtgA" name="RootElement">
- <packagedElement xmi:type="uml:Class" xmi:id="_Oce5YDxmEeahauIA6xbtgA" name="Class1"/>
- <packagedElement xmi:type="uml:Interface" xmi:id="___M7ADxmEeahauIA6xbtgA" name="Interface1">
- <ownedAttribute xmi:type="uml:Property" xmi:id="_DNjtYjxnEeahauIA6xbtgA" name="basicclass" association="_DNjGUDxnEeahauIA6xbtgA">
- <type xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Association" xmi:id="_DNjGUDxnEeahauIA6xbtgA" memberEnd="_DNjtYjxnEeahauIA6xbtgA _DNjtYzxnEeahauIA6xbtgA">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DNjtYDxnEeahauIA6xbtgA" source="org.eclipse.papyrus">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DNjtYTxnEeahauIA6xbtgA" key="nature" value="UML_Nature"/>
- </eAnnotations>
- <ownedEnd xmi:type="uml:Property" xmi:id="_DNjtYzxnEeahauIA6xbtgA" name="interface1" type="___M7ADxmEeahauIA6xbtgA" association="_DNjGUDxnEeahauIA6xbtgA"/>
- </packagedElement>
-</uml:Model>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di
deleted file mode 100644
index 8634d4c00e0..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.di
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation
deleted file mode 100644
index de2334a7b4e..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.notation
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_K9E5gD32EeahauIA6xbtgA" type="PapyrusUMLProfileDiagram" name="Profile Diagram" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_ydqu4z32EeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_ydqu5D32EeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_ydqu5j32EeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ydqu5T32EeahauIA6xbtgA" x="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_-aGEoD32EeahauIA6xbtgA" type="Stereotype_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_-aIg4D32EeahauIA6xbtgA" type="Stereotype_NameLabel"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_-aIg4T32EeahauIA6xbtgA" type="Stereotype_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_-aIg4j32EeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_-aIg4z32EeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_-aIg5D32EeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-aIg5T32EeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_-aIg5j32EeahauIA6xbtgA" type="Stereotype_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_-aIg5z32EeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_-aIg6D32EeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_-aIg6T32EeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-aIg6j32EeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Stereotype" href="refactoringProfile.profile.uml#_RM_YYD32EeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-aGEoT32EeahauIA6xbtgA" x="40" y="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_CRtPYD33EeahauIA6xbtgA" type="Stereotype_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_CRt2cD33EeahauIA6xbtgA" type="Stereotype_NameLabel"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_CRt2cT33EeahauIA6xbtgA" type="Stereotype_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_CRt2cj33EeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_CRt2cz33EeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_CRt2dD33EeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CRt2dT33EeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_CRt2dj33EeahauIA6xbtgA" type="Stereotype_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_CRt2dz33EeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_CRt2eD33EeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_CRt2eT33EeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CRt2ej33EeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Stereotype" href="refactoringProfile.profile.uml#_Sx6HwD32EeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CRtPYT33EeahauIA6xbtgA" x="300" y="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_S0icoD4EEeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_S0icoT4EEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_S0icoz4EEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Interface"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_S0icoj4EEeahauIA6xbtgA" x="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_p2ylYD4GEeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_p2ylYT4GEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_p2ylYz4GEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p2ylYj4GEeahauIA6xbtgA" x="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_0tQYoz4GEeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_0tQYpD4GEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_0tQ_sD4GEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0tQYpT4GEeahauIA6xbtgA" x="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_nLa28D6YEeahauIA6xbtgA" type="Class_MetaclassShape">
- <children xmi:type="notation:DecorationNode" xmi:id="_nLdTMD6YEeahauIA6xbtgA" type="Class_MetaclassNameLabel"/>
- <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nLa28T6YEeahauIA6xbtgA" x="180" y="40" width="101" height="61"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_nLtx4D6YEeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_nLtx4T6YEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_nLtx4z6YEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nLtx4j6YEeahauIA6xbtgA" x="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_oBgxcD6YEeahauIA6xbtgA" type="Class_MetaclassShape">
- <children xmi:type="notation:DecorationNode" xmi:id="_oBhYgD6YEeahauIA6xbtgA" type="Class_MetaclassNameLabel"/>
- <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oBgxcT6YEeahauIA6xbtgA" x="420" y="40" width="101" height="61"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_oBwCAD6YEeahauIA6xbtgA" type="StereotypeComment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_oBwCAT6YEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_oBwCAz6YEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
- </styles>
- <element xsi:nil="true"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oBwCAj6YEeahauIA6xbtgA" x="200"/>
- </children>
- <styles xmi:type="notation:StringValueStyle" xmi:id="_K9E5gT32EeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_K9E5gj32EeahauIA6xbtgA"/>
- <styles xmi:type="style:PapyrusViewStyle" xmi:id="_K9E5gz32EeahauIA6xbtgA">
- <owner xmi:type="uml:Profile" href="refactoringProfile.profile.uml#_K8sfAD32EeahauIA6xbtgA"/>
- </styles>
- <element xmi:type="uml:Profile" href="refactoringProfile.profile.uml#_K8sfAD32EeahauIA6xbtgA"/>
- <edges xmi:type="notation:Connector" xmi:id="_bOhHsD32EeahauIA6xbtgA" type="StereotypeCommentLink">
- <styles xmi:type="notation:FontStyle" xmi:id="_bOhHsT32EeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_bOi84T32EeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </styles>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bOhHsj32EeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bOhuwD32EeahauIA6xbtgA"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bOi84D32EeahauIA6xbtgA"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_nLtx5D6YEeahauIA6xbtgA" type="StereotypeCommentLink" source="_nLa28D6YEeahauIA6xbtgA" target="_nLtx4D6YEeahauIA6xbtgA">
- <styles xmi:type="notation:FontStyle" xmi:id="_nLtx5T6YEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_nLuY8D6YEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </styles>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nLtx5j6YEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nLtx5z6YEeahauIA6xbtgA"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_nLtx6D6YEeahauIA6xbtgA"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_nL6mMD6YEeahauIA6xbtgA" type="Extension_Edge" source="_-aGEoD32EeahauIA6xbtgA" target="_nLa28D6YEeahauIA6xbtgA">
- <styles xmi:type="notation:FontStyle" xmi:id="_nL6mMT6YEeahauIA6xbtgA"/>
- <element xmi:type="uml:Extension" href="refactoringProfile.profile.uml#_PmEBYD33EeahauIA6xbtgA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nL6mMj6YEeahauIA6xbtgA" points="[100, 200, -643984, -643984]$[100, 140, -643984, -643984]$[220, 140, -643984, -643984]$[220, 101, -643984, -643984]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okm3cT6YEeahauIA6xbtgA" id="(0.6,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okm3cj6YEeahauIA6xbtgA" id="(0.39603960396039606,1.0)"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_nnHUcD6YEeahauIA6xbtgA" type="Extension_Edge" source="_CRtPYD33EeahauIA6xbtgA" target="_nLa28D6YEeahauIA6xbtgA">
- <styles xmi:type="notation:FontStyle" xmi:id="_nnHUcT6YEeahauIA6xbtgA"/>
- <element xmi:type="uml:Extension" href="refactoringProfile.profile.uml#_ULmpID33EeahauIA6xbtgA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nnHUcj6YEeahauIA6xbtgA" points="[320, 200, -643984, -643984]$[339, 140, -643984, -643984]$[240, 140, -643984, -643984]$[240, 101, -643984, -643984]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okmQYD6YEeahauIA6xbtgA" id="(0.4,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okm3cD6YEeahauIA6xbtgA" id="(0.594059405940594,1.0)"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_oBwCBD6YEeahauIA6xbtgA" type="StereotypeCommentLink" source="_oBgxcD6YEeahauIA6xbtgA" target="_oBwCAD6YEeahauIA6xbtgA">
- <styles xmi:type="notation:FontStyle" xmi:id="_oBwCBT6YEeahauIA6xbtgA"/>
- <styles xmi:type="notation:EObjectValueStyle" xmi:id="_oBwCCT6YEeahauIA6xbtgA" name="BASE_ELEMENT">
- <eObjectValue xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
- </styles>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oBwCBj6YEeahauIA6xbtgA" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oBwCBz6YEeahauIA6xbtgA"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oBwCCD6YEeahauIA6xbtgA"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_oB5zAD6YEeahauIA6xbtgA" type="Extension_Edge" source="_CRtPYD33EeahauIA6xbtgA" target="_oBgxcD6YEeahauIA6xbtgA">
- <styles xmi:type="notation:FontStyle" xmi:id="_oB5zAT6YEeahauIA6xbtgA"/>
- <element xmi:type="uml:Extension" href="refactoringProfile.profile.uml#_0Vh1ID4GEeahauIA6xbtgA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oB5zAj6YEeahauIA6xbtgA" points="[360, 200, -643984, -643984]$[360, 140, -643984, -643984]$[460, 140, -643984, -643984]$[460, 101, -643984, -643984]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_o4yXsD6YEeahauIA6xbtgA" id="(0.6,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_o4y-wD6YEeahauIA6xbtgA" id="(0.39603960396039606,1.0)"/>
- </edges>
-</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml
deleted file mode 100644
index a4137241432..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/refactoringProfile.profile.uml
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_K8sfAD32EeahauIA6xbtgA" name="ProfileRootElement">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1Axk0D32EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <contents xmi:type="ecore:EPackage" xmi:id="_ZOaqYT61EeahauIA6xbtgA" name="ProfileRootElement" nsURI="http:///schemas/ProfileRootElement/_ZOaqYD61EeahauIA6xbtgA/5" nsPrefix="ProfileRootElement">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZObRcz61EeahauIA6xbtgA" source="PapyrusVersion">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdD61EeahauIA6xbtgA" key="Version" value="0.0.6"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdT61EeahauIA6xbtgA" key="Comment" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdj61EeahauIA6xbtgA" key="Copyright" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObRdz61EeahauIA6xbtgA" key="Date" value="2016-06-30"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZObReD61EeahauIA6xbtgA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_ZOaqYj61EeahauIA6xbtgA" name="Stereotype1">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZOaqYz61EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_ZOaqZD61EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_ZOaqZj61EeahauIA6xbtgA" name="Stereotype2">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZOaqZz61EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_ZOaqaD61EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_ZOaqaj61EeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- <contents xmi:type="ecore:EPackage" xmi:id="_p7vCcD6YEeahauIA6xbtgA" name="ProfileRootElement" nsURI="http:///schemas/ProfileRootElement/_p7ubYD6YEeahauIA6xbtgA/4" nsPrefix="ProfileRootElement">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_p7vpgD6YEeahauIA6xbtgA" source="PapyrusVersion">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vpgT6YEeahauIA6xbtgA" key="Version" value="0.0.5"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vpgj6YEeahauIA6xbtgA" key="Comment" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vpgz6YEeahauIA6xbtgA" key="Copyright" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vphD6YEeahauIA6xbtgA" key="Date" value="2016-06-30"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p7vphT6YEeahauIA6xbtgA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_p7vCcT6YEeahauIA6xbtgA" name="Stereotype1">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_p7vCcj6YEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_p7vCcz6YEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_p7vCdT6YEeahauIA6xbtgA" name="Stereotype2">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_p7vCdj6YEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_p7vCdz6YEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_p7vCeT6YEeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- <contents xmi:type="ecore:EPackage" xmi:id="_DvJjIT4KEeahauIA6xbtgA" name="ProfileRootElement" nsURI="http:///schemas/ProfileRootElement/_DvJjID4KEeahauIA6xbtgA/3" nsPrefix="ProfileRootElement">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DvKKMz4KEeahauIA6xbtgA" source="PapyrusVersion">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKND4KEeahauIA6xbtgA" key="Version" value="0.0.4"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKNT4KEeahauIA6xbtgA" key="Comment" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKNj4KEeahauIA6xbtgA" key="Copyright" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKNz4KEeahauIA6xbtgA" key="Date" value="2016-06-29"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_DvKKOD4KEeahauIA6xbtgA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_DvJjIj4KEeahauIA6xbtgA" name="Stereotype1">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DvJjIz4KEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_DvJjJD4KEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_DvJjJj4KEeahauIA6xbtgA" name="Stereotype2">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_DvJjJz4KEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_DvJjKD4KEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_DvJjKj4KEeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- <contents xmi:type="ecore:EPackage" xmi:id="_-2y0cD4GEeahauIA6xbtgA" name="RootElement" nsURI="http:///schemas/RootElement/_-2yNYD4GEeahauIA6xbtgA/2" nsPrefix="RootElement">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-2y0fj4GEeahauIA6xbtgA" source="PapyrusVersion">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0fz4GEeahauIA6xbtgA" key="Version" value="0.0.3"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gD4GEeahauIA6xbtgA" key="Comment" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gT4GEeahauIA6xbtgA" key="Copyright" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gj4GEeahauIA6xbtgA" key="Date" value="2016-06-29"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-2y0gz4GEeahauIA6xbtgA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_-2y0cT4GEeahauIA6xbtgA" name="Stereotype1">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-2y0cj4GEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_-2y0cz4GEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_-2y0dT4GEeahauIA6xbtgA" name="Stereotype2">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-2y0dj4GEeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_-2y0dz4GEeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_-2y0eT4GEeahauIA6xbtgA" name="base_Artifact" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Artifact"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- <contents xmi:type="ecore:EPackage" xmi:id="_bdlpAD33EeahauIA6xbtgA" name="RootElement" nsURI="http:///schemas/RootElement/_bdka4D33EeahauIA6xbtgA/1" nsPrefix="RootElement">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bdmQET33EeahauIA6xbtgA" source="PapyrusVersion">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQEj33EeahauIA6xbtgA" key="Version" value="0.0.2"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQEz33EeahauIA6xbtgA" key="Comment" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQFD33EeahauIA6xbtgA" key="Copyright" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQFT33EeahauIA6xbtgA" key="Date" value="2016-06-29"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bdmQFj33EeahauIA6xbtgA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_bdlpAT33EeahauIA6xbtgA" name="Stereotype1">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bdlpAj33EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bdlpAz33EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_bdlpBT33EeahauIA6xbtgA" name="Stereotype2">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bdlpBj33EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bdlpBz33EeahauIA6xbtgA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- <contents xmi:type="ecore:EPackage" xmi:id="_1AyL4D32EeahauIA6xbtgA" name="RootElement" nsURI="http:///schemas/RootElement/_1AvvoD32EeahauIA6xbtgA/0" nsPrefix="RootElement">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1A0BED32EeahauIA6xbtgA" source="PapyrusVersion">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BET32EeahauIA6xbtgA" key="Version" value="0.0.1"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BEj32EeahauIA6xbtgA" key="Comment" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BEz32EeahauIA6xbtgA" key="Copyright" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BFD32EeahauIA6xbtgA" key="Date" value="2016-06-29"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1A0BFT32EeahauIA6xbtgA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_1AyL4T32EeahauIA6xbtgA" name="Stereotype1">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1AyL4j32EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_RM_YYD32EeahauIA6xbtgA"/>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_1AyL4z32EeahauIA6xbtgA" name="Stereotype2">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1AyL5D32EeahauIA6xbtgA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Sx6HwD32EeahauIA6xbtgA"/>
- </eClassifiers>
- </contents>
- </eAnnotations>
- <packageImport xmi:type="uml:PackageImport" xmi:id="_LCkdgD32EeahauIA6xbtgA">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packageImport xmi:type="uml:PackageImport" xmi:id="_LClEkD32EeahauIA6xbtgA">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Stereotype" xmi:id="_RM_YYD32EeahauIA6xbtgA" name="Stereotype1">
- <ownedAttribute xmi:type="uml:Property" xmi:id="_PmHEsD33EeahauIA6xbtgA" name="base_Class" association="_PmEBYD33EeahauIA6xbtgA">
- <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Stereotype" xmi:id="_Sx6HwD32EeahauIA6xbtgA" name="Stereotype2">
- <ownedAttribute xmi:type="uml:Property" xmi:id="_ULnQMT33EeahauIA6xbtgA" name="base_Class" association="_ULmpID33EeahauIA6xbtgA">
- <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </ownedAttribute>
- <ownedAttribute xmi:type="uml:Property" xmi:id="_0VjqUD4GEeahauIA6xbtgA" name="base_Artifact" association="_0Vh1ID4GEeahauIA6xbtgA">
- <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Artifact"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Extension" xmi:id="_PmEBYD33EeahauIA6xbtgA" name="E_Stereotype1_Class1" memberEnd="_PmGdoD33EeahauIA6xbtgA _PmHEsD33EeahauIA6xbtgA">
- <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_PmGdoD33EeahauIA6xbtgA" name="extension_Stereotype1" type="_RM_YYD32EeahauIA6xbtgA" aggregation="composite" association="_PmEBYD33EeahauIA6xbtgA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Extension" xmi:id="_ULmpID33EeahauIA6xbtgA" name="E_Stereotype2_Class1" memberEnd="_ULnQMD33EeahauIA6xbtgA _ULnQMT33EeahauIA6xbtgA">
- <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_ULnQMD33EeahauIA6xbtgA" name="extension_Stereotype2" type="_Sx6HwD32EeahauIA6xbtgA" aggregation="composite" association="_ULmpID33EeahauIA6xbtgA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Extension" xmi:id="_0Vh1ID4GEeahauIA6xbtgA" name="E_Stereotype2_Artifact1" memberEnd="_0VjDQD4GEeahauIA6xbtgA _0VjqUD4GEeahauIA6xbtgA">
- <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_0VjDQD4GEeahauIA6xbtgA" name="extension_Stereotype2" type="_Sx6HwD32EeahauIA6xbtgA" aggregation="composite" association="_0Vh1ID4GEeahauIA6xbtgA"/>
- </packagedElement>
-</uml:Profile>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di
deleted file mode 100644
index 8634d4c00e0..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.di
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation
deleted file mode 100644
index a99ddd57058..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.notation
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_gOLj8DxnEeahauIA6xbtgA" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_jXoBIDxnEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_jXp2UDxnEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_jXp2UTxnEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_jXp2UjxnEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_jXp2UzxnEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_jXp2VDxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_jXp2VTxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_jXp2VjxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXp2VzxnEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_jXp2WDxnEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_jXp2WTxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_jXp2WjxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_jXp2WzxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXp2XDxnEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_jXp2XTxnEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_jXp2XjxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_jXp2XzxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_jXp2YDxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXp2YTxnEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jXoBITxnEeahauIA6xbtgA" x="40" y="40"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_lycdwDxnEeahauIA6xbtgA" type="Class_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_lycdwjxnEeahauIA6xbtgA" type="Class_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_lycdwzxnEeahauIA6xbtgA" type="Class_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_lycdxDxnEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_lycdxTxnEeahauIA6xbtgA" type="Class_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_lycdxjxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_lydE0DxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_lydE0TxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lydE0jxnEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_lydE0zxnEeahauIA6xbtgA" type="Class_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_lydE1DxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_lydE1TxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_lydE1jxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lydE1zxnEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_lydE2DxnEeahauIA6xbtgA" type="Class_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_lydE2TxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_lydE2jxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_lydE2zxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lydE3DxnEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Class" href="mainPModel1.uml#_Lt2lYDxlEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lycdwTxnEeahauIA6xbtgA" x="40" y="200"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_m2fUsDxnEeahauIA6xbtgA" type="Component_Shape">
- <children xmi:type="notation:DecorationNode" xmi:id="_m2fUsjxnEeahauIA6xbtgA" type="Component_NameLabel"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_m2fUszxnEeahauIA6xbtgA" type="Component_FloatingNameLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_m2fUtDxnEeahauIA6xbtgA" y="5"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_m2fUtTxnEeahauIA6xbtgA" type="Component_AttributeCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_m2fUtjxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_m2fUtzxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_m2fUuDxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2fUuTxnEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_m2f7wDxnEeahauIA6xbtgA" type="Component_OperationCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_m2f7wTxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_m2f7wjxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_m2f7wzxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2f7xDxnEeahauIA6xbtgA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_m2f7xTxnEeahauIA6xbtgA" type="Component_NestedClassifierCompartment">
- <styles xmi:type="notation:TitleStyle" xmi:id="_m2f7xjxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_m2f7xzxnEeahauIA6xbtgA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_m2f7yDxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2f7yTxnEeahauIA6xbtgA"/>
- </children>
- <element xmi:type="uml:Component" href="secondaryPModel1.uml#_m2eGkDxnEeahauIA6xbtgA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m2fUsTxnEeahauIA6xbtgA" x="280" y="200" width="101" height="101"/>
- </children>
- <styles xmi:type="notation:StringValueStyle" xmi:id="_gOLj8TxnEeahauIA6xbtgA" name="diagram_compatibility_version" stringValue="1.2.0"/>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_gOLj8jxnEeahauIA6xbtgA"/>
- <styles xmi:type="style:PapyrusViewStyle" xmi:id="_gOLj8zxnEeahauIA6xbtgA">
- <owner xmi:type="uml:Model" href="secondaryPModel1.uml#_gN-voDxnEeahauIA6xbtgA"/>
- </styles>
- <element xmi:type="uml:Model" href="secondaryPModel1.uml#_gN-voDxnEeahauIA6xbtgA"/>
- <edges xmi:type="notation:Connector" xmi:id="_phMncDxnEeahauIA6xbtgA" type="Generalization_Edge" source="_lycdwDxnEeahauIA6xbtgA" target="_m2fUsDxnEeahauIA6xbtgA">
- <children xmi:type="notation:DecorationNode" xmi:id="_phMnczxnEeahauIA6xbtgA" type="Generalization_StereotypeLabel">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_phMndDxnEeahauIA6xbtgA" y="40"/>
- </children>
- <styles xmi:type="notation:FontStyle" xmi:id="_phMncTxnEeahauIA6xbtgA"/>
- <element xmi:type="uml:Generalization" href="mainPModel1.uml#_phGg0DxnEeahauIA6xbtgA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_phMncjxnEeahauIA6xbtgA" points="[140, 240, -643984, -643984]$[280, 240, -643984, -643984]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_phXmkDxnEeahauIA6xbtgA" id="(1.0,0.4)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_phXmkTxnEeahauIA6xbtgA" id="(0.0,0.39603960396039606)"/>
- </edges>
-</notation:Diagram>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml
deleted file mode 100644
index d21d18fb3f0..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/resources/secondaryPModel1.uml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_gN-voDxnEeahauIA6xbtgA" name="RootElement">
- <packagedElement xmi:type="uml:Component" xmi:id="_m2eGkDxnEeahauIA6xbtgA" name="Component1"/>
-</uml:Model>
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java
deleted file mode 100644
index b7ecac2cbef..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/Activator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.tests;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.refactoring.tests"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java
deleted file mode 100644
index 9900b62e792..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/AllTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.tests;
-
-import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
-import org.eclipse.papyrus.refactoring.tests.mutate.RefactoringMutationTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-
-@RunWith(ClassificationSuite.class)
-@SuiteClasses({ RefactoringMutationTest.class })
-public class AllTests {
-
-}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java
deleted file mode 100644
index 753cee66ac8..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/Messages.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.tests.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.refactoring.tests.messages.messages"; //$NON-NLS-1$
-
- public static String AbstractPapyrusRefactoringTestCase_0;
- public static String AbstractPapyrusRefactoringTestCase_1;
- public static String AbstractPapyrusRefactoringTestCase_2;
- public static String AbstractPapyrusRefactoringTestCase_3;
- public static String AbstractPapyrusRefactoringTestCase_4;
- public static String AbstractPapyrusRefactoringTestCase_5;
-
- public static String TestPapyrusChange_0;
- public static String TestPapyrusChange_1;
-
- public static String TestPapyrusRefactoring_0;
-
- public static String TestPapyrusRefactoringOperation_0;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties
deleted file mode 100644
index 1dba9de1a37..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/messages/messages.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-AbstractPapyrusRefactoringTestCase_0=Failed to open the editor
-AbstractPapyrusRefactoringTestCase_1=Project creation failed:
-AbstractPapyrusRefactoringTestCase_2=Test
-AbstractPapyrusRefactoringTestCase_3=Cannot close the editor and delete the project
-AbstractPapyrusRefactoringTestCase_4=model.di
-AbstractPapyrusRefactoringTestCase_5=TestModel
-TestPapyrusChange_0=Test
-TestPapyrusChange_1=Test_PapyrusChange
-TestPapyrusRefactoring_0=test
-TestPapyrusRefactoringOperation_0=Test
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java
deleted file mode 100644
index 31fa1460e3d..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/mutate/RefactoringMutationTest.java
+++ /dev/null
@@ -1,528 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.tests.mutate;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.Anchor;
-import org.eclipse.gmf.runtime.notation.Bendpoints;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.refactoring.tests.Activator;
-import org.eclipse.papyrus.refactoring.tests.utils.AbstractPapyrusRefactoringTestCase;
-import org.eclipse.papyrus.refactoring.tests.utils.PapyrusRefactoringTestsUtils;
-import org.eclipse.papyrus.refactoring.util.PapyrusRefactoringUtils;
-import org.eclipse.papyrus.uml.refactoring.mutation.helper.MutationTransformation;
-import org.eclipse.papyrus.uml.refactoring.mutation.utils.ModelNotationUtils;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Class containing the tests for the Mutation part of the refactoring tool
- *
- */
-public class RefactoringMutationTest extends AbstractPapyrusRefactoringTestCase {
-
- /**
- * This test mutates a single unlinked Node in the model
- */
- @Test
- public void nodeMutationTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
- IETypesMap.get("Interface"));
-
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate basicClass") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(basicClass);
- }
- };
-
- Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(basicClass, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
-
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during nodeMutationTest", ioe);
- }
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertNull("The initial element should have been deleted from the model", oldElement);
- Assert.assertTrue("The created mutation should be an instance of Interface", newElement instanceof org.eclipse.uml2.uml.Interface);
-
- Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the test", ioe);
- }
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertTrue("The initial element should have restored in the model", oldElement instanceof org.eclipse.uml2.uml.Class);
- Assert.assertNull("The created mutation should have been deleted from the model", newElement);
-
- }
-
-
- /**
- * This test mutates a Node linked to another
- */
- @Test
- public void linkedNodeMutationTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
- IETypesMap.get("Component"));
-
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate associationSource") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(associationSource);
- }
- };
-
- Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(associationSource, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
-
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during linkedNodeMutationTest", ioe);
- }
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertNull("The initial element should have been deleted from the model", oldElement);
- Assert.assertTrue("The created mutation should be an instance of Component", newElement instanceof org.eclipse.uml2.uml.Component);
-
- // The mutation should have been reconnected with any previously existing links
- org.eclipse.uml2.uml.Component component = ((org.eclipse.uml2.uml.Component) newElement);
- List<org.eclipse.uml2.uml.Type> memeberEnds = new ArrayList<>();
- for (org.eclipse.uml2.uml.Property property : association.getMemberEnds()) {
- org.eclipse.uml2.uml.Type type = property.getType();
- memeberEnds.add(type);
- }
- Assert.assertTrue("After the mutation, " + association.getQualifiedName() + "should have " + component.getQualifiedName() + " as a memberEnd",
- memeberEnds.contains(newElement));
- Assert.assertFalse("The mutation should inherit any previously owned attributes", component.getAllAttributes().isEmpty());
-
- Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the test", ioe);
- }
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertTrue("The initial element should have restored in the model", oldElement instanceof org.eclipse.uml2.uml.Class);
- Assert.assertNull("The created mutation should have been deleted from the model", newElement);
-
- // The model should revert back into its original state
- memeberEnds.clear();
- for (org.eclipse.uml2.uml.Property property : association.getMemberEnds()) {
- org.eclipse.uml2.uml.Type type = property.getType();
- memeberEnds.add(type);
- }
- Assert.assertTrue("After undoing the mutation, " + association.getQualifiedName() + "should have " + associationSource.getQualifiedName() + " as a memberEnd",
- memeberEnds.contains(associationSource));
-
- }
-
-
- /**
- * This test mutates a Node containg children
- */
- @Test
- public void parentNodeMutationTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getPackage(),
- IETypesMap.get("Model"));
-
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate parentPackage") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(parentPackage);
- }
- };
-
- Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(parentPackage, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
-
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during parentNodeMutationTest", ioe);
- }
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertNull("The initial element should have been deleted from the model", oldElement);
- Assert.assertTrue("The created mutation should be an instance of Model", newElement instanceof org.eclipse.uml2.uml.Model);
-
- Set<EObject> containedElements = PapyrusRefactoringTestsUtils.getAllContainedElements(newElement);
- Assert.assertTrue("The mutation should contain a childPackage", containedElements.contains(childPackage));
- Assert.assertTrue("The mutation should contain a generalization source", containedElements.contains(generalizationSource));
- Assert.assertTrue("The mutation should contain a generalization target", containedElements.contains(generalizationTarget));
- Assert.assertTrue("The mutation should contain a generalization source property", containedElements.contains(gsProperty));
- Assert.assertTrue("The mutation should contain a generalization", containedElements.contains(generalization));
-
- Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the parentNodeMutationTest", ioe);
- }
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertTrue("The initial element should have restored in the model", oldElement instanceof org.eclipse.uml2.uml.Package);
- Assert.assertNull("The created mutation should have been deleted from the model", newElement);
-
- }
-
-
- /**
- * This test verifies that the previously applied stereotypes are still applied, if they can be, on the mutated element
- */
- @Test
- public void stereotypeApplicationTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
- IETypesMap.get("Artifact"));
-
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate associationTarget") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(associationTarget);
- }
- };
-
- Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(associationTarget, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
- Assert.assertTrue("The element should be an instance of Element", oldElement instanceof org.eclipse.uml2.uml.Element);
- List<org.eclipse.uml2.uml.Stereotype> oldStereotypes = ((org.eclipse.uml2.uml.Element) oldElement).getAppliedStereotypes();
- Assert.assertFalse("The list of applied stereotypes should not be empty", oldStereotypes.isEmpty());
-
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during childrenViewTest", ioe);
- }
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNull("The old element should have been removed from the model", oldElement);
- Assert.assertNotNull("The new element should have been created", newElement);
- Assert.assertTrue("The new element should be an instance of Interface", newElement instanceof org.eclipse.uml2.uml.Artifact);
- Assert.assertTrue("The element should be an instance of Element", newElement instanceof org.eclipse.uml2.uml.Element);
- List<org.eclipse.uml2.uml.Stereotype> newStereotypes = ((org.eclipse.uml2.uml.Element) newElement).getAppliedStereotypes();
- Assert.assertFalse("The list of applied stereotypes should not be empty", newStereotypes.isEmpty());
-
- for (org.eclipse.uml2.uml.Stereotype stereotype : newStereotypes) {
- Assert.assertTrue("The new element should be burdened with the applicable stereotypes",
- oldStereotypes.contains(stereotype) && newStereotypes.size() == oldStereotypes.size() - 1);
- }
-
- Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the childrenViewTest", ioe);
- }
-
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- List<org.eclipse.uml2.uml.Stereotype> undoOldStereotypes = ((org.eclipse.uml2.uml.Element) oldElement).getAppliedStereotypes();
- for (org.eclipse.uml2.uml.Stereotype stereotype : oldStereotypes) {
- Assert.assertTrue("The old element should have been restored with its original stereotypes", undoOldStereotypes.contains(stereotype));
- }
- }
-
-
- /**
- * This test verifies that the children of a mutated element are still visible after the mutation
- */
- @Test
- public void childrenViewTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getClass_(),
- IETypesMap.get("Interface"));
-
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate generalizationSource") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(generalizationSource);
- }
- };
-
- Assert.assertTrue("The command should be executable", mutationCommand.canExecute());
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(generalizationSource, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
- View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
- Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
- Set<View> oldVisibleChildren = ModelNotationUtils.getVisibleChildren(oldView);
- Assert.assertFalse("The reference view should have visible children", oldVisibleChildren.isEmpty());
- // Need to build this list now has the nested objects wont be available after the execution of the command
- Set<EObject> oldVisibleObjects = new HashSet<>();
- for (View view : oldVisibleChildren) {
- EObject viewObject = view.getElement();
- oldVisibleObjects.add(viewObject);
- }
- Assert.assertTrue("The reference view's visible children should include the generalizationSourceProperty", oldVisibleObjects.contains(gsProperty));
- Assert.assertFalse("The reference view's visible children should not include the generalizationSourceHiddenProperty", oldVisibleObjects.contains(gsHiddenProperty));
-
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during childrenViewTest", ioe);
- }
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNull("The old element should have been removed from the model", oldElement);
- Assert.assertNotNull("The new element should have been created", newElement);
- Assert.assertTrue("The new element should be an instance of Interface", newElement instanceof org.eclipse.uml2.uml.Interface);
-
- Set<EObject> containedElements = PapyrusRefactoringTestsUtils.getAllContainedElements(newElement);
- Assert.assertTrue("The new element should contain a generalization source property", containedElements.contains(gsProperty));
- Assert.assertTrue("The new element should contain a generalization source hidden property", containedElements.contains(gsHiddenProperty));
- Assert.assertTrue("The new element should contain a generalization", containedElements.contains(generalization));
-
- View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
- Assert.assertNotNull("The new view couldnt be retrieved", newView);
- Set<View> newVisibleChildren = ModelNotationUtils.getVisibleChildren(newView);
- Assert.assertFalse("The new view should have visible children", newVisibleChildren.isEmpty());
- Set<EObject> newVisibleObjects = new HashSet<>();
- for (View view : newVisibleChildren) {
- EObject viewObject = view.getElement();
- newVisibleObjects.add(viewObject);
- }
- Assert.assertTrue("The new view's visible children should include the generalizationSourceProperty", oldVisibleObjects.contains(gsProperty));
- Assert.assertFalse("The new view's visible children should not include the generalizationSourceHiddenProperty", oldVisibleObjects.contains(gsHiddenProperty));
-
-
- Assert.assertTrue("can undo the most recent refactoring command", commandStack.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the childrenViewTest", ioe);
- }
-
- }
-
-
- /**
- * This test verifies that a mutated link retains its former bendpoints
- */
- @Test
- public void bendpointsAndAchorTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getAssociation(),
- IETypesMap.get("Generalization"));
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate association") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(association);
- }
- };
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(association, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
- View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
- Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
- Edge oldEdge = (Edge) oldView;
- Bendpoints oldBendpoints = oldEdge.getBendpoints();
- Anchor oldTargetAnchor = oldEdge.getTargetAnchor();
- Anchor oldSourceAnchor = oldEdge.getSourceAnchor();
- View oldSource = oldEdge.getSource();
- View oldTarget = oldEdge.getTarget();
-
- Assert.assertTrue("The mutation command should be executable", mutationCommand.canExecute());
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the bendpointsAndAnchorTest", ioe);
- }
-
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertTrue("The new element should be an instance of Generalization", newElement instanceof org.eclipse.uml2.uml.Generalization);
- Assert.assertNotNull("The reference element couldnt be retrieved", newElement);
- View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
- Assert.assertNotNull("The reference view couldnt be retrieved", newView);
- Edge newEdge = (Edge) newView;
- Bendpoints newBendpoints = newEdge.getBendpoints();
- Assert.assertEquals("The bendpoints should be the same on the new element", oldBendpoints, newBendpoints);
- Anchor newTargetAnchor = newEdge.getTargetAnchor();
- Assert.assertEquals("The target anchor should be the same on the new element", oldTargetAnchor, newTargetAnchor);
- Anchor newSourceAnchor = newEdge.getSourceAnchor();
- Assert.assertEquals("The source anchor should be the same on the new element", oldSourceAnchor, newSourceAnchor);
- View newSource = newEdge.getSource();
- Assert.assertEquals("The source should be the same on the new element", oldSource, newSource);
- View newTarget = newEdge.getTarget();
- Assert.assertEquals("The target should be the same on the new element", oldTarget, newTarget);
-
- Assert.assertTrue("The mutation command should be undoable", mutationCommand.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the bendpointsAndAnchorTest", ioe);
- }
-
- }
-
-
- /**
- * This test checks that the previously applied style, through a user manipulation, is still applied on the mutated element
- */
- @Test
- public void styleTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getComponent(),
- IETypesMap.get("Class"));
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate generalizationTarget") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(generalizationTarget);
- }
- };
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(generalizationTarget, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
- View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
- Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
- Shape oldShape = (Shape) oldView;
- int oldFillColor = oldShape.getFillColor();
-
- Assert.assertTrue("The mutation command should be executable", mutationCommand.canExecute());
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
- }
-
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertTrue("The new element should be an instance of Class", newElement instanceof org.eclipse.uml2.uml.Class);
- Assert.assertNotNull("The reference element couldnt be retrieved", newElement);
- View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
- Assert.assertNotNull("The reference view couldnt be retrieved", newView);
- Shape newShape = (Shape) newView;
- int newFillColor = newShape.getFillColor();
- Assert.assertEquals("The new element fillColor should be the same as the old one", oldFillColor, newFillColor);
-
- Assert.assertTrue("The mutation command should be undoable", mutationCommand.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
- }
-
- }
-
-
- // @Test
- // Not yet possible as there are no way to compare the hidden/shown compartments by their ids from an element to the next
- public void compartmentViewTest() {
- mutationTransformation = new MutationTransformation(mainPModelSet1, UMLPackage.eINSTANCE.getComponent(),
- IETypesMap.get("Class"));
- TransactionalEditingDomain editingDomain = mainPModelSet1.getTransactionalEditingDomain();
- CommandStack commandStack = editingDomain.getCommandStack();
- RecordingCommand mutationCommand = new RecordingCommand(editingDomain, "mutate generalizationTarget") {
-
- @Override
- protected void doExecute() {
- mutationTransformation.transformationToExecute(generalizationTarget);
- }
- };
- String oldXMIID = PapyrusRefactoringUtils.getRelatedXMIID(generalizationTarget, mainPModelSet1);
- EObject oldElement = PapyrusRefactoringUtils.getRelatedElement(oldXMIID, mainPModelSet1);
- Assert.assertNotNull("The reference element couldnt be retrieved", oldElement);
- View oldView = ModelNotationUtils.getRelatedView(oldElement, mainPModelSet1);
- Assert.assertNotNull("The reference view couldnt be retrieved", oldView);
-
- Assert.assertTrue("The mutation command should be executable", mutationCommand.canExecute());
- commandStack.execute(mutationCommand);
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
- }
-
- String newXMIID = PapyrusRefactoringUtils.getRelatedXMIID(mutationTransformation.getMutatedElement(), mainPModelSet1);
- EObject newElement = PapyrusRefactoringUtils.getRelatedElement(newXMIID, mainPModelSet1);
- Assert.assertTrue("The new element should be an instance of Class", newElement instanceof org.eclipse.uml2.uml.Class);
- Assert.assertNotNull("The reference element couldnt be retrieved", newElement);
- View newView = ModelNotationUtils.getRelatedView(newElement, mainPModelSet1);
- Assert.assertNotNull("The reference view couldnt be retrieved", newView);
-
- Assert.assertTrue("The mutation command should be undoable", mutationCommand.canUndo());
- commandStack.undo();
- try {
- mainPModelSet1.save(new NullProgressMonitor());
- } catch (IOException ioe) {
- Activator.log.error("Failed to save the modified resource during the compartmentViewTest", ioe);
- }
-
- }
-
-}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java
deleted file mode 100644
index abd07ffc04f..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/AbstractPapyrusRefactoringTestCase.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.tests.utils;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelUtils;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.types.ElementTypeConfiguration;
-import org.eclipse.papyrus.infra.types.ElementTypeSetConfiguration;
-import org.eclipse.papyrus.infra.types.core.registries.ElementTypeConfigurationTypeRegistry;
-import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry;
-import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
-import org.eclipse.papyrus.junit.utils.EditorUtils;
-import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
-import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
-import org.eclipse.papyrus.refactoring.core.AbstractPapyrusTransformation;
-import org.eclipse.papyrus.uml.refactoring.mutation.helper.MutationTransformation;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.PackageableElement;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.util.UMLUtil;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-
-/**
- * {@link TestCase} tests the Papyrus Refactoring Framework
- *
- */
-public class AbstractPapyrusRefactoringTestCase extends AbstractPapyrusTest implements ITestConstants {
-
- @ClassRule
- public static HouseKeeper.Static mainProjectHouseKeeper = new HouseKeeper.Static();
-
- public static HouseKeeper.Static secondaryProjectHouseKeeper = new HouseKeeper.Static();
-
- public static IProgressMonitor monitor = new NullProgressMonitor();
-
- /** The main project */
- protected static IProject mainProject;
-
- /** The file of the first main project's model */
- protected static ModelSet mainPModelSet1;
-
- public static Model mainPModel1RootModel;
-
- public static IFile mainPModel1File;
-
- /** The file of the second main project's model */
- protected static ModelSet mainPModelSet2;
-
- public static Model mainPModel2RootModel;
-
- public static IFile mainPModel2File;
-
- /** The secondary project */
- protected static IProject secondaryProject;
-
- /** The file of the first secondary project's model */
- protected static ModelSet secondaryPModelSet1;
-
- public static Model secondaryPModel1RootModel;
-
- public static IFile secondaryPModel1File;
-
- /** The workspace root */
- protected static IWorkspaceRoot root;
-
- /** The papyrus editor linked to the opened papyrus model */
- protected static IMultiDiagramEditor openPapyrusEditor;
-
- /** The editing domain of the modelSet */
- static TransactionalEditingDomain editingDomain;
-
- /** The Element of the First model */
- public static org.eclipse.uml2.uml.Class basicClass;
- public static org.eclipse.uml2.uml.Class classWithProperty;
- public static org.eclipse.uml2.uml.Property pClassWP;
- public static org.eclipse.uml2.uml.Class associationSource;
- public static org.eclipse.uml2.uml.Class associationTarget;
- public static org.eclipse.uml2.uml.Association association;
- public static org.eclipse.uml2.uml.Package parentPackage;
- public static org.eclipse.uml2.uml.Package childPackage;
- public static org.eclipse.uml2.uml.Class generalizationSource;
- public static org.eclipse.uml2.uml.Property gsProperty;
- public static org.eclipse.uml2.uml.Property gsHiddenProperty;
- public static org.eclipse.uml2.uml.Component generalizationTarget;
- public static org.eclipse.uml2.uml.Generalization generalization;
-
- public static Map<String, IElementType> IETypesMap;
-
- /** The papyrus mutation transformation */
- public static AbstractPapyrusTransformation fPapyrusMutationTransformation;
- public static MutationTransformation mutationTransformation;
-
-
- @BeforeClass
- public static void initWorkspace() {
- // Used to store the main mutation model and a second replace model
- createMainProject();
- // Used to test the mutation behavior throughout the workspace
- // createSecondaryProject();
-
- // import test model and profile
- try {
- Bundle bundle = Platform.getBundle("org.eclipse.papyrus.refactoring.tests");
- mainPModel1File = PapyrusProjectUtils.copyPapyrusModel(mainProject, bundle, "/resources/", "mainPModel1");
- PapyrusProjectUtils.copyPapyrusModel(mainProject, bundle, "/resources/", "refactoringProfile.profile");
- // mainPModel2File = PapyrusProjectUtils.copyPapyrusModel(mainProject, bundle, "/resources/", "mainPModel2");
- // secondaryPModel1File = PapyrusProjectUtils.copyPapyrusModel(secondaryProject, bundle, "/resources/", "secondaryPModel1");
- } catch (CoreException ce) {
- Assert.fail(ce.getMessage());
- } catch (IOException ioe) {
- Assert.fail(ioe.getMessage());
- }
-
- // open project
- Display.getDefault().syncExec(new Runnable() {
-
- @Override
- public void run() {
- try {
- openPapyrusEditor = mainProjectHouseKeeper.cleanUpLater(EditorUtils.openPapyrusEditor(mainPModel1File));
- } catch (PartInitException pie) {
- Assert.fail(pie.getMessage());
- }
- }
- });
-
- editingDomain = openPapyrusEditor.getAdapter(TransactionalEditingDomain.class);
- Assert.assertTrue("Impossible to init editing domain", editingDomain instanceof TransactionalEditingDomain);
-
- // retrieve UML model from this editor
- try {
- mainPModelSet1 = ModelUtils.getModelSetChecked(openPapyrusEditor.getServicesRegistry());
- UmlModel umlIModel = UmlUtils.getUmlModel(mainPModelSet1);
- mainPModel1RootModel = (Model) umlIModel.lookupRoot();
-
- Assert.assertNotNull("root model should not be null", mainPModel1RootModel);
-
- } catch (ServiceException se) {
- Assert.fail(se.getMessage());
- } catch (NotFoundException nfe) {
- Assert.fail(nfe.getMessage());
- } catch (ClassCastException cce) {
- Assert.fail(cce.getMessage());
- }
- try {
- initExistingElements();
- initIETypesMap();
- } catch (Exception e) {
- Assert.fail(e.getMessage());
- }
-
- }
-
- private static void initIETypesMap() {
- IETypesMap = new HashMap<>();
-
- IETypesMap.put("Model", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Model"));
- IETypesMap.put("Package", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Package"));
- IETypesMap.put("Class", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Class"));
- IETypesMap.put("Interface", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Interface"));
- IETypesMap.put("Component", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Component"));
- IETypesMap.put("Artifact", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Artifact"));
- IETypesMap.put("Property", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Property"));
- IETypesMap.put("Association", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Association"));
- IETypesMap.put("Generalization", ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Generalization"));
-
- }
-
- /**
- * Init fields corresponding to element in the test model
- */
- public static void initExistingElements() throws Exception {
- // A basic named Class
- PackageableElement pEClass = mainPModel1RootModel.getPackagedElement("basicClass");
- Assert.assertNotNull("basicClass" + " should not be null", pEClass);
- Assert.assertTrue("basicClass" + " should be a Class", pEClass instanceof org.eclipse.uml2.uml.Class);
- basicClass = (org.eclipse.uml2.uml.Class) pEClass;
-
-
- // A named Class containing a Property
- PackageableElement pEClassWP = mainPModel1RootModel.getPackagedElement("classWithProperty");
- Assert.assertNotNull("classWithProperty" + " should not be null", pEClassWP);
- Assert.assertTrue("classWithProperty" + " should be a Class", pEClassWP instanceof org.eclipse.uml2.uml.Class);
- classWithProperty = (org.eclipse.uml2.uml.Class) pEClassWP;
-
- pClassWP = classWithProperty.getAttribute("classProperty", UMLFactory.eINSTANCE.createProperty().getType());
- Assert.assertNotNull(classWithProperty.getQualifiedName() + "should contain a property", pClassWP);
-
-
- // Two named Classes linked by an Association
- PackageableElement pEClassASource = mainPModel1RootModel.getPackagedElement("associationSource");
- Assert.assertNotNull("associationSource" + " should not be null", pEClassASource);
- Assert.assertTrue("associationSource" + " should be a Class", pEClassASource instanceof org.eclipse.uml2.uml.Class);
- associationSource = (org.eclipse.uml2.uml.Class) pEClassASource;
-
- PackageableElement pEClassATarget = mainPModel1RootModel.getPackagedElement("associationTarget");
- Assert.assertNotNull("associationTarget" + " should not be null", pEClassATarget);
- Assert.assertTrue("associationTarget" + " should be a Class", pEClassATarget instanceof org.eclipse.uml2.uml.Class);
- associationTarget = (org.eclipse.uml2.uml.Class) pEClassATarget;
-
-
- PackageableElement pEAssociation = mainPModel1RootModel.getPackagedElement("Association");
- Assert.assertNotNull("Association" + " should not be null", pEAssociation);
- Assert.assertTrue("Association" + " should be an Association", pEAssociation instanceof org.eclipse.uml2.uml.Association);
- association = (org.eclipse.uml2.uml.Association) pEAssociation;
-
- List<Type> memeberEnds = new ArrayList<>();
- for (Property property : association.getMemberEnds()) {
- Type type = property.getType();
- memeberEnds.add(type);
- }
- Assert.assertTrue(association.getQualifiedName() + "should have " + associationSource.getQualifiedName() + " as a memberEnd",
- memeberEnds.contains(associationSource));
- Assert.assertTrue(association.getQualifiedName() + "should have " + associationTarget.getQualifiedName() + " as a memberEnd",
- memeberEnds.contains(associationTarget));
-
-
- // A named Package, containing another named Package,
- // containing named Component Generalized by a named Class, containing a Property colored in pink
- PackageableElement pEPackageParent = mainPModel1RootModel.getPackagedElement("parentPackage");
- Assert.assertNotNull("parentPackage" + " should not be null", pEPackageParent);
- Assert.assertTrue("parentPackage" + " should be a Package", pEPackageParent instanceof org.eclipse.uml2.uml.Package);
- parentPackage = (org.eclipse.uml2.uml.Package) pEPackageParent;
-
- PackageableElement pEPackageChild = parentPackage.getPackagedElement("childPackage");
- Assert.assertNotNull("childPackage" + " should not be null", pEPackageChild);
- Assert.assertTrue("childPackage" + " should be a Package", pEPackageChild instanceof org.eclipse.uml2.uml.Package);
- childPackage = (org.eclipse.uml2.uml.Package) pEPackageChild;
-
- PackageableElement pEPackageCWP = childPackage.getPackagedElement("generalizationSource");
- Assert.assertNotNull("generalizationSource" + " should not be null", pEPackageCWP);
- Assert.assertTrue("generalizationSource" + " should be a Class", pEPackageCWP instanceof org.eclipse.uml2.uml.Class);
- generalizationSource = (org.eclipse.uml2.uml.Class) pEPackageCWP;
-
- gsProperty = generalizationSource.getAttribute("generalizationSourceProperty", UMLFactory.eINSTANCE.createProperty().getType());
- Assert.assertNotNull(generalizationSource.getQualifiedName() + "should contain a displayed property", gsProperty);
- gsHiddenProperty = generalizationSource.getAttribute("generalizationSourceHiddenProperty", UMLFactory.eINSTANCE.createProperty().getType());
- Assert.assertNotNull(generalizationSource.getQualifiedName() + "should contain a hidden property", gsHiddenProperty);
-
- PackageableElement pEPackageCp = childPackage.getPackagedElement("generalizationTarget");
- Assert.assertNotNull("generalizationTarget" + " should not be null", pEPackageCp);
- Assert.assertTrue("generalizationTarget" + " should be a Component", pEPackageCp instanceof org.eclipse.uml2.uml.Component);
- generalizationTarget = (org.eclipse.uml2.uml.Component) pEPackageCp;
-
- generalization = generalizationSource.getGeneralization(generalizationTarget);
- Assert.assertNotNull("Generalization" + " should not be null", generalization);
-
- }
-
-
- public static void createMainProject() {
- mainProject = mainProjectHouseKeeper.createProject(MAINP_NAME);
- // The root will be the same for both projects as they will share the same workspace
- root = mainProject.getWorkspace().getRoot();
- }
-
- public static void createSecondaryProject() {
- secondaryProject = secondaryProjectHouseKeeper.createProject(SECONDARYP_NAME);
- }
-
-
- @Before
- public void setUp() throws Exception {
-
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void test() {
- Assert.assertTrue(true);
- }
-
-}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java
deleted file mode 100644
index 4583d57b1e3..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/ITestConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.tests.utils;
-
-public interface ITestConstants {
-
- // Save parameters for the created resources
- public static String RESOURCES_FOLDERNAME = "resources";
-
- public static String RESOURCES_ENCODING = "UTF-8";
-
- // Projects housing the test models
- public static String MAINP_NAME = "RefactoringMainProject";
-
- public static String SECONDARYP_NAME = "RefactoringSecondaryProject";
-
- // Models manipalted
- public static String RESOURCES_MAINP_MODELNAME1 = "refactoringMainModel1";
-
- public static String RESOURCES_MAINP_MODELNAME2 = "refactoringMainModel2";
-
- public static String RESOURCES_SECONDARYP_MODELNAME1 = "refactoringSecondaryModel1";
-
-
- // Init UML Test model
- public static String ROOTMODEL_NAME = "RefactoringModelRoot";
-
-}
diff --git a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java b/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java
deleted file mode 100644
index 9d6597cb2c9..00000000000
--- a/tests/junit/extraplugins/refactoring/org.eclipse.papyrus.refactoring.tests/src/org/eclipse/papyrus/refactoring/tests/utils/PapyrusRefactoringTestsUtils.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST.
- *
- *
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.refactoring.tests.utils;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * Test {@link PapyrusRefactoring}
- *
- */
-public class PapyrusRefactoringTestsUtils extends AbstractPapyrusRefactoringTestCase {
-
- public static Set<EObject> getAllContainedElements(EObject parent) {
- Set<EObject> containedElements = new HashSet<>();
- Iterator<EObject> iterator = parent.eAllContents();
-
- while (iterator.hasNext()) {
- containedElements.add(iterator.next());
- }
-
- return containedElements;
- }
-
-}

Back to the top