Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Stereotype and Properties
Stereotype and Properties [message #478574] Wed, 01 July 2009 12:41 Go to next message
Thibault Landré is currently offline Thibault Landré
Messages: 24
Registered: July 2009
Junior Member
Hi,

I would like to understand why in the uml2 editor, it is possible to
edit a property of a sterotype typed by a primitiveType whereas it is
not possible when the property is typed by a Datatype ?

TestCase1 :
StereotypeA has a property (prop) typed by a primitiveType (Real for
instance). StereotypeA has an extension on Metaclass 'Element'
When applying the stereotype to a class, the properties view allows you
to edit the property 'prop'.

TestCase2 :
StereotypeB has a property (propB) typed by a datatype (Time for
instance). StereotypeB has an extension on Metaclass 'Element'
When applying the stereotype to a class, you can't edit the property of
StereotypeB (propB is not displayed in the properties view).

Why ?
I have look into the UML OMG specification to see if a difference
between a PrimitiveType and DataType could explain this behaviour, but I
have not found any clue.

Thanks,

Thibault
Re: Stereotype and Properties [message #478587 is a reply to message #478574] Fri, 03 July 2009 20:09 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Thibault,

Off the top of my head, I suspect the reason is that UML2 maps profile
elements to Ecore during the profile "definition" process and data types
are automatically mapped to Ecore classes (which don't have "simple"
cell editor support) rather than data types.

Kenn

Thibault Landré wrote:
> Hi,
>
> I would like to understand why in the uml2 editor, it is possible to
> edit a property of a sterotype typed by a primitiveType whereas it is
> not possible when the property is typed by a Datatype ?
>
> TestCase1 :
> StereotypeA has a property (prop) typed by a primitiveType (Real for
> instance). StereotypeA has an extension on Metaclass 'Element'
> When applying the stereotype to a class, the properties view allows you
> to edit the property 'prop'.
>
> TestCase2 :
> StereotypeB has a property (propB) typed by a datatype (Time for
> instance). StereotypeB has an extension on Metaclass 'Element'
> When applying the stereotype to a class, you can't edit the property of
> StereotypeB (propB is not displayed in the properties view).
>
> Why ?
> I have look into the UML OMG specification to see if a difference
> between a PrimitiveType and DataType could explain this behaviour, but I
> have not found any clue.
>
> Thanks,
>
> Thibault
Re: Stereotype and Properties [message #478598 is a reply to message #478587] Wed, 08 July 2009 13:15 Go to previous messageGo to next message
Thibault Landré is currently offline Thibault Landré
Messages: 24
Registered: July 2009
Junior Member
Hi Kenn,

You are right. Primitive type are mapped to EDataType. UML DataType are
mapped to EClass.

So properties typed by UML Datatype are mapped to EReference whereas
properties typed by UML PrimitiveType are mapped to EAttribute.

Why UML Datatype are not mapped to EDatatype ?

Thanks,

Thibault


Kenn Hussey a écrit :
> Thibault,
>
> Off the top of my head, I suspect the reason is that UML2 maps profile
> elements to Ecore during the profile "definition" process and data types
> are automatically mapped to Ecore classes (which don't have "simple"
> cell editor support) rather than data types.
>
> Kenn
>
> Thibault Landré wrote:
>> Hi,
>>
>> I would like to understand why in the uml2 editor, it is possible to
>> edit a property of a sterotype typed by a primitiveType whereas it is
>> not possible when the property is typed by a Datatype ?
>>
>> TestCase1 :
>> StereotypeA has a property (prop) typed by a primitiveType (Real for
>> instance). StereotypeA has an extension on Metaclass 'Element'
>> When applying the stereotype to a class, the properties view allows
>> you to edit the property 'prop'.
>>
>> TestCase2 :
>> StereotypeB has a property (propB) typed by a datatype (Time for
>> instance). StereotypeB has an extension on Metaclass 'Element'
>> When applying the stereotype to a class, you can't edit the property
>> of StereotypeB (propB is not displayed in the properties view).
>>
>> Why ?
>> I have look into the UML OMG specification to see if a difference
>> between a PrimitiveType and DataType could explain this behaviour, but
>> I have not found any clue.
>>
>> Thanks,
>>
>> Thibault
Re: Stereotype and Properties [message #478599 is a reply to message #478598] Wed, 08 July 2009 14:52 Go to previous message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Thibault,

This has been discussed in previous threads, but if you take a look at
the way UML defines data type and the way Ecore defines it, you'll see
that they really aren't the same. The concept of primitive types in UML
is closer to Ecore's data type...

Kenn

Thibault Landré wrote:
> Hi Kenn,
>
> You are right. Primitive type are mapped to EDataType. UML DataType are
> mapped to EClass.
>
> So properties typed by UML Datatype are mapped to EReference whereas
> properties typed by UML PrimitiveType are mapped to EAttribute.
>
> Why UML Datatype are not mapped to EDatatype ?
>
> Thanks,
>
> Thibault
>
>
> Kenn Hussey a écrit :
>> Thibault,
>>
>> Off the top of my head, I suspect the reason is that UML2 maps profile
>> elements to Ecore during the profile "definition" process and data
>> types are automatically mapped to Ecore classes (which don't have
>> "simple" cell editor support) rather than data types.
>>
>> Kenn
>>
>> Thibault Landré wrote:
>>> Hi,
>>>
>>> I would like to understand why in the uml2 editor, it is possible to
>>> edit a property of a sterotype typed by a primitiveType whereas it
>>> is not possible when the property is typed by a Datatype ?
>>>
>>> TestCase1 :
>>> StereotypeA has a property (prop) typed by a primitiveType (Real for
>>> instance). StereotypeA has an extension on Metaclass 'Element'
>>> When applying the stereotype to a class, the properties view allows
>>> you to edit the property 'prop'.
>>>
>>> TestCase2 :
>>> StereotypeB has a property (propB) typed by a datatype (Time for
>>> instance). StereotypeB has an extension on Metaclass 'Element'
>>> When applying the stereotype to a class, you can't edit the property
>>> of StereotypeB (propB is not displayed in the properties view).
>>>
>>> Why ?
>>> I have look into the UML OMG specification to see if a difference
>>> between a PrimitiveType and DataType could explain this behaviour,
>>> but I have not found any clue.
>>>
>>> Thanks,
>>>
>>> Thibault
Re: Stereotype and Properties [message #627768 is a reply to message #478574] Fri, 03 July 2009 20:09 Go to previous message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Thibault,

Off the top of my head, I suspect the reason is that UML2 maps profile
elements to Ecore during the profile "definition" process and data types
are automatically mapped to Ecore classes (which don't have "simple"
cell editor support) rather than data types.

Kenn

Thibault Landré wrote:
> Hi,
>
> I would like to understand why in the uml2 editor, it is possible to
> edit a property of a sterotype typed by a primitiveType whereas it is
> not possible when the property is typed by a Datatype ?
>
> TestCase1 :
> StereotypeA has a property (prop) typed by a primitiveType (Real for
> instance). StereotypeA has an extension on Metaclass 'Element'
> When applying the stereotype to a class, the properties view allows you
> to edit the property 'prop'.
>
> TestCase2 :
> StereotypeB has a property (propB) typed by a datatype (Time for
> instance). StereotypeB has an extension on Metaclass 'Element'
> When applying the stereotype to a class, you can't edit the property of
> StereotypeB (propB is not displayed in the properties view).
>
> Why ?
> I have look into the UML OMG specification to see if a difference
> between a PrimitiveType and DataType could explain this behaviour, but I
> have not found any clue.
>
> Thanks,
>
> Thibault
Re: Stereotype and Properties [message #627780 is a reply to message #478587] Wed, 08 July 2009 13:15 Go to previous message
Thibault Landré is currently offline Thibault Landré
Messages: 24
Registered: July 2009
Junior Member
Hi Kenn,

You are right. Primitive type are mapped to EDataType. UML DataType are
mapped to EClass.

So properties typed by UML Datatype are mapped to EReference whereas
properties typed by UML PrimitiveType are mapped to EAttribute.

Why UML Datatype are not mapped to EDatatype ?

Thanks,

Thibault


Kenn Hussey a écrit :
> Thibault,
>
> Off the top of my head, I suspect the reason is that UML2 maps profile
> elements to Ecore during the profile "definition" process and data types
> are automatically mapped to Ecore classes (which don't have "simple"
> cell editor support) rather than data types.
>
> Kenn
>
> Thibault Landré wrote:
>> Hi,
>>
>> I would like to understand why in the uml2 editor, it is possible to
>> edit a property of a sterotype typed by a primitiveType whereas it is
>> not possible when the property is typed by a Datatype ?
>>
>> TestCase1 :
>> StereotypeA has a property (prop) typed by a primitiveType (Real for
>> instance). StereotypeA has an extension on Metaclass 'Element'
>> When applying the stereotype to a class, the properties view allows
>> you to edit the property 'prop'.
>>
>> TestCase2 :
>> StereotypeB has a property (propB) typed by a datatype (Time for
>> instance). StereotypeB has an extension on Metaclass 'Element'
>> When applying the stereotype to a class, you can't edit the property
>> of StereotypeB (propB is not displayed in the properties view).
>>
>> Why ?
>> I have look into the UML OMG specification to see if a difference
>> between a PrimitiveType and DataType could explain this behaviour, but
>> I have not found any clue.
>>
>> Thanks,
>>
>> Thibault
Re: Stereotype and Properties [message #627781 is a reply to message #478598] Wed, 08 July 2009 14:52 Go to previous message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Thibault,

This has been discussed in previous threads, but if you take a look at
the way UML defines data type and the way Ecore defines it, you'll see
that they really aren't the same. The concept of primitive types in UML
is closer to Ecore's data type...

Kenn

Thibault Landré wrote:
> Hi Kenn,
>
> You are right. Primitive type are mapped to EDataType. UML DataType are
> mapped to EClass.
>
> So properties typed by UML Datatype are mapped to EReference whereas
> properties typed by UML PrimitiveType are mapped to EAttribute.
>
> Why UML Datatype are not mapped to EDatatype ?
>
> Thanks,
>
> Thibault
>
>
> Kenn Hussey a écrit :
>> Thibault,
>>
>> Off the top of my head, I suspect the reason is that UML2 maps profile
>> elements to Ecore during the profile "definition" process and data
>> types are automatically mapped to Ecore classes (which don't have
>> "simple" cell editor support) rather than data types.
>>
>> Kenn
>>
>> Thibault Landré wrote:
>>> Hi,
>>>
>>> I would like to understand why in the uml2 editor, it is possible to
>>> edit a property of a sterotype typed by a primitiveType whereas it
>>> is not possible when the property is typed by a Datatype ?
>>>
>>> TestCase1 :
>>> StereotypeA has a property (prop) typed by a primitiveType (Real for
>>> instance). StereotypeA has an extension on Metaclass 'Element'
>>> When applying the stereotype to a class, the properties view allows
>>> you to edit the property 'prop'.
>>>
>>> TestCase2 :
>>> StereotypeB has a property (propB) typed by a datatype (Time for
>>> instance). StereotypeB has an extension on Metaclass 'Element'
>>> When applying the stereotype to a class, you can't edit the property
>>> of StereotypeB (propB is not displayed in the properties view).
>>>
>>> Why ?
>>> I have look into the UML OMG specification to see if a difference
>>> between a PrimitiveType and DataType could explain this behaviour,
>>> but I have not found any clue.
>>>
>>> Thanks,
>>>
>>> Thibault
Previous Topic:UML2 Context Menu
Next Topic:Parameterized classes / Template Signature
Goto Forum:
  


Current Time: Wed Jul 23 20:30:53 EDT 2014

Powered by FUDForum. Page generated in 0.02413 seconds