|Re: Does Papyrus support template? [message #1239707 is a reply to message #1234502]
||Tue, 04 February 2014 21:03
|| Christian Damus
Registered: July 2009
Hi, Jingang Zhou,|
Using the Luna M5 build, I can
* create a Class in a class diagram
* drop a RedefinableTemplateSignature onto the class from the palette
* drop a ClassifierTemplateParameter onto the template signature
* configure the parametered element of the parameter in the
Properties view (creating, e.g., an owned Class parametered element)
Note that the dialog that pops up to configure a newly created
ClassifierTemplateParameter doesn't have the option of creating a new
owned parametered element; it only works for selecting some existing
element (contained within your template) as the parametered element.
So, often you will just have to cancel that dialog.
It is important to remember that there are constraints governing what
you can do with template parameters. For example, Papyrus doesn't let
you choose properties or other non-Classifier elements as the
parametered element of a ClassifierTemplateParameter, because it is
meant to be used only with Classifiers.
I was not able to drop any kind of template signature onto an operation
in a class diagram, and in the Model Explorer, the New Child menu only
let me create a plain TemplateSignature in an operation (not a
RedefinableTemplateSignature). These issues look like bugs.
On 2014-01-22 05:46:42 +0000, Jingang Zhou said:
> I want to model (Java) generics with Papyrus, and I see some template
> related node types (e.g., template parameter, template signatur) in the
> palette. But how to add these elements to e.g., a class or an
> operation? I drag the template signature to a class, it does not work.
> I tried on the model explorer to new a template signature on the class,
> it also does not work.
> Does anyone know how to perform? Any help will be appreciated!
> Jingang Zhou
Powered by FUDForum
. Page generated in 0.01564 seconds