Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Preserve EEnums literal by UML import
Re: Preserve EEnums literal by UML import [message #478517] Sat, 13 June 2009 22:09 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26232
Registered: July 2009
Senior Member
Timothy,

Comments below.

Timothy Marc wrote:
> Hey all,
>
> is there a way, to annotate an EEnum literal in a UML model?
A UML question....
> I create my Ecore model from an UML model and want the literals be
> different to the literals name.
I'm not sure that UML supports that...
>
>
> For example:
>
> EEnuml Literal
> value := 0
> name: Closing
> luieral: <->
>
> Currently, i change them manually everytime, i reload the UML model,
> on which my Ecore model depends. Is there a way, to specify the
> literal String somewhere in the UML model directly or mark them as
> "preserved" in Ecore?
When it comes to UML issues, it's generally best to ask on the UML
newsgroup, so I've added that to the "to" list of the reply...

One "trick" that I would use would be to export the Ecore model to UML
and see what annotations are on the result. I would expect Ecore -> UML
->Ecore to be a round trip, as is the case for Ecore -> XML Schema -> Ecore.
>
> Thx
> Timothy
Re: Preserve EEnums literal by UML import [message #478518 is a reply to message #478517] Mon, 15 June 2009 20:24 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Timothy, Ed,

You can apply the Ecore profile to your UML model and then add the <<eEnum>>
stereotype to your UML enumeration and <<eEnumLiteral>> stereotype to your
enumeration literal. You can then change the "Enum Literal Name" etc.
Anything you can specify with Ecore, you should also be able to specify in
UML.
In addition, if you simply want to change the default integer value, you can
specify a Literal Integer as the 'specification' of your enumeration
literal and then add a specific value.

Ed makes a good point in that if you want to find the UML equivalent to an
Ecore concept, you can create a Ecore mode, then select the top level root
element then select : "Sample Ecore Editor > Convert To UML Model...".

Cheers,
- James.

"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:h1183h$d7r$1@build.eclipse.org...
> Timothy,
>
> Comments below.
>
> Timothy Marc wrote:
>> Hey all,
>>
>> is there a way, to annotate an EEnum literal in a UML model?
> A UML question....
>> I create my Ecore model from an UML model and want the literals be
>> different to the literals name.
> I'm not sure that UML supports that...
>>
>>
>> For example:
>>
>> EEnuml Literal
>> value := 0
>> name: Closing
>> luieral: <->
>>
>> Currently, i change them manually everytime, i reload the UML model, on
>> which my Ecore model depends. Is there a way, to specify the literal
>> String somewhere in the UML model directly or mark them as "preserved" in
>> Ecore?
> When it comes to UML issues, it's generally best to ask on the UML
> newsgroup, so I've added that to the "to" list of the reply...
>
> One "trick" that I would use would be to export the Ecore model to UML and
> see what annotations are on the result. I would expect Ecore ->
> UML ->Ecore to be a round trip, as is the case for Ecore -> XML Schema ->
> Ecore.
>>
>> Thx
>> Timothy
Re: Preserve EEnums literal by UML import [message #478520 is a reply to message #478518] Wed, 17 June 2009 07:54 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Okay,

thanks, i will try your hints in the next days. But, it sounds very
promising.

Thanks
Marc-Florian

James Bruck schrieb:
> Hi Timothy, Ed,
>
> You can apply the Ecore profile to your UML model and then add the <<eEnum>>
> stereotype to your UML enumeration and <<eEnumLiteral>> stereotype to your
> enumeration literal. You can then change the "Enum Literal Name" etc.
> Anything you can specify with Ecore, you should also be able to specify in
> UML.
> In addition, if you simply want to change the default integer value, you can
> specify a Literal Integer as the 'specification' of your enumeration
> literal and then add a specific value.
>
> Ed makes a good point in that if you want to find the UML equivalent to an
> Ecore concept, you can create a Ecore mode, then select the top level root
> element then select : "Sample Ecore Editor > Convert To UML Model...".
>
> Cheers,
> - James.
>
> "Ed Merks" <Ed.Merks@gmail.com> wrote in message
> news:h1183h$d7r$1@build.eclipse.org...
>> Timothy,
>>
>> Comments below.
>>
>> Timothy Marc wrote:
>>> Hey all,
>>>
>>> is there a way, to annotate an EEnum literal in a UML model?
>> A UML question....
>>> I create my Ecore model from an UML model and want the literals be
>>> different to the literals name.
>> I'm not sure that UML supports that...
>>>
>>> For example:
>>>
>>> EEnuml Literal
>>> value := 0
>>> name: Closing
>>> luieral: <->
>>>
>>> Currently, i change them manually everytime, i reload the UML model, on
>>> which my Ecore model depends. Is there a way, to specify the literal
>>> String somewhere in the UML model directly or mark them as "preserved" in
>>> Ecore?
>> When it comes to UML issues, it's generally best to ask on the UML
>> newsgroup, so I've added that to the "to" list of the reply...
>>
>> One "trick" that I would use would be to export the Ecore model to UML and
>> see what annotations are on the result. I would expect Ecore ->
>> UML ->Ecore to be a round trip, as is the case for Ecore -> XML Schema ->
>> Ecore.
>>> Thx
>>> Timothy
>
>
Re: Preserve EEnums literal by UML import [message #627697 is a reply to message #478517] Mon, 15 June 2009 20:24 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Timothy, Ed,

You can apply the Ecore profile to your UML model and then add the <<eEnum>>
stereotype to your UML enumeration and <<eEnumLiteral>> stereotype to your
enumeration literal. You can then change the "Enum Literal Name" etc.
Anything you can specify with Ecore, you should also be able to specify in
UML.
In addition, if you simply want to change the default integer value, you can
specify a Literal Integer as the 'specification' of your enumeration
literal and then add a specific value.

Ed makes a good point in that if you want to find the UML equivalent to an
Ecore concept, you can create a Ecore mode, then select the top level root
element then select : "Sample Ecore Editor > Convert To UML Model...".

Cheers,
- James.

"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:h1183h$d7r$1@build.eclipse.org...
> Timothy,
>
> Comments below.
>
> Timothy Marc wrote:
>> Hey all,
>>
>> is there a way, to annotate an EEnum literal in a UML model?
> A UML question....
>> I create my Ecore model from an UML model and want the literals be
>> different to the literals name.
> I'm not sure that UML supports that...
>>
>>
>> For example:
>>
>> EEnuml Literal
>> value := 0
>> name: Closing
>> luieral: <->
>>
>> Currently, i change them manually everytime, i reload the UML model, on
>> which my Ecore model depends. Is there a way, to specify the literal
>> String somewhere in the UML model directly or mark them as "preserved" in
>> Ecore?
> When it comes to UML issues, it's generally best to ask on the UML
> newsgroup, so I've added that to the "to" list of the reply...
>
> One "trick" that I would use would be to export the Ecore model to UML and
> see what annotations are on the result. I would expect Ecore ->
> UML ->Ecore to be a round trip, as is the case for Ecore -> XML Schema ->
> Ecore.
>>
>> Thx
>> Timothy
Re: Preserve EEnums literal by UML import [message #627699 is a reply to message #478518] Wed, 17 June 2009 07:54 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Okay,

thanks, i will try your hints in the next days. But, it sounds very
promising.

Thanks
Marc-Florian

James Bruck schrieb:
> Hi Timothy, Ed,
>
> You can apply the Ecore profile to your UML model and then add the <<eEnum>>
> stereotype to your UML enumeration and <<eEnumLiteral>> stereotype to your
> enumeration literal. You can then change the "Enum Literal Name" etc.
> Anything you can specify with Ecore, you should also be able to specify in
> UML.
> In addition, if you simply want to change the default integer value, you can
> specify a Literal Integer as the 'specification' of your enumeration
> literal and then add a specific value.
>
> Ed makes a good point in that if you want to find the UML equivalent to an
> Ecore concept, you can create a Ecore mode, then select the top level root
> element then select : "Sample Ecore Editor > Convert To UML Model...".
>
> Cheers,
> - James.
>
> "Ed Merks" <Ed.Merks@gmail.com> wrote in message
> news:h1183h$d7r$1@build.eclipse.org...
>> Timothy,
>>
>> Comments below.
>>
>> Timothy Marc wrote:
>>> Hey all,
>>>
>>> is there a way, to annotate an EEnum literal in a UML model?
>> A UML question....
>>> I create my Ecore model from an UML model and want the literals be
>>> different to the literals name.
>> I'm not sure that UML supports that...
>>>
>>> For example:
>>>
>>> EEnuml Literal
>>> value := 0
>>> name: Closing
>>> luieral: <->
>>>
>>> Currently, i change them manually everytime, i reload the UML model, on
>>> which my Ecore model depends. Is there a way, to specify the literal
>>> String somewhere in the UML model directly or mark them as "preserved" in
>>> Ecore?
>> When it comes to UML issues, it's generally best to ask on the UML
>> newsgroup, so I've added that to the "to" list of the reply...
>>
>> One "trick" that I would use would be to export the Ecore model to UML and
>> see what annotations are on the result. I would expect Ecore ->
>> UML ->Ecore to be a round trip, as is the case for Ecore -> XML Schema ->
>> Ecore.
>>> Thx
>>> Timothy
>
>
Previous Topic:[Announce] MDT UML2 3.0.0RC5 is available
Next Topic:Strategy for loading commercial UML XMI 2.1 (MaicDraw)
Goto Forum:
  


Current Time: Thu Nov 27 13:47:58 GMT 2014

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

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