Skip to main content



      Home
Home » Modeling » Papyrus » Does Papyrus support template?
Does Papyrus support template? [message #1234502] Wed, 22 January 2014 00:46 Go to next message
Eclipse UserFriend
Hi,

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!

Regards,
Jingang Zhou
Re: Does Papyrus support template? [message #1239707 is a reply to message #1234502] Tue, 04 February 2014 16:03 Go to previous message
Eclipse UserFriend
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.

HTH,

Christian


On 2014-01-22 05:46:42 +0000, Jingang Zhou said:

> Hi,
>
> 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!
>
> Regards,
> Jingang Zhou
Previous Topic: Problem with SoaML and Activiti BPM (linking) plz
Next Topic:Uml Testing Profile - ValidationAction
Goto Forum:
  


Current Time: Wed Jul 23 18:32:19 EDT 2025

Powered by FUDForum. Page generated in 0.04366 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top