Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » papyrus class diagram(Properties length in a class diagram)
papyrus class diagram [message #1725036] Mon, 29 February 2016 09:29 Go to next message
ronan prat is currently offline ronan pratFriend
Messages: 3
Registered: February 2016
Junior Member
I am beginning in UML and Papyrus
I want to know if it's possible to enter length for properties in a class diagram.
And if it's possible how i can do this.
And if it's not possible at what level of the UML method i could do this.
for example i want to define the name property of the class person.
property: Name
datatype char
length : 15

Thanks for the answer
Re: papyrus class diagram [message #1725205 is a reply to message #1725036] Tue, 01 March 2016 16:17 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

Hi Ronan,

There are many ways you can do this, depending on your ultimate goal.

You could simply define a UML datatype named "char", then use that datatype to define the name property in your "person" class and then set the property's multiplicity to be the length of the "string".

A "char" primitive type is also defined in each of the "Ecore Primitive Types", "Java primitive types", and "AnsiCLibrary" model libraries. You can get access to those libraries by right-clicking on the model in the Model Explorer and selecting "Import > Import Registered Package. (Note that the "AnsiCLibrary" library requires you to first add Papyrus' "C++ code generation (incubation)" component.)

Note that the "UML Primitive Types" model library does have have a "char", but it does have a "String".

I do hope this helps.


/Charles Rivet
Re: papyrus class diagram [message #1725269 is a reply to message #1725205] Wed, 02 March 2016 08:37 Go to previous message
ronan prat is currently offline ronan pratFriend
Messages: 3
Registered: February 2016
Junior Member
thanks for the answer.

best regards

ronan
Previous Topic:Display of association label modifiers
Next Topic:Hiding ActivityPartitions
Goto Forum:
  


Current Time: Thu Mar 28 22:34:16 GMT 2024

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

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

Back to the top