Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsma Smaoui2017-01-05 14:37:21 +0000
committersmaoui asma2017-01-06 10:07:33 +0000
commit6a6732378f158eec3107c95a71a35a1ef73a5654 (patch)
tree8b4c3cf798dfc81c7db711792d459af1c32ac8d7
parentc7e72a524627c16065fafb41181ee40de231d705 (diff)
downloadorg.eclipse.papyrus-6a6732378f158eec3107c95a71a35a1ef73a5654.tar.gz
org.eclipse.papyrus-6a6732378f158eec3107c95a71a35a1ef73a5654.tar.xz
org.eclipse.papyrus-6a6732378f158eec3107c95a71a35a1ef73a5654.zip
Bug 509338 - [Model Import] Do not force port shape with automatic
layout to be located on the top left corner of the class in a composite structure diagram * do not transform (create a port shape in the notation model) for semi automatic ports (ports with layout constraint bounds x=y=0) Change-Id: I1fe273038726b44184023ea93a32db82f705d26c Signed-off-by: Asma Smaoui <asma.smaoui@cea.fr> (cherry picked from commit b56acb8875c4e9c283868affed7b2d6f5f01e1fd)
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto11
1 files changed, 10 insertions, 1 deletions
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto
index a41b1b91c67..0fa595ebf21 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto
@@ -120,7 +120,7 @@ mapping UMLShape::toPapyrusShape() : Shape inherits Shape::toPapyrusShape when {
not self.getType().oclIsUndefined() and (
self.element.oclIsTypeOf(DurationInterval)or
self.element.oclIsTypeOf(UseCase)or
- self.element.oclIsTypeOf(Port)or
+ (self.element.oclIsTypeOf(Port) and not(self.isSemiAutomatic()))or
self.element.oclIsTypeOf(LiteralInteger)or
self.element.oclIsTypeOf(Node)or
self.element.oclIsTypeOf(Class)or
@@ -880,3 +880,12 @@ query View::getEdgeType(element : Element) : String {
else self.fail()
endif;
}
+
+// see Bug 508438: a semiautomatic port layout is the persistence of a port shape layout (with no specific x and y) in the notation model
+// this layout constraint is added whenever the parent shape got refreshed (when for example we move another port)
+// we did not tranform this type of port shape to not force the location of the port at the top left corner (with explicitly x=y=0)
+query UMLShape::isSemiAutomatic() : Boolean {
+ var layoutlocation = self.layoutConstraint.oclAsType(Location);
+ return layoutlocation.x=0 and layoutlocation.y=0;
+
+}

Back to the top