Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/META-INF/MANIFEST.MF4
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/RSAToPapyrusParameters.ctx1
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/ui/SingleMappingParameters.xwt9
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/RSAToPapyrusParameters.ecore2
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.genmodel2
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.notation359
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.uml7
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/MappingParameters.java17
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/RSAToPapyrusParametersPackage.java33
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/MappingParametersImpl.java39
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/RSAToPapyrusParametersPackageImpl.java14
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ConfigHelper.java113
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformation.java169
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java144
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java212
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ui/URIMappingDialog.java51
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java3
18 files changed, 856 insertions, 325 deletions
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/META-INF/MANIFEST.MF b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/META-INF/MANIFEST.MF
index 93cdd557dc1..bef05cba53c 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/META-INF/MANIFEST.MF
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/META-INF/MANIFEST.MF
@@ -31,7 +31,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.swt,
org.eclipse.ui.workbench,
org.eclipse.ui.navigator;bundle-version="3.5.0",
- com.google.guava;bundle-version="11.0.0"
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.uml.modelrepair;bundle-version="1.0.1",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.1"
Export-Package: org.eclipse.papyrus.migration.rsa,
org.eclipse.papyrus.migration.rsa.handler,
org.eclipse.papyrus.migration.rsa.transformation,
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/RSAToPapyrusParameters.ctx b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/RSAToPapyrusParameters.ctx
index 40ab1722cf4..35de1c5568a 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/RSAToPapyrusParameters.ctx
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/RSAToPapyrusParameters.ctx
@@ -74,6 +74,7 @@
</elements>
<elements xmi:id="_zJ4D8XZLEeSwiJkQAQl2Jg" name="MappingParameters">
<properties xmi:id="_zJ4D8nZLEeSwiJkQAQl2Jg" name="uriMappings" label="URI Mappings" type="Reference" multiplicity="-1" description="When models/libraries have been migrated separately, maps the libraries imported from RSA to their Papyrus equivalent"/>
+ <properties name="profileUriMappings" label="Profile URI Mappings" type="Reference" multiplicity="-1" description="When profiles have been migrated separately, maps the profiles imported from RSA to their Papyrus equivalent"/>
</elements>
<elements xmi:id="_zJ4D83ZLEeSwiJkQAQl2Jg" name="URIMapping">
<properties xmi:id="_zJ4D9HZLEeSwiJkQAQl2Jg" name="sourceURI"/>
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/ui/SingleMappingParameters.xwt b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/ui/SingleMappingParameters.xwt
index 702166db258..c9c2279988c 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/ui/SingleMappingParameters.xwt
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/dialog/ui/SingleMappingParameters.xwt
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+<Composite xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
<Composite.layout>
<ppel:PropertiesLayout></ppel:PropertiesLayout>
</Composite.layout>
@@ -11,5 +11,8 @@
</Composite.layout>
<ppe:MultiReference input="{Binding}"
property="RSAToPapyrusParameters:MappingParameters:uriMappings"></ppe:MultiReference>
+ <ppe:MultiReference
+ property="RSAToPapyrusParameters:MappingParameters:profileUriMappings"
+ input="{Binding}"></ppe:MultiReference>
</Composite>
</Composite> \ No newline at end of file
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/RSAToPapyrusParameters.ecore b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/RSAToPapyrusParameters.ecore
index 55c3df6eab2..c05e775b17c 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/RSAToPapyrusParameters.ecore
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/RSAToPapyrusParameters.ecore
@@ -55,6 +55,8 @@
<details key="documentation" value="When models/libraries have been migrated separately, maps the libraries imported from RSA to their Papyrus equivalent"/>
</eAnnotations>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="profileUriMappings" ordered="false"
+ upperBound="-1" eType="#//URIMapping" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="URIMapping">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceURI" ordered="false"
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.genmodel b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.genmodel
index b37515808b0..5f575afbc7b 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.genmodel
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.genmodel
@@ -48,6 +48,8 @@
<genClasses xsi:type="genmodel:GenClass" ecoreClass="RSAToPapyrusParameters.ecore#//MappingParameters">
<genFeatures xsi:type="genmodel:GenFeature" property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference RSAToPapyrusParameters.ecore#//MappingParameters/uriMappings"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="None" children="true"
+ createChild="true" ecoreFeature="ecore:EReference RSAToPapyrusParameters.ecore#//MappingParameters/profileUriMappings"/>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="RSAToPapyrusParameters.ecore#//URIMapping">
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute RSAToPapyrusParameters.ecore#//URIMapping/sourceURI"/>
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.notation b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.notation
index ad25be5fbf7..f93925c9811 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.notation
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.notation
@@ -1,189 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" 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="_ffjeAEL1EeSSlqpbHKLCqA" type="PapyrusUMLClassDiagram" name="Config" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_tKu0kUL1EeSSlqpbHKLCqA" type="2008">
- <children xmi:type="notation:DecorationNode" xmi:id="_tKu0k0L1EeSSlqpbHKLCqA" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tKu0lEL1EeSSlqpbHKLCqA" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_So1agHZLEeSwiJkQAQl2Jg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_So1agXZLEeSwiJkQAQl2Jg" key="visible" value="true"/>
- </eAnnotations>
- <children xmi:type="notation:Shape" xmi:id="_AblmMFOJEeSGbsrkEkSKIA" type="3012">
- <styles xmi:type="notation:StringListValueStyle" xmi:id="_GLzRUFOJEeSGbsrkEkSKIA" name="maskLabel">
- <stringListValue>visibility</stringListValue>
- <stringListValue>name</stringListValue>
- <stringListValue>derived</stringListValue>
- <stringListValue>multiplicity</stringListValue>
- <stringListValue>defaultValue</stringListValue>
- <stringListValue>type</stringListValue>
- </styles>
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_AYwUoFOJEeSGbsrkEkSKIA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_AblmMVOJEeSGbsrkEkSKIA"/>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" 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">
+ <notation:Diagram xmi:id="_ffjeAEL1EeSSlqpbHKLCqA" type="PapyrusUMLClassDiagram" name="Config" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_tKu0kUL1EeSSlqpbHKLCqA" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_tKu0k0L1EeSSlqpbHKLCqA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tKu0lEL1EeSSlqpbHKLCqA" type="7017">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_So1agHZLEeSwiJkQAQl2Jg" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_So1agXZLEeSwiJkQAQl2Jg" key="visible" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_AblmMFOJEeSGbsrkEkSKIA" type="3012">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_GLzRUFOJEeSGbsrkEkSKIA" name="maskLabel">
+ <stringListValue>visibility</stringListValue>
+ <stringListValue>name</stringListValue>
+ <stringListValue>derived</stringListValue>
+ <stringListValue>multiplicity</stringListValue>
+ <stringListValue>defaultValue</stringListValue>
+ <stringListValue>type</stringListValue>
+ </styles>
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_AYwUoFOJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_AblmMVOJEeSGbsrkEkSKIA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_WuBhgEL2EeSSlqpbHKLCqA" type="3012">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_aEtJcEL2EeSSlqpbHKLCqA" name="maskLabel">
+ <stringListValue>visibility</stringListValue>
+ <stringListValue>name</stringListValue>
+ <stringListValue>derived</stringListValue>
+ <stringListValue>multiplicity</stringListValue>
+ <stringListValue>defaultValue</stringListValue>
+ <stringListValue>type</stringListValue>
+ </styles>
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_Wt4XkEL2EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_WuBhgUL2EeSSlqpbHKLCqA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_t5AP0EL1EeSSlqpbHKLCqA" type="3012">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_Ko_pYEL2EeSSlqpbHKLCqA" name="maskLabel">
+ <stringListValue>visibility</stringListValue>
+ <stringListValue>name</stringListValue>
+ <stringListValue>derived</stringListValue>
+ <stringListValue>multiplicity</stringListValue>
+ <stringListValue>defaultValue</stringListValue>
+ <stringListValue>type</stringListValue>
+ </styles>
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_t42e0EL1EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_t5AP0UL1EeSSlqpbHKLCqA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_65zMoEL1EeSSlqpbHKLCqA" type="3012">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_KNn8AEL2EeSSlqpbHKLCqA" name="maskLabel">
+ <stringListValue>visibility</stringListValue>
+ <stringListValue>name</stringListValue>
+ <stringListValue>derived</stringListValue>
+ <stringListValue>multiplicity</stringListValue>
+ <stringListValue>defaultValue</stringListValue>
+ <stringListValue>type</stringListValue>
+ </styles>
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_65pboEL1EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_65zMoUL1EeSSlqpbHKLCqA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Mv8HwUL2EeSSlqpbHKLCqA" type="3012">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_VFcaIEL2EeSSlqpbHKLCqA" name="maskLabel">
+ <stringListValue>visibility</stringListValue>
+ <stringListValue>name</stringListValue>
+ <stringListValue>derived</stringListValue>
+ <stringListValue>multiplicity</stringListValue>
+ <stringListValue>defaultValue</stringListValue>
+ <stringListValue>type</stringListValue>
+ </styles>
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_Mv8HwEL2EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Mv8HwkL2EeSSlqpbHKLCqA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_JWjgUXcbEeSwiJkQAQl2Jg" type="3012">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_Ro7mMHcbEeSwiJkQAQl2Jg" name="maskLabel">
+ <stringListValue>visibility</stringListValue>
+ <stringListValue>name</stringListValue>
+ <stringListValue>derived</stringListValue>
+ <stringListValue>multiplicity</stringListValue>
+ <stringListValue>defaultValue</stringListValue>
+ <stringListValue>type</stringListValue>
+ </styles>
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_JWjgUHcbEeSwiJkQAQl2Jg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_JWjgUncbEeSwiJkQAQl2Jg"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tKu0lUL1EeSSlqpbHKLCqA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tKu0lkL1EeSSlqpbHKLCqA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tKu0l0L1EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0mEL1EeSSlqpbHKLCqA"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_WuBhgEL2EeSSlqpbHKLCqA" type="3012">
- <styles xmi:type="notation:StringListValueStyle" xmi:id="_aEtJcEL2EeSSlqpbHKLCqA" name="maskLabel">
- <stringListValue>visibility</stringListValue>
- <stringListValue>name</stringListValue>
- <stringListValue>derived</stringListValue>
- <stringListValue>multiplicity</stringListValue>
- <stringListValue>defaultValue</stringListValue>
- <stringListValue>type</stringListValue>
- </styles>
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_Wt4XkEL2EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_WuBhgUL2EeSSlqpbHKLCqA"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tKu0mUL1EeSSlqpbHKLCqA" visible="false" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tKu0mkL1EeSSlqpbHKLCqA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tKu0m0L1EeSSlqpbHKLCqA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tKu0nEL1EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0nUL1EeSSlqpbHKLCqA"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_t5AP0EL1EeSSlqpbHKLCqA" type="3012">
- <styles xmi:type="notation:StringListValueStyle" xmi:id="_Ko_pYEL2EeSSlqpbHKLCqA" name="maskLabel">
- <stringListValue>visibility</stringListValue>
- <stringListValue>name</stringListValue>
- <stringListValue>derived</stringListValue>
- <stringListValue>multiplicity</stringListValue>
- <stringListValue>defaultValue</stringListValue>
- <stringListValue>type</stringListValue>
- </styles>
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_t42e0EL1EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_t5AP0UL1EeSSlqpbHKLCqA"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tKu0nkL1EeSSlqpbHKLCqA" visible="false" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tKu0n0L1EeSSlqpbHKLCqA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tKu0oEL1EeSSlqpbHKLCqA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tKu0oUL1EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0okL1EeSSlqpbHKLCqA"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_65zMoEL1EeSSlqpbHKLCqA" type="3012">
- <styles xmi:type="notation:StringListValueStyle" xmi:id="_KNn8AEL2EeSSlqpbHKLCqA" name="maskLabel">
- <stringListValue>visibility</stringListValue>
- <stringListValue>name</stringListValue>
- <stringListValue>derived</stringListValue>
- <stringListValue>multiplicity</stringListValue>
- <stringListValue>defaultValue</stringListValue>
- <stringListValue>type</stringListValue>
- </styles>
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_65pboEL1EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_65zMoUL1EeSSlqpbHKLCqA"/>
+ <element xmi:type="uml:Class" href="rsaToPapyrusParameters.uml#_tKu0kEL1EeSSlqpbHKLCqA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0kkL1EeSSlqpbHKLCqA" x="79" y="55" width="373" height="129"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_MDv8IFOJEeSGbsrkEkSKIA" type="2010">
+ <children xmi:type="notation:DecorationNode" xmi:id="_MDv8IlOJEeSGbsrkEkSKIA" type="5035"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MDv8I1OJEeSGbsrkEkSKIA" type="7020">
+ <children xmi:type="notation:Shape" xmi:id="_MiP2AVOJEeSGbsrkEkSKIA" type="3018">
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_MiP2AFOJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MiP2AlOJEeSGbsrkEkSKIA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_O-nKwFOJEeSGbsrkEkSKIA" type="3018">
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_O-dZwFOJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_O-nKwVOJEeSGbsrkEkSKIA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MDv8JFOJEeSGbsrkEkSKIA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MDv8JVOJEeSGbsrkEkSKIA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MDv8JlOJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MDv8J1OJEeSGbsrkEkSKIA"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_Mv8HwUL2EeSSlqpbHKLCqA" type="3012">
- <styles xmi:type="notation:StringListValueStyle" xmi:id="_VFcaIEL2EeSSlqpbHKLCqA" name="maskLabel">
- <stringListValue>visibility</stringListValue>
- <stringListValue>name</stringListValue>
- <stringListValue>derived</stringListValue>
- <stringListValue>multiplicity</stringListValue>
- <stringListValue>defaultValue</stringListValue>
- <stringListValue>type</stringListValue>
- </styles>
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_Mv8HwEL2EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_Mv8HwkL2EeSSlqpbHKLCqA"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_MDv8KFOJEeSGbsrkEkSKIA" visible="false" type="7021">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MDv8KVOJEeSGbsrkEkSKIA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_MDv8KlOJEeSGbsrkEkSKIA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_MDv8K1OJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MDv8LFOJEeSGbsrkEkSKIA"/>
+ </children>
+ <element xmi:type="uml:DataType" href="rsaToPapyrusParameters.uml#_MDmyMFOJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MDv8IVOJEeSGbsrkEkSKIA" x="495" y="246" height="112"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_erBPcXZKEeSwiJkQAQl2Jg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_erBPc3ZKEeSwiJkQAQl2Jg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_erBPdHZKEeSwiJkQAQl2Jg" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_LgpPEVOJEeSGbsrkEkSKIA" type="3012">
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_LgpPEFOJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LgpPElOJEeSGbsrkEkSKIA"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_pSQoEIQ5EeSC0ajaKNekyw" type="3012">
+ <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_pR2YYIQ5EeSC0ajaKNekyw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_pSQoEYQ5EeSC0ajaKNekyw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_erBPdXZKEeSwiJkQAQl2Jg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_erBPdnZKEeSwiJkQAQl2Jg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_erBPd3ZKEeSwiJkQAQl2Jg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPeHZKEeSwiJkQAQl2Jg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_erBPeXZKEeSwiJkQAQl2Jg" visible="false" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_erBPenZKEeSwiJkQAQl2Jg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_erBPe3ZKEeSwiJkQAQl2Jg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_erBPfHZKEeSwiJkQAQl2Jg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPfXZKEeSwiJkQAQl2Jg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_erBPfnZKEeSwiJkQAQl2Jg" visible="false" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_erBPf3ZKEeSwiJkQAQl2Jg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_erBPgHZKEeSwiJkQAQl2Jg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_erBPgXZKEeSwiJkQAQl2Jg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPgnZKEeSwiJkQAQl2Jg"/>
+ </children>
+ <element xmi:type="uml:Class" href="rsaToPapyrusParameters.uml#_erBPcHZKEeSwiJkQAQl2Jg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPcnZKEeSwiJkQAQl2Jg" x="79" y="248" width="373" height="112"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_ffjeAUL1EeSSlqpbHKLCqA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ffjeAkL1EeSSlqpbHKLCqA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ffjeA0L1EeSSlqpbHKLCqA">
+ <owner xmi:type="uml:Model" href="rsaToPapyrusParameters.uml#_fduSAEL1EeSSlqpbHKLCqA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="rsaToPapyrusParameters.uml#_fduSAEL1EeSSlqpbHKLCqA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_sluPwHZKEeSwiJkQAQl2Jg" type="4001" source="_tKu0kUL1EeSSlqpbHKLCqA" target="_erBPcXZKEeSwiJkQAQl2Jg" routing="Rectilinear">
+ <children xmi:type="notation:DecorationNode" xmi:id="_sluPw3ZKEeSwiJkQAQl2Jg" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPxHZKEeSwiJkQAQl2Jg" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_sluPxXZKEeSwiJkQAQl2Jg" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPxnZKEeSwiJkQAQl2Jg" y="20"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_JWjgUXcbEeSwiJkQAQl2Jg" type="3012">
- <styles xmi:type="notation:StringListValueStyle" xmi:id="_Ro7mMHcbEeSwiJkQAQl2Jg" name="maskLabel">
- <stringListValue>visibility</stringListValue>
+ <children xmi:type="notation:DecorationNode" xmi:id="_sluPx3ZKEeSwiJkQAQl2Jg" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPyHZKEeSwiJkQAQl2Jg" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_sluPyXZKEeSwiJkQAQl2Jg" type="6005">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_9TsB4HZKEeSwiJkQAQl2Jg" name="maskLabel">
<stringListValue>name</stringListValue>
<stringListValue>derived</stringListValue>
<stringListValue>multiplicity</stringListValue>
- <stringListValue>defaultValue</stringListValue>
- <stringListValue>type</stringListValue>
</styles>
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_JWjgUHcbEeSwiJkQAQl2Jg"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_JWjgUncbEeSwiJkQAQl2Jg"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_tKu0lUL1EeSSlqpbHKLCqA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_tKu0lkL1EeSSlqpbHKLCqA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_tKu0l0L1EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0mEL1EeSSlqpbHKLCqA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tKu0mUL1EeSSlqpbHKLCqA" visible="false" type="7018">
- <styles xmi:type="notation:TitleStyle" xmi:id="_tKu0mkL1EeSSlqpbHKLCqA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_tKu0m0L1EeSSlqpbHKLCqA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_tKu0nEL1EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0nUL1EeSSlqpbHKLCqA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tKu0nkL1EeSSlqpbHKLCqA" visible="false" type="7019">
- <styles xmi:type="notation:TitleStyle" xmi:id="_tKu0n0L1EeSSlqpbHKLCqA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_tKu0oEL1EeSSlqpbHKLCqA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_tKu0oUL1EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0okL1EeSSlqpbHKLCqA"/>
- </children>
- <element xmi:type="uml:Class" href="rsaToPapyrusParameters.uml#_tKu0kEL1EeSSlqpbHKLCqA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKu0kkL1EeSSlqpbHKLCqA" x="79" y="55" width="373" height="129"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_MDv8IFOJEeSGbsrkEkSKIA" type="2010">
- <children xmi:type="notation:DecorationNode" xmi:id="_MDv8IlOJEeSGbsrkEkSKIA" type="5035"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_MDv8I1OJEeSGbsrkEkSKIA" type="7020">
- <children xmi:type="notation:Shape" xmi:id="_MiP2AVOJEeSGbsrkEkSKIA" type="3018">
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_MiP2AFOJEeSGbsrkEkSKIA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_MiP2AlOJEeSGbsrkEkSKIA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPynZKEeSwiJkQAQl2Jg" x="-30" y="77"/>
</children>
- <children xmi:type="notation:Shape" xmi:id="_O-nKwFOJEeSGbsrkEkSKIA" type="3018">
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_O-dZwFOJEeSGbsrkEkSKIA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_O-nKwVOJEeSGbsrkEkSKIA"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_sluPy3ZKEeSwiJkQAQl2Jg" visible="false" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPzHZKEeSwiJkQAQl2Jg" y="20"/>
</children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_MDv8JFOJEeSGbsrkEkSKIA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_MDv8JVOJEeSGbsrkEkSKIA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_MDv8JlOJEeSGbsrkEkSKIA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MDv8J1OJEeSGbsrkEkSKIA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_MDv8KFOJEeSGbsrkEkSKIA" visible="false" type="7021">
- <styles xmi:type="notation:TitleStyle" xmi:id="_MDv8KVOJEeSGbsrkEkSKIA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_MDv8KlOJEeSGbsrkEkSKIA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_MDv8K1OJEeSGbsrkEkSKIA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MDv8LFOJEeSGbsrkEkSKIA"/>
- </children>
- <element xmi:type="uml:DataType" href="rsaToPapyrusParameters.uml#_MDmyMFOJEeSGbsrkEkSKIA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MDv8IVOJEeSGbsrkEkSKIA" x="495" y="246" height="112"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_erBPcXZKEeSwiJkQAQl2Jg" type="2008">
- <children xmi:type="notation:DecorationNode" xmi:id="_erBPc3ZKEeSwiJkQAQl2Jg" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_erBPdHZKEeSwiJkQAQl2Jg" type="7017">
- <children xmi:type="notation:Shape" xmi:id="_LgpPEVOJEeSGbsrkEkSKIA" type="3012">
- <element xmi:type="uml:Property" href="rsaToPapyrusParameters.uml#_LgpPEFOJEeSGbsrkEkSKIA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_LgpPElOJEeSGbsrkEkSKIA"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_sluPzXZKEeSwiJkQAQl2Jg" visible="false" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPznZKEeSwiJkQAQl2Jg" x="-28" y="-38"/>
</children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_erBPdXZKEeSwiJkQAQl2Jg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_erBPdnZKEeSwiJkQAQl2Jg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_erBPd3ZKEeSwiJkQAQl2Jg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPeHZKEeSwiJkQAQl2Jg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_erBPeXZKEeSwiJkQAQl2Jg" visible="false" type="7018">
- <styles xmi:type="notation:TitleStyle" xmi:id="_erBPenZKEeSwiJkQAQl2Jg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_erBPe3ZKEeSwiJkQAQl2Jg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_erBPfHZKEeSwiJkQAQl2Jg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPfXZKEeSwiJkQAQl2Jg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_erBPfnZKEeSwiJkQAQl2Jg" visible="false" type="7019">
- <styles xmi:type="notation:TitleStyle" xmi:id="_erBPf3ZKEeSwiJkQAQl2Jg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_erBPgHZKEeSwiJkQAQl2Jg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_erBPgXZKEeSwiJkQAQl2Jg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPgnZKEeSwiJkQAQl2Jg"/>
- </children>
- <element xmi:type="uml:Class" href="rsaToPapyrusParameters.uml#_erBPcHZKEeSwiJkQAQl2Jg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_erBPcnZKEeSwiJkQAQl2Jg" x="79" y="248" width="373" height="112"/>
- </children>
- <styles xmi:type="notation:StringValueStyle" xmi:id="_ffjeAUL1EeSSlqpbHKLCqA" name="diagram_compatibility_version" stringValue="1.0.0"/>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_ffjeAkL1EeSSlqpbHKLCqA"/>
- <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ffjeA0L1EeSSlqpbHKLCqA">
- <owner xmi:type="uml:Model" href="rsaToPapyrusParameters.uml#_fduSAEL1EeSSlqpbHKLCqA"/>
- </styles>
- <element xmi:type="uml:Model" href="rsaToPapyrusParameters.uml#_fduSAEL1EeSSlqpbHKLCqA"/>
- <edges xmi:type="notation:Connector" xmi:id="_sluPwHZKEeSwiJkQAQl2Jg" type="4001" source="_tKu0kUL1EeSSlqpbHKLCqA" target="_erBPcXZKEeSwiJkQAQl2Jg" routing="Rectilinear">
- <children xmi:type="notation:DecorationNode" xmi:id="_sluPw3ZKEeSwiJkQAQl2Jg" type="6001">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPxHZKEeSwiJkQAQl2Jg" y="-20"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_sluPxXZKEeSwiJkQAQl2Jg" type="6002">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPxnZKEeSwiJkQAQl2Jg" y="20"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_sluPx3ZKEeSwiJkQAQl2Jg" visible="false" type="6003">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPyHZKEeSwiJkQAQl2Jg" y="-20"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_sluPyXZKEeSwiJkQAQl2Jg" type="6005">
- <styles xmi:type="notation:StringListValueStyle" xmi:id="_9TsB4HZKEeSwiJkQAQl2Jg" name="maskLabel">
- <stringListValue>name</stringListValue>
- <stringListValue>derived</stringListValue>
- <stringListValue>multiplicity</stringListValue>
- </styles>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPynZKEeSwiJkQAQl2Jg" x="-30" y="77"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_sluPy3ZKEeSwiJkQAQl2Jg" visible="false" type="6033">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPzHZKEeSwiJkQAQl2Jg" y="20"/>
- </children>
- <children xmi:type="notation:DecorationNode" xmi:id="_sluPzXZKEeSwiJkQAQl2Jg" visible="false" type="6034">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_sluPznZKEeSwiJkQAQl2Jg" x="-28" y="-38"/>
- </children>
- <styles xmi:type="notation:FontStyle" xmi:id="_sluPwXZKEeSwiJkQAQl2Jg"/>
- <element xmi:type="uml:Association" href="rsaToPapyrusParameters.uml#_slkew3ZKEeSwiJkQAQl2Jg"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_sluPwnZKEeSwiJkQAQl2Jg" points="[-9, 1, -101, -81]$[-9, 82, -101, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sl4AwHZKEeSwiJkQAQl2Jg" id="(0.47257383966244726,0.9642857142857143)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5rS-4HZKEeSwiJkQAQl2Jg" id="(0.4936708860759494,0.0)"/>
- </edges>
-</notation:Diagram>
+ <styles xmi:type="notation:FontStyle" xmi:id="_sluPwXZKEeSwiJkQAQl2Jg"/>
+ <element xmi:type="uml:Association" href="rsaToPapyrusParameters.uml#_slkew3ZKEeSwiJkQAQl2Jg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_sluPwnZKEeSwiJkQAQl2Jg" points="[-9, 1, -101, -81]$[-9, 82, -101, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sl4AwHZKEeSwiJkQAQl2Jg" id="(0.47257383966244726,0.9642857142857143)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5rS-4HZKEeSwiJkQAQl2Jg" id="(0.4936708860759494,0.0)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_n2Dv0IQ5EeSC0ajaKNekyw"/>
+</xmi:XMI>
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.uml b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.uml
index 511b109cd4a..bf6fb49370a 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.uml
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/model/ui/rsaToPapyrusParameters.uml
@@ -85,6 +85,13 @@ More threads will provide faster results, at the cost of memory consumption.</bo
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_T5kB0FOJEeSGbsrkEkSKIA"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_T5kB0VOJEeSGbsrkEkSKIA" value="*"/>
</ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_pR2YYIQ5EeSC0ajaKNekyw" name="profileUriMappings" visibility="public" type="_MDmyMFOJEeSGbsrkEkSKIA" aggregation="composite">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_49zT4IQ5EeSC0ajaKNekyw" annotatedElement="_pR2YYIQ5EeSC0ajaKNekyw">
+ <body>When profiles have been migrated separately, maps the profiles imported from RSA to their Papyrus equivalent</body>
+ </ownedComment>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qweSgIQ5EeSC0ajaKNekyw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qwfgoIQ5EeSC0ajaKNekyw" value="*"/>
+ </ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="_slkew3ZKEeSwiJkQAQl2Jg" memberEnd="_slkexHZKEeSwiJkQAQl2Jg _slkewHZKEeSwiJkQAQl2Jg">
<ownedEnd xmi:type="uml:Property" xmi:id="_slkexHZKEeSwiJkQAQl2Jg" name="config" type="_tKu0kEL1EeSSlqpbHKLCqA" association="_slkew3ZKEeSwiJkQAQl2Jg">
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/MappingParameters.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/MappingParameters.java
index 4cc08f702a8..8e201bd83f4 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/MappingParameters.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/MappingParameters.java
@@ -24,6 +24,7 @@ import org.eclipse.emf.ecore.EObject;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.MappingParameters#getUriMappings <em>Uri Mappings</em>}</li>
+ * <li>{@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.MappingParameters#getProfileUriMappings <em>Profile Uri Mappings</em>}</li>
* </ul>
* </p>
*
@@ -48,4 +49,20 @@ public interface MappingParameters extends EObject {
*/
EList<URIMapping> getUriMappings();
+ /**
+ * Returns the value of the '<em><b>Profile Uri Mappings</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.URIMapping}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Profile Uri Mappings</em>' containment reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Profile Uri Mappings</em>' containment reference list.
+ * @see org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.RSAToPapyrusParametersPackage#getMappingParameters_ProfileUriMappings()
+ * @model containment="true" ordered="false"
+ * @generated
+ */
+ EList<URIMapping> getProfileUriMappings();
+
} // MappingParameters
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/RSAToPapyrusParametersPackage.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/RSAToPapyrusParametersPackage.java
index 071d7177d3b..99d8b1d8a94 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/RSAToPapyrusParametersPackage.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/RSAToPapyrusParametersPackage.java
@@ -194,6 +194,16 @@ public interface RSAToPapyrusParametersPackage extends EPackage {
int MAPPING_PARAMETERS__URI_MAPPINGS = 0;
/**
+ * The feature id for the '<em><b>Profile Uri Mappings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS = 1;
+
+ /**
* The number of structural features of the '<em>Mapping Parameters</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -201,7 +211,7 @@ public interface RSAToPapyrusParametersPackage extends EPackage {
* @generated
* @ordered
*/
- int MAPPING_PARAMETERS_FEATURE_COUNT = 1;
+ int MAPPING_PARAMETERS_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>Mapping Parameters</em>' class.
@@ -384,6 +394,18 @@ public interface RSAToPapyrusParametersPackage extends EPackage {
EReference getMappingParameters_UriMappings();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.MappingParameters#getProfileUriMappings <em>Profile Uri Mappings</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Profile Uri Mappings</em>'.
+ * @see org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.MappingParameters#getProfileUriMappings()
+ * @see #getMappingParameters()
+ * @generated
+ */
+ EReference getMappingParameters_ProfileUriMappings();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.URIMapping <em>URI Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -538,6 +560,15 @@ public interface RSAToPapyrusParametersPackage extends EPackage {
EReference MAPPING_PARAMETERS__URI_MAPPINGS = eINSTANCE.getMappingParameters_UriMappings();
/**
+ * The meta object literal for the '<em><b>Profile Uri Mappings</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS = eINSTANCE.getMappingParameters_ProfileUriMappings();
+
+ /**
* The meta object literal for the '{@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.impl.URIMappingImpl <em>URI Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/MappingParametersImpl.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/MappingParametersImpl.java
index 4e8feb5be24..528a72c4d76 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/MappingParametersImpl.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/MappingParametersImpl.java
@@ -37,6 +37,7 @@ import org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.URIMapping;
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.impl.MappingParametersImpl#getUriMappings <em>Uri Mappings</em>}</li>
+ * <li>{@link org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.impl.MappingParametersImpl#getProfileUriMappings <em>Profile Uri Mappings</em>}</li>
* </ul>
* </p>
*
@@ -55,6 +56,17 @@ public class MappingParametersImpl extends MinimalEObjectImpl.Container implemen
protected EList<URIMapping> uriMappings;
/**
+ * The cached value of the '{@link #getProfileUriMappings() <em>Profile Uri Mappings</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getProfileUriMappings()
+ * @generated
+ * @ordered
+ */
+ protected EList<URIMapping> profileUriMappings;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
@@ -96,10 +108,26 @@ public class MappingParametersImpl extends MinimalEObjectImpl.Container implemen
* @generated
*/
@Override
+ public EList<URIMapping> getProfileUriMappings() {
+ if (profileUriMappings == null) {
+ profileUriMappings = new EObjectContainmentEList<URIMapping>(URIMapping.class, this, RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS);
+ }
+ return profileUriMappings;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__URI_MAPPINGS:
return ((InternalEList<?>) getUriMappings()).basicRemove(otherEnd, msgs);
+ case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS:
+ return ((InternalEList<?>) getProfileUriMappings()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -115,6 +143,8 @@ public class MappingParametersImpl extends MinimalEObjectImpl.Container implemen
switch (featureID) {
case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__URI_MAPPINGS:
return getUriMappings();
+ case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS:
+ return getProfileUriMappings();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -133,6 +163,10 @@ public class MappingParametersImpl extends MinimalEObjectImpl.Container implemen
getUriMappings().clear();
getUriMappings().addAll((Collection<? extends URIMapping>) newValue);
return;
+ case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS:
+ getProfileUriMappings().clear();
+ getProfileUriMappings().addAll((Collection<? extends URIMapping>) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -149,6 +183,9 @@ public class MappingParametersImpl extends MinimalEObjectImpl.Container implemen
case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__URI_MAPPINGS:
getUriMappings().clear();
return;
+ case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS:
+ getProfileUriMappings().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -164,6 +201,8 @@ public class MappingParametersImpl extends MinimalEObjectImpl.Container implemen
switch (featureID) {
case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__URI_MAPPINGS:
return uriMappings != null && !uriMappings.isEmpty();
+ case RSAToPapyrusParametersPackage.MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS:
+ return profileUriMappings != null && !profileUriMappings.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/RSAToPapyrusParametersPackageImpl.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/RSAToPapyrusParametersPackageImpl.java
index d960b067d4a..714e683dc6a 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/RSAToPapyrusParametersPackageImpl.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src-gen/org/eclipse/papyrus/migration/rsa/RSAToPapyrusParameters/impl/RSAToPapyrusParametersPackageImpl.java
@@ -236,6 +236,17 @@ public class RSAToPapyrusParametersPackageImpl extends EPackageImpl implements R
* @generated
*/
@Override
+ public EReference getMappingParameters_ProfileUriMappings() {
+ return (EReference) mappingParametersEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public EClass getURIMapping() {
return uriMappingEClass;
}
@@ -307,6 +318,7 @@ public class RSAToPapyrusParametersPackageImpl extends EPackageImpl implements R
mappingParametersEClass = createEClass(MAPPING_PARAMETERS);
createEReference(mappingParametersEClass, MAPPING_PARAMETERS__URI_MAPPINGS);
+ createEReference(mappingParametersEClass, MAPPING_PARAMETERS__PROFILE_URI_MAPPINGS);
uriMappingEClass = createEClass(URI_MAPPING);
createEAttribute(uriMappingEClass, URI_MAPPING__SOURCE_URI);
@@ -366,6 +378,8 @@ public class RSAToPapyrusParametersPackageImpl extends EPackageImpl implements R
initEClass(mappingParametersEClass, MappingParameters.class, "MappingParameters", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getMappingParameters_UriMappings(), this.getURIMapping(), null, "uriMappings", null, 0, -1, MappingParameters.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
!IS_ORDERED);
+ initEReference(getMappingParameters_ProfileUriMappings(), this.getURIMapping(), null, "profileUriMappings", null, 0, -1, MappingParameters.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
initEClass(uriMappingEClass, URIMapping.class, "URIMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getURIMapping_SourceURI(), theTypesPackage.getString(), "sourceURI", null, 1, 1, URIMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ConfigHelper.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ConfigHelper.java
index e792ba0d9c0..7c6b5fb8432 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ConfigHelper.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ConfigHelper.java
@@ -17,18 +17,23 @@ import java.util.Set;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.Config;
import org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.RSAToPapyrusParametersFactory;
import org.eclipse.papyrus.migration.rsa.RSAToPapyrusParameters.URIMapping;
import org.eclipse.papyrus.uml.extensionpoints.library.IRegisteredLibrary;
import org.eclipse.papyrus.uml.extensionpoints.library.RegisteredLibrary;
+import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile;
+import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
+import org.eclipse.uml2.uml.Element;
import com.google.common.collect.Sets;
@@ -91,6 +96,8 @@ public class ConfigHelper {
protected void doComputeURIMappings(Resource sourceModel) {
try {
+ doComputeProfileURIMappings(sourceModel);
+
TreeIterator<EObject> resourceContents = sourceModel.getAllContents();
ResourceSet resourceSet = sourceModel.getResourceSet();
@@ -118,6 +125,53 @@ public class ConfigHelper {
}
}
+ protected void doComputeProfileURIMappings(Resource sourceModel) {
+ ResourceSet resourceSet = sourceModel.getResourceSet();
+
+ for (EObject rootObject : sourceModel.getContents()) {
+ if (isInvalidStereotypeApplication(rootObject)) {
+ handleProfileURIMapping(rootObject, resourceSet);
+ }
+ }
+ }
+
+ protected boolean isInvalidStereotypeApplication(EObject eObject) {
+ if (eObject instanceof Element) {
+ return false;
+ }
+
+ // The package is not resolved: probably a missing profile
+ if (eObject instanceof AnyType) {
+ return true;
+ }
+
+ // If the package is resolved but is contained in an EPX resource, it needs to be mapped to the Papyrus equivalent
+ EPackage ePackage = eObject.eClass().getEPackage();
+ if ("epx".equals(ePackage.eResource().getURI().fileExtension())) {
+ return true;
+ }
+
+ return false;
+ }
+
+ protected void handleProfileURIMapping(EObject stereotypeApplication, ResourceSet resourceSet) {
+ Collection<URIMapping> mappings = config.getMappingParameters().getProfileUriMappings();
+
+ URIMapping existingMapping = findExistingProfileMapping(stereotypeApplication, resourceSet);
+ if (existingMapping == null) {
+ URI packageURI = EcoreUtil.getURI(stereotypeApplication.eClass().getEPackage());
+
+ URIMapping mapping = RSAToPapyrusParametersFactory.eINSTANCE.createURIMapping();
+
+ mapping.setSourceURI(packageURI.trimFragment().trimQuery().toString());
+ mapping.setTargetURI(packageURI.trimFragment().trimQuery().toString());
+
+ mappings.add(mapping);
+ } else {
+ mappings.add(existingMapping);
+ }
+ }
+
protected void handleURIMapping(EObject eObject, ResourceSet resourceSet) {
Collection<URIMapping> mappings = config.getMappingParameters().getUriMappings();
@@ -143,13 +197,41 @@ public class ConfigHelper {
}
protected boolean isRSAModelElement(EObject eObject) {
- URI objectURI = EcoreUtil.getURI(eObject);
+ return isRSAModelElement(EcoreUtil.getURI(eObject));
+ }
+
+ protected boolean isRSAModelElement(URI objectURI) {
String fileExtension = objectURI.fileExtension();
return rsaExtensions.contains(fileExtension) || rsaProfileExtension.equals(fileExtension);
}
- protected URIMapping findExistingMapping(EObject proxy, ResourceSet resourceSet) {
- URI proxyURI = EcoreUtil.getURI(proxy);
+ protected URIMapping findExistingProfileMapping(EObject stereotypeApplication, ResourceSet resourceSet) {
+ URI proxyURI = EcoreUtil.getURI(stereotypeApplication.eClass().getEPackage());
+ String fileExtension = proxyURI.fileExtension();
+
+ URIMapping mapping = RSAToPapyrusParametersFactory.eINSTANCE.createURIMapping();
+ URI sourceURI = proxyURI.trimFragment().trimQuery();
+ mapping.setSourceURI(sourceURI.toString());
+
+ URI targetURI = null;
+
+ if ("epx".equals(fileExtension)) {
+ targetURI = sourceURI.trimFileExtension().appendFileExtension("profile").appendFileExtension("uml");
+ try {
+ Resource resource = resourceSet.getResource(targetURI, true);
+ if (resource != null && !resource.getContents().isEmpty()) {
+ mapping.setTargetURI(targetURI.toString());
+ return mapping;
+ }
+ } catch (Exception ex) {
+ // Ignore: we can't find the target resource
+ }
+ }
+
+ return findExistingMapping(proxyURI, resourceSet);
+ }
+
+ protected URIMapping findExistingMapping(URI proxyURI, ResourceSet resourceSet) {
String fileExtension = proxyURI.fileExtension();
URIMapping mapping = RSAToPapyrusParametersFactory.eINSTANCE.createURIMapping();
@@ -180,7 +262,7 @@ public class ConfigHelper {
}
- if (!isRSAModelElement(proxy)) {
+ if (!isRSAModelElement(proxyURI)) {
// Maybe the resource exists, but doesn't contain this specific element
URI resourceURI = proxyURI.trimFragment().trimQuery();
try {
@@ -214,7 +296,30 @@ public class ConfigHelper {
}
}
+ // Maybe the object is a Profile, so let's browse registered profiles as well
+ for (IRegisteredProfile profile : RegisteredProfile.getRegisteredProfiles()) {
+ URI profileURI = profile.getUri();
+ try {
+ Resource profileResource = localResourceSet.getResource(profileURI, true);
+ if (profileResource != null) {
+ EObject resolvedElement = profileResource.getEObject(proxyURI.fragment());
+ if (resolvedElement != null && !resolvedElement.eIsProxy()) {
+ mapping.setTargetURI(profileURI.toString());
+
+ return mapping;
+ }
+ }
+ } catch (Exception ex) {
+ // Ignore
+ }
+ }
+
return null;
}
+ protected URIMapping findExistingMapping(EObject proxy, ResourceSet resourceSet) {
+ URI proxyURI = EcoreUtil.getURI(proxy);
+ return findExistingMapping(proxyURI, resourceSet);
+ }
+
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformation.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformation.java
index accdc3f91ed..f324660cc30 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformation.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformation.java
@@ -112,9 +112,12 @@ public class ImportTransformation {
protected boolean complete = false;
- /** Source URI to Target URI map */
+ /** Source URI to Target URI map (For Models/Libraries/Fragments) */
protected final Map<URI, URI> uriMappings = new HashMap<URI, URI>();
+ /** Source URI to Target URI map (For Profiles) */
+ protected final Map<URI, URI> profileURIMappings = new HashMap<URI, URI>();
+
protected List<Diagram> diagramsToDelete = new LinkedList<Diagram>();
// The cache can be used to increase performances (For small and medium sized models, most of the execution time is spent in loading the transformation)
@@ -162,8 +165,8 @@ public class ImportTransformation {
@Override
public void done(IJobChangeEvent event) {
complete = true;
- if(isUserJob) {
- if(event.getResult().getSeverity() == IStatus.OK) {
+ if (isUserJob) {
+ if (event.getResult().getSeverity() == IStatus.OK) {
Display.getDefault().asyncExec(new Runnable() {
@Override
@@ -172,7 +175,7 @@ public class ImportTransformation {
}
});
- } else if(event.getResult().getSeverity() == IStatus.CANCEL) {
+ } else if (event.getResult().getSeverity() == IStatus.CANCEL) {
Display.getDefault().asyncExec(new Runnable() {
@Override
@@ -204,7 +207,7 @@ public class ImportTransformation {
}
public IStatus getStatus() {
- if(job == null) { // If job hasn't been created, the operation has probably been canceled before the transformation is ran
+ if (job == null) { // If job hasn't been created, the operation has probably been canceled before the transformation is ran
return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, "Operation canceled");
}
return job.getResult();
@@ -214,6 +217,10 @@ public class ImportTransformation {
return uriMappings;
}
+ public Map<URI, URI> getProfileURIMappings() {
+ return profileURIMappings;
+ }
+
public URI getTargetURI() {
return targetURI;
}
@@ -251,23 +258,23 @@ public class ImportTransformation {
int i = 0;
ModelExtent extent = getInOutUMLModel();
- for(EObject eObject : extent.getContents()) {
+ for (EObject eObject : extent.getContents()) {
// We already called ResolveAll, there is no need to try resolution again
TreeIterator<EObject> modelIterator = EcoreUtil.getAllContents(eObject, false);
- while(modelIterator.hasNext()) {
+ while (modelIterator.hasNext()) {
EObject next = modelIterator.next();
- if(next instanceof Diagram) {
- Diagram diagram = (Diagram)next;
- if(isSupported(diagram)) {
+ if (next instanceof Diagram) {
+ Diagram diagram = (Diagram) next;
+ if (isSupported(diagram)) {
i++;
diagramsToDelete.add(diagram);
}
modelIterator.prune(); // Don't navigate Diagram children
- } else if(next instanceof OpaqueExpression) {
- if(parameters.isConvertOpaqueExpressionToLiteralString()) {
- OpaqueExpression exp = (OpaqueExpression)next;
- if(needsConversion(exp)) {
+ } else if (next instanceof OpaqueExpression) {
+ if (parameters.isConvertOpaqueExpressionToLiteralString()) {
+ OpaqueExpression exp = (OpaqueExpression) next;
+ if (needsConversion(exp)) {
i++;
}
}
@@ -290,11 +297,11 @@ public class ImportTransformation {
protected static boolean needsConversion(OpaqueExpression exp) {
List<String> languages = exp.getLanguages();
List<String> bodies = exp.getBodies();
- if(bodies.size() > 1) {
+ if (bodies.size() > 1) {
return false;
}
- if(languages.isEmpty() || (languages.size() == 1 && exp.getLanguages().get(0).isEmpty())) {
+ if (languages.isEmpty() || (languages.size() == 1 && exp.getLanguages().get(0).isEmpty())) {
return true;
}
@@ -309,7 +316,7 @@ public class ImportTransformation {
// Preloads all required transformations (Either locally or statically, depending on the cache parameter)
protected IStatus loadTransformations(IProgressMonitor monitor) {
- for(URI transformationURI : getAllTransformationURIs()) {
+ for (URI transformationURI : getAllTransformationURIs()) {
try {
// Don't use a subprogress monitor, since it may be confusing
getTransformation(transformationURI, new NullProgressMonitor());
@@ -377,7 +384,7 @@ public class ImportTransformation {
Collection<URI> transformations = getDiagramTransformationURIs();
monitor.subTask("Importing diagrams...");
- for(URI transformationURI : transformations) {
+ for (URI transformationURI : transformations) {
result = runTransformation(transformationURI, context, monitor, extents);
generationStatus.add(result);
}
@@ -387,7 +394,7 @@ public class ImportTransformation {
result = runTransformation(getSemanticTransformationURI(), context, monitor, extents);
generationStatus.add(result);
- if(!monitor.isCanceled()) {
+ if (!monitor.isCanceled()) {
monitor.subTask("Handle additional profiles...");
// Default.epx and ProfileBase.epx
result = importRSAProfiles(context, monitor);
@@ -398,7 +405,7 @@ public class ImportTransformation {
// FRAGMENTS & SAVE
//
- if(generationStatus.getSeverity() <= Diagnostic.WARNING) {
+ if (generationStatus.getSeverity() <= Diagnostic.WARNING) {
monitor.subTask("Saving models...");
URI notationModelURI = null;
@@ -409,6 +416,10 @@ public class ImportTransformation {
notationModelURI = convertToPapyrus(sourceURI, "notation"); // TODO use constant
sashModelURI = convertToPapyrus(sourceURI, "di"); // TODO use constant
+ if ("epx".equals(sourceURI.fileExtension())) {
+ profileURIMappings.put(sourceURI, targetURI);
+ }
+ // Profile mappings are also library mappings
uriMappings.put(sourceURI, targetURI);
umlResource = createUMLResource(resourceSet, sourceURI, targetURI);
@@ -424,10 +435,10 @@ public class ImportTransformation {
// Cleanup empty diagrams (FIXME: They should not be generated)
List<EObject> contentsCopy = new LinkedList<EObject>(notationResource.getContents());
- for(EObject next : contentsCopy) {
- if(next instanceof Diagram) {
- Diagram diagram = (Diagram)next;
- if(diagram.getType() == null || "".equals(diagram.getType())) {
+ for (EObject next : contentsCopy) {
+ if (next instanceof Diagram) {
+ Diagram diagram = (Diagram) next;
+ if (diagram.getType() == null || "".equals(diagram.getType())) {
delete(diagram);
}
}
@@ -440,21 +451,21 @@ public class ImportTransformation {
configureResource(sashResource);
configureResource(notationResource);
- configureResource((XMIResource)umlResource);
+ configureResource((XMIResource) umlResource);
// Handle orphaned elements: remove them and log a warning
List<EObject> notationRootElements = new LinkedList<EObject>(notationResource.getContents());
- for(EObject rootElement : notationRootElements) {
- if(rootElement instanceof View) {
- View rootView = (View)rootElement;
- if(!(rootView instanceof Diagram)) {
+ for (EObject rootElement : notationRootElements) {
+ if (rootElement instanceof View) {
+ View rootView = (View) rootElement;
+ if (!(rootView instanceof Diagram)) {
String objectType = rootView.getElement() == null ? "None" : rootView.getElement().eClass().getName();
String viewType = rootView.getType() == null ? "None" : rootView.getType();
generationStatus.add(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "An orphaned view has been found after the migration. It will be removed. View Type: " + viewType + ", semantic type: " + objectType));
delete(rootElement);
}
- } else if(rootElement instanceof Style) {
+ } else if (rootElement instanceof Style) {
String styleType = rootElement.eClass().getName();
generationStatus.add(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "An orphaned style has been found after the migration. It will be removed. Style Type: " + styleType));
@@ -484,10 +495,10 @@ public class ImportTransformation {
}
}
- for(Diagram diagram : diagramsToDelete) {
+ for (Diagram diagram : diagramsToDelete) {
EObject container = diagram.eContainer();
delete(diagram);
- if(container instanceof EAnnotation) {
+ if (container instanceof EAnnotation) {
delete(container);
}
}
@@ -538,9 +549,9 @@ public class ImportTransformation {
}
ExecutionDiagnostic transformationResult;
- synchronized(executor) {
+ synchronized (executor) {
transformationResult = executor.execute(context, extents.toArray(new ModelExtent[0]));
- //executor.cleanup(); N/A on Luna
+ // executor.cleanup(); N/A on Luna
}
IStatus loadedProfilesStatus = createStatusFromDiagnostic(loadedProfiles);
@@ -549,29 +560,29 @@ public class ImportTransformation {
int severity = Math.max(loadedProfiles.getSeverity(), transformationResult.getSeverity());
String message;
- if(severity > IStatus.OK) {
+ if (severity > IStatus.OK) {
message = "The following errors occurred:";
} else {
message = "OK";
}
- IStatus completeResult = new MultiStatus(Activator.PLUGIN_ID, severity, new IStatus[]{ loadedProfilesStatus, transformationStatus }, message, null);
+ IStatus completeResult = new MultiStatus(Activator.PLUGIN_ID, severity, new IStatus[] { loadedProfilesStatus, transformationStatus }, message, null);
return completeResult;
}
protected TransformationExecutor getTransformation(URI transformationURI, IProgressMonitor monitor) throws DiagnosticException {
- if(!cacheTransformations) {
- if(!localTransformations.containsKey(transformationURI)) {
+ if (!cacheTransformations) {
+ if (!localTransformations.containsKey(transformationURI)) {
TransformationExecutor executor = loadTransformationExecutor(transformationURI, monitor);
localTransformations.put(transformationURI, executor);
}
return localTransformations.get(transformationURI);
}
- synchronized(sharedTransformations) {
- if(!sharedTransformations.containsKey(transformationURI)) {
+ synchronized (sharedTransformations) {
+ if (!sharedTransformations.containsKey(transformationURI)) {
TransformationExecutor executor = loadTransformationExecutor(transformationURI, monitor);
sharedTransformations.put(transformationURI, executor);
}
@@ -584,7 +595,7 @@ public class ImportTransformation {
TransformationExecutor executor = new TransformationExecutor(transformationURI);
Diagnostic diagnostic = executor.loadTransformation(monitor);
- if(diagnostic.getSeverity() != Diagnostic.OK) {
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
throw new DiagnosticException(diagnostic);
}
@@ -606,7 +617,7 @@ public class ImportTransformation {
} catch (IOException ex) {
Activator.log.error(ex);
} finally {
- if(inputStream != null) {
+ if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
@@ -640,9 +651,9 @@ public class ImportTransformation {
}
ExecutionDiagnostic result;
- synchronized(executor) {
+ synchronized (executor) {
result = executor.execute(context, extents.toArray(new ModelExtent[0]));
- //executor.cleanup(); N/A on Luna
+ // executor.cleanup(); N/A on Luna
}
return createStatusFromDiagnostic(result);
@@ -672,8 +683,8 @@ public class ImportTransformation {
* @throws WrappedException
*/
protected Diagnostic loadInPapyrusProfiles() {
- if(inPapyrusProfiles != null) {
- return BasicDiagnostic.OK_INSTANCE;
+ if (inPapyrusProfiles != null) {
+ return Diagnostic.OK_INSTANCE;
}
List<String> missingProfiles = new LinkedList<String>();
@@ -721,7 +732,7 @@ public class ImportTransformation {
String message;
int code;
- if(missingProfiles.isEmpty()) {
+ if (missingProfiles.isEmpty()) {
message = "OK";
code = Diagnostic.OK;
} else {
@@ -736,7 +747,7 @@ public class ImportTransformation {
protected void checkResource(Resource resource) {
Assert.isTrue(!resource.getContents().isEmpty(), "The resource " + resource.getURI() + " is empty");
- for(EObject rootElement : resource.getContents()) {
+ for (EObject rootElement : resource.getContents()) {
Assert.isTrue(!rootElement.eIsProxy());
}
}
@@ -749,7 +760,7 @@ public class ImportTransformation {
}
protected ModelExtent getInConfig() {
- if(inParameters == null) {
+ if (inParameters == null) {
inParameters = new BasicModelExtent(Collections.singletonList(parameters));
}
return inParameters;
@@ -767,20 +778,20 @@ public class ImportTransformation {
Set<Resource> fragmentResources = new HashSet<Resource>();
- while(elementIterator.hasNext()) {
+ while (elementIterator.hasNext()) {
EObject element = elementIterator.next();
- if(element.eResource() != umlResource && element.eResource().getContents().contains(element)) { // Controlled/Fragment root
+ if (element.eResource() != umlResource && element.eResource().getContents().contains(element)) { // Controlled/Fragment root
fragmentResources.add(element.eResource());
}
}
- for(Resource fragmentResource : fragmentResources) {
+ for (Resource fragmentResource : fragmentResources) {
URI papyrusFragmentURI = convertToPapyrus(fragmentResource.getURI(), UMLResource.FILE_EXTENSION);
uriMappings.put(fragmentResource.getURI(), papyrusFragmentURI);
Resource newResource = resourceSet.getResource(papyrusFragmentURI, false);
- if(newResource == null) {
+ if (newResource == null) {
newResource = createUMLResource(resourceSet, fragmentResource.getURI(), papyrusFragmentURI);
Resource fragmentNotationResource = new GMFResource(convertToPapyrus(papyrusFragmentURI, "notation"));
@@ -800,15 +811,15 @@ public class ImportTransformation {
deleteSourceRTStereotypes(fragmentResources);
List<EObject> importedElements = new LinkedList<EObject>(notationResource.getContents());
- for(EObject notationElement : importedElements) {
- if(notationElement instanceof Diagram) {
- EObject semanticElement = ((Diagram)notationElement).getElement();
- if(semanticElement.eResource() != umlResource && semanticElement.eResource() != null) {
+ for (EObject notationElement : importedElements) {
+ if (notationElement instanceof Diagram) {
+ EObject semanticElement = ((Diagram) notationElement).getElement();
+ if (semanticElement.eResource() != umlResource && semanticElement.eResource() != null) {
URI notationFragmentURI = convertToPapyrus(semanticElement.eResource().getURI(), "notation");
Resource newNotationResource = resourceSet.getResource(notationFragmentURI, false);
- if(newNotationResource == null) {
+ if (newNotationResource == null) {
newNotationResource = new GMFResource(notationFragmentURI);
resourceSet.getResources().add(newNotationResource);
}
@@ -825,13 +836,13 @@ public class ImportTransformation {
Set<Resource> allResources = new HashSet<Resource>(fragmentResources);
allResources.add(umlResource);
- for(Resource resource : allResources) {
+ for (Resource resource : allResources) {
// For performance reasons, RSA RT Stereotypes have not been deleted during the QVTo transformation (Bug 444379)
// Delete them as a post-action. Iterate on all controlled models and delete the RealTime stereotypes at the root of each resource
List<EObject> resourceContents = new LinkedList<EObject>(resource.getContents());
- for(EObject rootElement : resourceContents) {
- if(rootElement.eClass().getEPackage() == org.eclipse.papyrus.migration.rsa.umlrt.UMLRealTimePackage.eINSTANCE) {
+ for (EObject rootElement : resourceContents) {
+ if (rootElement.eClass().getEPackage() == org.eclipse.papyrus.migration.rsa.umlrt.UMLRealTimePackage.eINSTANCE) {
delete(rootElement);
}
}
@@ -839,7 +850,7 @@ public class ImportTransformation {
}
protected URI convertToPapyrus(URI rsaURI, String extension) {
- if("epx".equals(rsaURI.fileExtension())) { //$NON-NLS-1$
+ if ("epx".equals(rsaURI.fileExtension())) { //$NON-NLS-1$
// Profiles: myProfile.profile.uml, myProfile.profile.notation, ...
return rsaURI.trimFileExtension().appendFileExtension("profile").appendFileExtension(extension); //$NON-NLS-1$
} else {
@@ -849,7 +860,7 @@ public class ImportTransformation {
}
protected IStatus runTransformation(URI transformationURI, ExecutionContext context, IProgressMonitor monitor, List<ModelExtent> extents) {
- if(monitor.isCanceled()) {
+ if (monitor.isCanceled()) {
return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, "Operation canceled");
}
@@ -864,9 +875,9 @@ public class ImportTransformation {
}
ExecutionDiagnostic result;
- synchronized(executor) {
+ synchronized (executor) {
result = executor.execute(context, extents.toArray(new ModelExtent[0]));
- //executor.cleanup(); N/A on Luna
+ // executor.cleanup(); N/A on Luna
}
return createStatusFromDiagnostic(result);
@@ -894,7 +905,7 @@ public class ImportTransformation {
@Override
public void log(int level, String message) {
super.log(level, message);
- if(level >= 1) {
+ if (level >= 1) {
generationStatus.merge(new Status(level, Activator.PLUGIN_ID, message));
}
@@ -903,7 +914,7 @@ public class ImportTransformation {
@Override
public void log(int level, String message, Object param) {
super.log(level, message, param);
- if(level >= 1) {
+ if (level >= 1) {
generationStatus.merge(new Status(level, Activator.PLUGIN_ID, message + ", data:" + param));
}
}
@@ -938,16 +949,16 @@ public class ImportTransformation {
Map<Object, Object> saveOptions = new HashMap<Object, Object>();
// default save options.
- saveOptions.put(XMIResource.OPTION_DECLARE_XML, Boolean.TRUE);
- saveOptions.put(XMIResource.OPTION_PROCESS_DANGLING_HREF, XMIResource.OPTION_PROCESS_DANGLING_HREF_DISCARD);
- saveOptions.put(XMIResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+ saveOptions.put(XMLResource.OPTION_DECLARE_XML, Boolean.TRUE);
+ saveOptions.put(XMLResource.OPTION_PROCESS_DANGLING_HREF, XMLResource.OPTION_PROCESS_DANGLING_HREF_DISCARD);
+ saveOptions.put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
saveOptions.put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
- saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, Boolean.TRUE);
- saveOptions.put(XMIResource.OPTION_SKIP_ESCAPE_URI, Boolean.FALSE);
- saveOptions.put(XMIResource.OPTION_ENCODING, "UTF-8");
+ saveOptions.put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, Boolean.TRUE);
+ saveOptions.put(XMLResource.OPTION_SKIP_ESCAPE_URI, Boolean.FALSE);
+ saveOptions.put(XMLResource.OPTION_ENCODING, "UTF-8");
// see bug 397987: [Core][Save] The referenced plugin models are saved using relative path
- saveOptions.put(XMIResource.OPTION_URI_HANDLER, new org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl.PlatformSchemeAware());
+ saveOptions.put(XMLResource.OPTION_URI_HANDLER, new org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl.PlatformSchemeAware());
resource.setEncoding("UTF-8");
resource.getDefaultSaveOptions().putAll(saveOptions);
@@ -963,7 +974,7 @@ public class ImportTransformation {
}
protected ModelExtent getInOutUMLModel() {
- if(outUML == null) {
+ if (outUML == null) {
try {
Resource resource = resourceSet.getResource(sourceURI, true);
outUML = new BasicModelExtent(resource.getContents());
@@ -978,7 +989,7 @@ public class ImportTransformation {
/* Notation model is initially empty, but will be filled successively by each transformation */
protected ModelExtent getInoutNotationModel() {
- if(outNotation == null) {
+ if (outNotation == null) {
outNotation = new BasicModelExtent();
}
@@ -986,7 +997,7 @@ public class ImportTransformation {
}
protected ModelExtent getOutSashModel() {
- if(outSashModel == null) {
+ if (outSashModel == null) {
outSashModel = new BasicModelExtent();
}
@@ -1050,11 +1061,11 @@ public class ImportTransformation {
public void delete(EObject rootElement) {
CacheAdapter adapter = CacheAdapter.getCacheAdapter(rootElement);
- if(adapter == null) {
+ if (adapter == null) {
adapter = CacheAdapter.getInstance();
}
adapter.unsetTarget(rootElement);
- if(rootElement.eResource() != null) {
+ if (rootElement.eResource() != null) {
rootElement.eResource().getContents().remove(rootElement);
}
}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java
index bb259742dc3..ed5455c46fe 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java
@@ -52,6 +52,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.uml2.uml.util.UMLUtil;
/**
* Executes a batch of {@link ImportTransformation}s, then restores the dependencies (References)
@@ -278,45 +279,33 @@ public class ImportTransformationLauncher {
// Convert all model dependencies (For "imported model -> emx library" to "imported model -> imported library")
protected void handleModelDependencies(List<ImportTransformation> transformations, IProgressMonitor monitor) {
+
Map<URI, URI> urisToReplace = new HashMap<URI, URI>();
- for (ImportTransformation transformation : transformations) {
- // Only transform EMX/EFX models. Profiles (epx) will be handled separately
+ Map<URI, URI> profileUrisToReplace = new HashMap<URI, URI>();
- for (Map.Entry<URI, URI> entry : transformation.getURIMappings().entrySet()) {
- String fileExtension = entry.getKey().fileExtension();
- if ("emx".equals(fileExtension) || "efx".equals(fileExtension)) {
- urisToReplace.put(entry.getKey(), entry.getValue());
+ for (ImportTransformation transformation : transformations) {
+ for (Map.Entry<URI, URI> mapping : transformation.getURIMappings().entrySet()) {
+ URI sourceURI = mapping.getKey();
+ URI targetURI = mapping.getValue();
+ if ("emx".equals(sourceURI.fileExtension()) || "efx".equals(sourceURI.fileExtension())) {
+ urisToReplace.put(sourceURI, targetURI);
}
}
+ urisToReplace.putAll(transformation.getURIMappings());
+ profileUrisToReplace.putAll(transformation.getProfileURIMappings());
}
- filterKnownMappings(config.getMappingParameters(), urisToReplace);
+ filterKnownMappings(config.getMappingParameters(), urisToReplace, profileUrisToReplace);
- if (!config.getMappingParameters().getUriMappings().isEmpty()) {
+ if (!config.getMappingParameters().getUriMappings().isEmpty() || !config.getMappingParameters().getProfileUriMappings().isEmpty()) {
MappingParameters parameters = confirmURIMappings(config.getMappingParameters());
config.setMappingParameters(parameters);
// Include the user-defined URI mappings
- for (URIMapping mapping : parameters.getUriMappings()) {
-
- String source = mapping.getSourceURI();
- String target = mapping.getTargetURI();
-
- if (source != null && target != null && !source.trim().isEmpty() && !target.trim().isEmpty()) {
-
- URI sourceURI = URI.createURI(mapping.getSourceURI());
- URI targetURI = URI.createURI(mapping.getTargetURI());
-
- if (urisToReplace.containsKey(sourceURI)) {
- continue;
- }
-
- urisToReplace.put(sourceURI, targetURI);
- }
- }
+ populateURIMap(parameters.getUriMappings(), urisToReplace);
+ populateURIMap(parameters.getProfileUriMappings(), profileUrisToReplace);
}
-
for (ImportTransformation transformation : transformations) {
if (monitor.isCanceled()) {
@@ -325,6 +314,7 @@ public class ImportTransformationLauncher {
monitor.subTask("Importing dependencies for " + transformation.getModelName());
final ModelSet modelSet = new DiResourceSet();
+ UMLUtil.init(modelSet);
try {
URI targetURI = transformation.getTargetURI();
if (targetURI == null) {
@@ -338,41 +328,18 @@ public class ImportTransformationLauncher {
monitor.worked(1);
continue;
}
- final TransactionalEditingDomain domain = modelSet.getTransactionalEditingDomain();
-
- for (final Map.Entry<URI, URI> entry : urisToReplace.entrySet()) {
- if (monitor.isCanceled()) {
- return;
- }
- if (entry.getKey().equals(entry.getValue())) {
- continue;
- }
-
- domain.getCommandStack().execute(new AbstractCommand("Import dependencies") {
+ repairProxies(modelSet, urisToReplace, monitor); // Repairing proxies first will change the Applied Profiles. This helps repairing stereotypes
- @Override
- public void execute() {
- DependencyManagementHelper.updateDependencies(entry.getKey(), entry.getValue(), modelSet, domain);
- }
-
- @Override
- public void redo() {
- // Nothing
- }
-
- @Override
- protected boolean prepare() {
- return true;
- };
- });
-
- }
+ RepairStereotypes repairStereotypesAction = new RepairStereotypes(modelSet, profileUrisToReplace);
+ repairStereotypesAction.execute();
try {
modelSet.save(new NullProgressMonitor());
monitor.worked(1);
+ final TransactionalEditingDomain domain = modelSet.getTransactionalEditingDomain();
+
EcoreUtil.resolveAll(modelSet); // Resolve all before unload to ensure all proxies are cleaned up in the CacheAdapter
GMFUnsafe.write(domain, new Runnable() {
@Override
@@ -396,6 +363,64 @@ public class ImportTransformationLauncher {
}
}
+ protected void repairProxies(final ModelSet modelSet, Map<URI, URI> urisToReplace, IProgressMonitor monitor) {
+
+ final TransactionalEditingDomain domain = modelSet.getTransactionalEditingDomain();
+
+ for (final Map.Entry<URI, URI> entry : urisToReplace.entrySet()) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+
+ if (entry.getKey().equals(entry.getValue())) {
+ continue;
+ }
+
+ domain.getCommandStack().execute(new AbstractCommand("Import dependencies") {
+
+ @Override
+ public void execute() {
+ DependencyManagementHelper.updateDependencies(entry.getKey(), entry.getValue(), modelSet, domain);
+ }
+
+ @Override
+ public void redo() {
+ // Nothing
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ };
+ });
+ }
+ }
+
+ /**
+ * Convert and add all the URIMappings into the URI Map
+ *
+ * @param mappings
+ * @param uriMap
+ */
+ protected static void populateURIMap(List<URIMapping> mappings, Map<URI, URI> uriMap) {
+ for (URIMapping mapping : mappings) {
+ String source = mapping.getSourceURI();
+ String target = mapping.getTargetURI();
+
+ if (source != null && target != null && !source.trim().isEmpty() && !target.trim().isEmpty()) {
+
+ URI sourceURI = URI.createURI(mapping.getSourceURI());
+ URI targetURI = URI.createURI(mapping.getTargetURI());
+
+ if (uriMap.containsKey(sourceURI)) {
+ continue;
+ }
+
+ uriMap.put(sourceURI, targetURI);
+ }
+ }
+ }
+
/**
* Remove automatic mappings (When multiple files are imported simultaneously) and duplicates
*
@@ -404,15 +429,20 @@ public class ImportTransformationLauncher {
* @param currentMappings
* The map of known (automatic) mappings
*/
- protected void filterKnownMappings(final MappingParameters mappingParameters, final Map<URI, URI> currentMappings) {
+ protected void filterKnownMappings(final MappingParameters mappingParameters, final Map<URI, URI> currentMappings, final Map<URI, URI> currentProfileMappings) {
+ filterKnownMappings(mappingParameters.getUriMappings(), currentMappings);
+ filterKnownMappings(mappingParameters.getProfileUriMappings(), currentProfileMappings);
+ }
+
+ protected void filterKnownMappings(List<URIMapping> allMappings, Map<URI, URI> knownMappings) {
Set<URI> userMappings = new HashSet<URI>();
- Iterator<URIMapping> mappings = mappingParameters.getUriMappings().iterator();
+ Iterator<URIMapping> mappings = allMappings.iterator();
while (mappings.hasNext()) {
URIMapping mapping = mappings.next();
URI sourceURI = URI.createURI(mapping.getSourceURI());
- if (currentMappings.containsKey(sourceURI) || userMappings.contains(sourceURI)) {
+ if (knownMappings.containsKey(sourceURI) || userMappings.contains(sourceURI)) {
mappings.remove();
} else {
userMappings.add(sourceURI);
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
new file mode 100644
index 00000000000..70d97209f46
--- /dev/null
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
@@ -0,0 +1,212 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.migration.rsa.transformation;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
+import org.eclipse.papyrus.migration.rsa.Activator;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.IRepairAction;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.ZombieStereotypesDescriptor;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+/**
+ * Repairs stereotype applications in the specified model set, using the default action for each
+ *
+ * The given profile supplier is used when the proper profile can't be found automatically
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class RepairStereotypes {
+
+ private final ModelSet modelSet;
+
+ private final Map<URI, URI> profileMappings;
+
+ public RepairStereotypes(ModelSet modelSet, Map<URI, URI> profileMappings) {
+ this.modelSet = modelSet;
+ this.profileMappings = profileMappings;
+ }
+
+ /**
+ * Finds all zombie stereotypes, and repair them with the default action.
+ *
+ * If the profile can't be found automatically, the profileMappings map is used
+ */
+ public void execute() {
+ ZombieStereotypesDescriptor result = null;
+
+ LabelProviderService labelProvider = new LabelProviderServiceImpl();
+ try {
+ labelProvider.startService();
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ return;
+ }
+
+ Function<? super EPackage, Profile> profileSupplier = getProfileSupplier();
+
+ List<Resource> allResources = new LinkedList<Resource>(modelSet.getResources());
+
+ for (Resource resource : allResources) {
+ Element rootElement = (Element) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.ELEMENT);
+ if (!(rootElement instanceof Package)) {
+ continue;
+ }
+
+ Package rootPackage = (Package) rootElement;
+
+ Collection<ProfileApplication> profileApplications = Lists.newArrayList();
+ for (TreeIterator<EObject> iter = EcoreUtil.getAllProperContents(Collections.singleton(rootPackage), false); iter.hasNext();) {
+ EObject next = iter.next();
+ if (next instanceof ProfileApplication) {
+ profileApplications.add((ProfileApplication) next);
+ iter.prune();
+ } else if (!(next instanceof Package) && !(next instanceof Component)) {
+ // No sense looking for packages except in the things that can contain packages
+ iter.prune();
+ }
+ }
+
+ Set<EPackage> appliedDefinitions = getAppliedDefinitions(profileApplications);
+
+ ZombieStereotypesDescriptor zombies = new ZombieStereotypesDescriptor(resource, rootPackage, appliedDefinitions, profileSupplier, labelProvider);
+
+ for (EObject next : resource.getContents()) {
+ if (!(next instanceof Element)) {
+ zombies.analyze(next);
+ }
+ }
+
+ if (zombies.hasZombies()) {
+ result = zombies;
+ }
+
+ if (result == null) {
+ continue;
+ }
+
+ final ZombieStereotypesDescriptor descriptor = result;
+
+ final TransactionalEditingDomain domain = modelSet.getTransactionalEditingDomain();
+
+ domain.getCommandStack().execute(new AbstractCommand("Repair profiles") {
+
+ @Override
+ public void execute() {
+
+ final BasicDiagnostic diagnostics = new BasicDiagnostic(Activator.PLUGIN_ID, 0, "Problems in repairing stereotypes", null);
+
+ for (EPackage packageToRepair : descriptor.getZombiePackages()) {
+ IRepairAction action = descriptor.getRepairAction(packageToRepair, IRepairAction.Kind.APPLY_LATEST_PROFILE_DEFINITION);
+ descriptor.repair(packageToRepair, action, diagnostics, new NullProgressMonitor());
+ }
+
+ }
+
+ @Override
+ public void redo() {
+ // Nothing
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+ });
+ }
+
+ try {
+ labelProvider.disposeService();
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ /**
+ * Maps a zombie EPackage with an existing Profile. Called only if the Profile can't be resolved automatically
+ *
+ * @return
+ */
+ protected Function<? super EPackage, Profile> getProfileSupplier() {
+ return new Function<EPackage, Profile>() {
+
+ @Override
+ public Profile apply(EPackage input) {
+ if (input.eResource() == null || input.eResource().getURI() == null) {
+ return null;
+ }
+
+ URI packageResourceURI = input.eResource().getURI();
+ URI targetResourceURI = profileMappings.get(packageResourceURI);
+ if (targetResourceURI == null) {
+ return null;
+ }
+
+ Resource resource = null;
+ try {
+ resource = modelSet.getResource(targetResourceURI, true);
+ } catch (Exception ex) {
+ resource = modelSet.getResource(targetResourceURI, false);
+ }
+
+ if (resource == null || !resource.isLoaded()) {
+ return null;
+ }
+
+ // Find the proper profile for the given EPackage
+ return null;
+ }
+ };
+ }
+
+ protected Set<EPackage> getAppliedDefinitions(Iterable<? extends ProfileApplication> profileApplications) {
+ Set<EPackage> result = Sets.newHashSet();
+
+ for (ProfileApplication next : profileApplications) {
+ EPackage definition = next.getAppliedDefinition();
+ if ((definition != null) && !definition.eIsProxy()) {
+ result.add(definition);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ui/URIMappingDialog.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ui/URIMappingDialog.java
index 4643b975728..be9c6f1b026 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ui/URIMappingDialog.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ui/URIMappingDialog.java
@@ -13,7 +13,10 @@ package org.eclipse.papyrus.migration.rsa.transformation.ui;
import java.text.Collator;
import java.util.Collections;
+import java.util.Iterator;
import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IFile;
@@ -79,6 +82,8 @@ public class URIMappingDialog extends SelectionDialog {
private static final int BROWSE_REGISTERED_ID = IDialogConstants.CLIENT_ID + 2;
+ List<URIMapping> allMappings;
+
public URIMappingDialog(Shell shell, MappingParameters mappingParameters) {
super(shell);
this.mappingParameters = mappingParameters;
@@ -160,7 +165,13 @@ public class URIMappingDialog extends SelectionDialog {
}
});
- viewer.setInput(result.getUriMappings());
+ allMappings = new LinkedList<URIMapping>();
+ allMappings.addAll(result.getUriMappings());
+ allMappings.addAll(result.getProfileUriMappings());
+
+ removeDuplicates(allMappings);
+
+ viewer.setInput(allMappings);
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -173,6 +184,22 @@ public class URIMappingDialog extends SelectionDialog {
return self;
}
+ protected void removeDuplicates(List<URIMapping> allMappings) {
+ Iterator<URIMapping> iterator = allMappings.iterator();
+ while (iterator.hasNext()) {
+ URIMapping mapping = iterator.next();
+ for (URIMapping m : allMappings) {
+ if (m == mapping) { // Don't compare an object with itself
+ continue;
+ }
+ if (mapping.getSourceURI().equals(m.getSourceURI())) {
+ iterator.remove(); // Remove from the merged list
+ break;
+ }
+ }
+ }
+ }
+
@Override
public boolean close() {
try {
@@ -203,11 +230,11 @@ public class URIMappingDialog extends SelectionDialog {
return;
}
+ // TODO: Registered profiles
+
super.buttonPressed(buttonId);
}
-
-
protected URIMapping getSelectedMapping() {
ISelection selection = viewer.getSelection();
if (selection.isEmpty()) {
@@ -310,10 +337,28 @@ public class URIMappingDialog extends SelectionDialog {
@Override
protected void okPressed() {
+ propagateURIMappings();
setResult(Collections.singletonList(result)); // Set the new result
super.okPressed();
}
+ /** Propagates the URI Mappings to all duplicates */
+ protected void propagateURIMappings() {
+ for (URIMapping mapping : allMappings) {
+ for (URIMapping uriMapping : result.getUriMappings()) {
+ if (uriMapping.getSourceURI().equals(mapping.getSourceURI())) {
+ uriMapping.setTargetURI(mapping.getTargetURI());
+ }
+ }
+
+ for (URIMapping profileURIMapping : result.getProfileUriMappings()) {
+ if (profileURIMapping.getSourceURI().equals(mapping.getSourceURI())) {
+ profileURIMapping.setTargetURI(mapping.getTargetURI());
+ }
+ }
+ }
+ }
+
private class URIColumnsLabelProvider extends ColumnLabelProvider {
@Override
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF
index e4ee1ce5e85..76752117101 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.uml.modelrepair,
org.eclipse.papyrus.uml.modelrepair.handler,
org.eclipse.papyrus.uml.modelrepair.internal.participants;x-internal:=true,
- org.eclipse.papyrus.uml.modelrepair.internal.stereotypes;x-internal:=true,
+ org.eclipse.papyrus.uml.modelrepair.internal.stereotypes;x-friends:="org.eclipse.papyrus.migration.rsa",
org.eclipse.papyrus.uml.modelrepair.internal.validation;x-internal:=true,
org.eclipse.papyrus.uml.modelrepair.service,
org.eclipse.papyrus.uml.modelrepair.ui,
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
index f0a25cb721a..7eb284007be 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
@@ -465,6 +465,9 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
protected EObject resolveRef(EObject anyType, String ref) {
Resource baseResource = anyType.eResource();
+ if (baseResource == null) {
+ return null; // Already resolved & removed?
+ }
URI uri;
if (ref.contains("#")) {

Back to the top