Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Cuccuru2015-05-27 06:25:33 -0400
committerArnaud Cuccuru2015-05-27 06:26:23 -0400
commitd0024a664a8758da3b9fa7902767a200c9201e4b (patch)
tree1ef1ddd6f97fa3ced93f5fe16b6cb70153ddd7f4 /plugins
parentde50dad6422b3bec79c629c94eb69e34dd432f0b (diff)
parentb9ae078da54b58d1813b3518c633d5f514523f17 (diff)
downloadorg.eclipse.papyrus-d0024a664a8758da3b9fa7902767a200c9201e4b.tar.gz
org.eclipse.papyrus-d0024a664a8758da3b9fa7902767a200c9201e4b.tar.xz
org.eclipse.papyrus-d0024a664a8758da3b9fa7902767a200c9201e4b.zip
Merge branch 'bugs/462954-alf'
Change-Id: I817f46d46ed9ddd706367b18c6ca9b719c26c851 Signed-off-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/Alf2UML.qvto16
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/Alf.xtext2
2 files changed, 12 insertions, 6 deletions
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/Alf2UML.qvto b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/Alf2UML.qvto
index 007cb7de705..fe44b8e75e9 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/Alf2UML.qvto
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/Alf2UML.qvto
@@ -880,11 +880,17 @@ mapping ActiveClassDefinition::toClass() : Class
ownedReception := self.ownedMember->map toNamedElement()[Reception];
ownedReception += self.ownedMember[definition.oclIsKindOf(SignalReceptionDefinition)]->map toReception();
if self.classifierBehavior <> null then {
- classifierBehavior := self.classifierBehavior.map toActivity();
- classifierBehavior.name := uniqueName(result.name + "$behavior", result);
- classifierBehavior.visibility := VisibilityKind::private;
- ownedBehavior += classifierBehavior; // Eclipse implementation only
- // addDefinition(classifierBehavior.oclAsType(Activity), self.classifierBehavior.body);
+ // NOTE: The Xtext grammar currently does not set isStub = true for a stub classifierBehavior.
+ if self.classifierBehavior.isStub or self.classifierBehavior.body = null then {
+ classifierBehavior := new Activity(Sequence{});
+ classifierBehavior.name := self.classifierBehavior.actualName() + "$stub";
+ } else {
+ classifierBehavior := self.classifierBehavior.map toActivity();
+ classifierBehavior.name := uniqueName(result.name + "$behavior", result);
+ classifierBehavior.visibility := VisibilityKind::private;
+ ownedBehavior += classifierBehavior; // Because classifierBehavior is not a member in the Ecore metamodel.
+ // addDefinition(classifierBehavior.oclAsType(Activity), self.classifierBehavior.body);
+ } endif;
} endif;
} endif;
}
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/Alf.xtext b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/Alf.xtext
index 5b9936db02a..729197eefe5 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/Alf.xtext
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/src/org/eclipse/papyrus/uml/alf/Alf.xtext
@@ -212,7 +212,7 @@ ActiveClassDefinitionOrStub returns ActiveClassDefinition :
;
BehaviorClause returns ActivityDefinition :
- body = Block | name = Name // TODO: isStub = true
+ body = Block | name = Name // NOTE: Does not set isStub = true.
;
ActiveClassMember returns Member :

Back to the top