Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » structured datatype(how to create a structured datatype with profiles)
structured datatype [message #999628] Sat, 12 January 2013 17:46 Go to next message
Claudio Persico is currently offline Claudio PersicoFriend
Messages: 24
Registered: November 2012
Junior Member
Hello to everyone,

I'm modeling a room with papyrus and profiles. I've created the following types

----------------
<<enumeration>> |
 PolygonType    |
--------------- |
rectangle       |
square          |
----------------

-------------------
  <<dataType>>     |
     Shape         |
------------------ |
type: PolygonType  |
area: Real         |
-------------------


Then I created a class called "room" and I've applied a profile which has the Shape property as tagged value.
Now I want to fulfill the tagged values, but in the Shape field I can write something not defined, for example "circle", and everything goes ok because it is a string to fill and not for example a menu to choose from "rectangle" and "square".

Again what if a type has sub-types, how to manage them?

Thanks in advance,
Claudio

Re: structured datatype [message #1001716 is a reply to message #999628] Thu, 17 January 2013 09:15 Go to previous messageGo to next message
Claudio Persico is currently offline Claudio PersicoFriend
Messages: 24
Registered: November 2012
Junior Member
up
Re: structured datatype [message #1001899 is a reply to message #999628] Thu, 17 January 2013 14:21 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Claudio,

It's not entirely clear to me what the problem is. Are you saying that
in a DataType "room" in your model, having the <<shape>> stereotype
applied, you cal set the 'type' property to "circle"? In my
experience, Papyrus's property sheet presents a pick-list (as you
expected) for enumerated values.

I don't know what this has to do with sub-types.

Can you provide more details of your profile and your model, and in
which UI precisely you're seeing the wrong editing behaviour?

Cheers,

Christian


On 2013-01-12 17:46:44 +0000, Claudio Persico said:

> Hello to everyone,
>
> I'm modeling a room with papyrus and profiles. I've created the following types
>
>
> ----------------
> <<enumeration>> |
> PolygonType |
> --------------- |
> rectangle |
> square |
> ----------------
>
> -------------------
> <<dataType>> |
> Shape |
> ------------------ |
> type: PolygonType |
> area: Real |
> -------------------
>
> Then I created a class called "room" and I've applied a profile which
> has the Shape property as tagged value.
> Now I want to fulfill the tagged values, but in the Shape field I can
> write something not defined, for example "circle", and everything goes
> ok because it is a string to fill and not for example a menu to choose
> from "rectangle" and "square".
>
> Again what if a type has sub-types, how to manage them?
>
> Thanks in advance,
> Claudio
Re: structured datatype [message #1003128 is a reply to message #1001899] Sun, 20 January 2013 10:19 Go to previous messageGo to next message
Claudio Persico is currently offline Claudio PersicoFriend
Messages: 24
Registered: November 2012
Junior Member
Thanks for the reply and sorry for the confusing example: I was confused too.

I'm using Papyrus Standalone 1.12.3.

I've tried to make a better example (little different from the previous one).

This example is taken from the OMG XMI specification with some modifications

http://www.omg.org/spec/XMI/2.1.1/PDF/index.htm
par. 4.8.7 Datatype representation page 20

Here there's the profile I've made:

http://imageshack.us/a/img819/6519/datatype.jpg

and here the class with profile applied and the stereotypes:

http://imageshack.us/a/img12/8963/aroom.jpg

As you can see the class aRoom has a shape, but I can set whatever I want in the properties value.

Again, what if my two properties "upperLeft" and "lowerRight" were both [0..1] optional? How can I distinguish them in the UML with the notation provided by the standard?

I hope I've made all more clear this time.

Thanks in advance,

Claudio




Re: structured datatype [message #1003475 is a reply to message #999628] Mon, 21 January 2013 10:22 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hello Claudio,


The Papyrus version from papyrusuml.org is old and deprecated (For about 4 years now). You should really be using the current version of Papyrus, which is available at http://www.eclipse.org/papyrus


Regards,
Camille


Camille Letavernier
Re: structured datatype [message #1003507 is a reply to message #1003475] Mon, 21 January 2013 11:46 Go to previous message
Claudio Persico is currently offline Claudio PersicoFriend
Messages: 24
Registered: November 2012
Junior Member
Thanks for the reply,

I've also installed Eclipse Juno with Papyrus 0.9.1a.
The result is the same, the problem persists as you can see from the UML code produced:

<profile:Room xmi:id="_FU1_gGO_EeKg7d_269-8CQ" base_Classifier="_DdxJIGO_EeKg7d_269-8CQ" shape="whatever, somethingelse, theRest&#xD;&#xA;"/>



Probably it is not a problem but the correct behavior. I would like to know how to handle it.

Thanks in advance,
Claudio
Previous Topic:Timing Information to Sequence Diagrams
Next Topic:Papyrus and SdMetrics
Goto Forum:
  


Current Time: Tue Apr 23 10:20:32 GMT 2024

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

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

Back to the top