diff options
author | Asma Smaoui | 2017-01-05 14:37:21 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2017-01-06 08:29:35 +0000 |
commit | b56acb8875c4e9c283868affed7b2d6f5f01e1fd (patch) | |
tree | 0779921ecf780848a3369808d7c0db8ea2049ae4 | |
parent | 77e23e45679da64c94622251d878e02f320f4253 (diff) | |
download | org.eclipse.papyrus-b56acb8875c4e9c283868affed7b2d6f5f01e1fd.tar.gz org.eclipse.papyrus-b56acb8875c4e9c283868affed7b2d6f5f01e1fd.tar.xz org.eclipse.papyrus-b56acb8875c4e9c283868affed7b2d6f5f01e1fd.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>
-rw-r--r-- | extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto | 11 |
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;
+
+}
|