Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-06-30 15:02:44 +0000
committerCamille Letavernier2015-06-30 15:02:44 +0000
commite1175b33e7268016f277d7ca714c465dfc198a03 (patch)
treec3fa723e828ebe3a019851e42e331ccdb11bb9e1 /extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto
parente0e8346a6e76cd78008cc1316875a4d68d1e2072 (diff)
downloadorg.eclipse.papyrus-e1175b33e7268016f277d7ca714c465dfc198a03.tar.gz
org.eclipse.papyrus-e1175b33e7268016f277d7ca714c465dfc198a03.tar.xz
org.eclipse.papyrus-e1175b33e7268016f277d7ca714c465dfc198a03.zip
462393: [Model Import] Appearance property "Show Stereotype" not handled
for imported model elements in diagrams https://bugs.eclipse.org/bugs/show_bug.cgi?id=462393 Change-Id: I0d4e7a2fcb8b55854e591b6155bbd6599bb5963b Signed-off-by: Camille Letavernier <camille.letavernier@cea.fr>
Diffstat (limited to 'extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto')
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto15
1 files changed, 15 insertions, 0 deletions
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 bbee7d519e6..08976c75595 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/transform/RSAToPapyrus.qvto
@@ -98,6 +98,21 @@ abstract mapping Node::toPapyrusConnectorLabel() : Node {
abstract mapping Shape::toPapyrusShape() : Shape inherits Node::toPapyrusNode, FillStyle::toFillStyle, FontStyle::toFontStyle, LineStyle::toLineStyle{
result.layoutConstraint := self.layoutConstraint.map toLayout(self.diagram);
+
+ if self.oclIsKindOf(UMLView) then {
+ result.map handleStereotypeDisplay(self.oclAsType(UMLView));
+ } endif;
+}
+
+mapping inout View::handleStereotypeDisplay(sourceView : UMLView) : StringValueStyle when {
+ not sourceView.showStereotype.oclIsUndefined()
+}{
+ //We need to know all stereotypes to properly translate this in Papyrus, but they might be broken at this stage
+ //Additionally, we will lose track of the source View when stereotypes are fixed.
+ //Let's serialize this information temporarily, then rely on it to properly initialize Papyrus DecorationNodes later
+ result.name := "stereotypeDisplayBackup";
+ result.stringValue := sourceView.showStereotype;
+ self.styles += result;
}
abstract mapping DrawerStyle::toDrawerStyle() : DrawerStyle {

Back to the top