diff options
Diffstat (limited to 'extraplugins')
-rw-r--r-- | extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto | 5 | ||||
-rw-r--r-- | extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto | 12 |
2 files changed, 14 insertions, 3 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 0fa595ebf21..262f3eee21e 100644 --- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto +++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAStructureDiagram.qvto @@ -224,7 +224,6 @@ mapping BasicDecorationNode::toConnectorLabel() : DecorationNode inherits Node:: self.type = 'NameLabel' or
self.type = 'KindLabel' or
self.type = 'PartTextCompartment' or
- self.type = 'PartName' or
self.type = 'CommentBody'
)
}{
@@ -233,14 +232,14 @@ mapping BasicDecorationNode::toConnectorLabel() : DecorationNode inherits Node:: /****** Compartments *******/
-mapping BasicDecorationNode::toLabel() : DecorationNode inherits Node::toPapyrusNode when {
+mapping BasicDecorationNode::toLabel() : DecorationNode inherits Node::toPapyrusNodeLabel when {
not self.getType().oclIsUndefined() and
self.element.oclIsKindOf(uml::NamedElement) and
self.type = 'Name' or self.type = 'PartName' or self.type = 'PortName'
}{
// add the layoutconstraint fot the PortNamelabel
if (self.type = 'PortName'){
- var thislayoutConstraint := (self.layoutConstraint.map toLayout(self.diagram)).oclAsType(Location);
+ var thislayoutConstraint := result.layoutConstraint.oclAsType(Location);
thislayoutConstraint.x:=thislayoutConstraint.x -10; // to fit better RSA layout
thislayoutConstraint.y:=thislayoutConstraint.y -10; // to fit better RSA layout
result.layoutConstraint := thislayoutConstraint;
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto index 1394ed2a4ac..330baf01adf 100644 --- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto +++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto @@ -112,6 +112,18 @@ abstract mapping Node::toPapyrusConnectorLabel() : Node { //Do not set children } +abstract mapping Node::toPapyrusNodeLabel() : Node { + + result.visible := self.visible; + + result.type := self.getType(); + + result.layoutConstraint := (self.layoutConstraint.map toLayout(self.diagram)).oclAsType(Location); + + //Do not set element + //Do not set children +} + abstract mapping Shape::toPapyrusShape() : Shape inherits Node::toPapyrusNode, FillStyle::toFillStyle, FontStyle::toFontStyle, LineStyle::toLineStyle{ result.layoutConstraint := self.layoutConstraint.map toLayout(self.diagram); |