Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Does Papyrus support template?
Does Papyrus support template? [message #1234502] Wed, 22 January 2014 05:46 Go to next message
Jingang Zhou is currently offline Jingang ZhouFriend
Messages: 18
Registered: August 2010
Junior Member
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 21:03 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1217
Registered: July 2009
Location: Canada
Senior Member

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: Tue Nov 24 21:39:32 GMT 2020

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

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

Back to the top