I am defining a M2T transformation through Acceleo from an input SysML model defined via papyrus.
I am having some problem while trying to retrieve SysML stereotypes. For the sake of simplicity I just provide a simplified version of the whole transformation.
From the Ecore point of view, a Block simply contains a reference to its base Element (base_Class). There is absolutely no inheritance relationship, it is a reference. And the UML Element contains a few methods to retrieve the applied stereotypes.
Papyrus and UML do not provide any further support. So, basically:
- A Block is not a Class
- A Class cannot be cast to a Block
You can still retrieve the Block object with "c.getStereotypeApplication('SysML::Blocks::Block')"
The same goes for all Stereotypes in all profiles.
If Acceleo provides (or used to provide, or is supposed to...) a specific support for UML Profiles, you will probably find more information directly on their forum.