Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Ecore UML Profile, adding Ecore annotation
Re: Ecore UML Profile, adding Ecore annotation [message #490344] Thu, 08 October 2009 11:55 Go to next message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
Karel,

I'm not sure if this is a Magic Draw issue or a UML importer issue, but
it's certainly not a basic EMF issue I can answer. I've added the UMl2
newsgroup to the "to" list of the reply because the UML2 project
provides the support for UML <-> Ecore importers and exporters, so they
might be able to answer.


Karel Smutny wrote:
> Hello,
>
> I am experiencing problems with addind Ecore annotations to elements
> in UML model (with Ecore profile used).
>
> I have a class with an attribute with stereotype EAttribute and
> defined annotation tag. For UML I use MagicDraw 16.5.
>
> When I create GenModel from UML model, the annotations are not present
> in the converted Ecore model unless they are defined for EPackage.
>
> I don't see any annotations defined for e.g. EDataType or EAttribute.
>
> Do I miss something or the UML to Ecore conversion ignores annotations
> on all elements except Packages (with EPackage stereotype).
>
> Thanks in advance for any clue.
> Karel
Re: Ecore UML Profile, adding Ecore annotation [message #490345 is a reply to message #490344] Thu, 08 October 2009 12:01 Go to previous messageGo to next message
Karel Smutny is currently offline Karel Smutny
Messages: 7
Registered: July 2009
Junior Member
Thank you.

Just a note: It is definitely not a MagicDraw issue, the
EAttribute.annotation tag is present in the exported EMF UML2 model. It
is just not transfered/converted to Ecore annotations during UML2Ecore
conversion.

K.

Ed Merks wrote:
> Karel,
>
> I'm not sure if this is a Magic Draw issue or a UML importer issue, but
> it's certainly not a basic EMF issue I can answer. I've added the UMl2
> newsgroup to the "to" list of the reply because the UML2 project
> provides the support for UML <-> Ecore importers and exporters, so they
> might be able to answer.
>
>
> Karel Smutny wrote:
>> Hello,
>>
>> I am experiencing problems with addind Ecore annotations to elements
>> in UML model (with Ecore profile used).
>>
>> I have a class with an attribute with stereotype EAttribute and
>> defined annotation tag. For UML I use MagicDraw 16.5.
>>
>> When I create GenModel from UML model, the annotations are not present
>> in the converted Ecore model unless they are defined for EPackage.
>>
>> I don't see any annotations defined for e.g. EDataType or EAttribute.
>>
>> Do I miss something or the UML to Ecore conversion ignores annotations
>> on all elements except Packages (with EPackage stereotype).
>>
>> Thanks in advance for any clue.
>> Karel
Re: Ecore UML Profile, adding Ecore annotation [message #490563 is a reply to message #490344] Fri, 09 October 2009 08:18 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Stereotype are lost during EMF transformation stage. We have the same issue when we paste and copy models coming from RSA, Topcased, Payprus and others EclipseUML2 compatible tools from one project to another.

I think that loosing stereotypes information is logical because a stereotype is related to a profile which is only a project property.
I mean you can't add a profile on a model. You can only add a profile on a project as property. Stereotypes being related to profiles it is logical that outside your initial project you can't recover your stereotypes !!
If blocked you still have AndroMDA 3.2. alternative for code generation with MagicDraw.

[Updated on: Fri, 09 October 2009 08:21]

Report message to a moderator

Re: Ecore UML Profile, adding Ecore annotation [message #490574 is a reply to message #490563] Fri, 09 October 2009 08:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
Vlad,

Comments below.

Vlad Varnica wrote:
> Stereotype are lost during EMF transformation stage.
You see to have missed the point: stereotype information that's
specifically designed to specify Ecore Ennotations should be accurately
reflected when transforming to Ecore. It's their one and only purpose
for existing...
> We have the same issue when we paste and copy models coming from RSA,
> Topcased, Payprus and others EclipseUML2 compatible tools from one
> project to another.
No, you've missed the point.
> I think that loosing stereotypes information is logical because a
> stereotype is related to a profile which is only a project property.
No, the information in this case is supposed to be guide the specific
transformation.
> I mean you can't add a profile on a model. You can only add a profile
> on a project as property.
This isn't true either. Profiles are applied to the UML model itself,
not to an Eclipse project.
> Stereotypes being related to profiles it is logical that outside your
> initial project you can't recover your stereotypes !!
I don't understand why project have anything to do with this. UML2
works stand alone without projects.
> This is not a really important issue because you still have
> alternative for code generation with MagicDraw such as the use of
> AndroMDA 3.2.
When your goal is to transform to Ecore, that's not much of a consolation.
Re: Ecore UML Profile, adding Ecore annotation [message #490601 is a reply to message #490344] Fri, 09 October 2009 11:02 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
My answer below:

> Stereotype are lost during EMF transformation stage.
You see to have missed the point: stereotype information that's
specifically designed to specify Ecore Ennotations should be accurately reflected when transforming to Ecore. It's their one and only purpose
Ok, then EMF doens't work because the migration stereotype methods in the EMF framework just erase stereotype at transformation stage. This could be a bug but I don't think it is.
for existing...
> We have the same issue when we paste and copy models coming from RSA,Topcased, Payprus and others EclipseUML2 compatible tools from one > project to another.
No, you've missed the point.
Why ? We have tried in a test and this is what happened. This is not a metamodel brain masturbation Smile !!
> I think that loosing stereotypes information is logical because a > stereotype is related to a profile which is only a project property.
No, the information in this case is supposed to be guide the specific transformation.
It is even better as vision I agree
> I mean you can't add a profile on a model. You can only add a profile> on a project as property.
This isn't true either. Profiles are applied to the UML model itself,
not to an Eclipse project.
Profile is a specific graphical view of your model which customize your project menus, graphical represnetation etc....We have decided to apply the profile at project level because each project can have different profiles.
> Stereotypes being related to profiles it is logical that outside your initial project you can't recover your stereotypes !!
I don't understand why project have anything to do with this. UML2 works stand alone without projects.
> This is not a really important issue because you still have
alternative for code generation with MagicDraw such as the use of AndroMDA 3.2.
When your goal is to transform to Ecore, that's not much of a consolation.
Ok if Ecore transformation is the target then I agree but this user has an existing MagicDraw model which is already an UML model. So why to go to ecore and then go back to UML if you can directly go from UML to UML and use tools such as AndroMDA, Mia-software or Blue Age.
Re: Ecore UML Profile, adding Ecore annotation [message #491164 is a reply to message #490601] Tue, 13 October 2009 14:00 Go to previous messageGo to next message
james bruck is currently offline james bruck
Messages: 1724
Registered: July 2009
Senior Member
Hi Vlad, Ed

I just wanted to inject one comment so that others reading this post are not
misled.

As Ed mentioned, UML profiles are indeed applied to a package (a model is a
package) and not to a project.
The Profile mechanism is a way to extend an existing metamodel. Chapter 18
of the UML spec discuss profiles in detail.

'Project' is not a meta-type defined in UML. Profile is not ".. a specific
graphical view of your model".

The "isStrict" feature of StereotypeApplication allows for certain filtering
to be applied but I don't think this is what Vlad was getting at.


- James.


"Vlad Varnica" <varnica@omondo.com> wrote in message
news:han57r$rmb$1@build.eclipse.org...
> My answer below:
>
>> Stereotype are lost during EMF transformation stage.
> You see to have missed the point: stereotype information that's
> specifically designed to specify Ecore Ennotations should be accurately
> reflected when transforming to Ecore. It's their one and only purpose
> Ok, then EMF doens't work because the migration stereotype methods in the
> EMF framework just erase stereotype at transformation stage. This could be
> a bug but I don't think it is.
> for existing...
>> We have the same issue when we paste and copy models coming from
>> RSA,Topcased, Payprus and others EclipseUML2 compatible tools from one >
>> project to another.
> No, you've missed the point.
> Why ? We have tried in a test and this is what happened. This is not a
> metamodel brain masturbation :) !!
>> I think that loosing stereotypes information is logical because a >
>> stereotype is related to a profile which is only a project property.
> No, the information in this case is supposed to be guide the specific
> transformation.
> It is even better as vision I agree
>> I mean you can't add a profile on a model. You can only add a profile> on
>> a project as property.
> This isn't true either. Profiles are applied to the UML model itself,
> not to an Eclipse project.
> Profile is a specific graphical view of your model which customize your
> project menus, graphical represnetation etc....We have decided to apply
> the profile at project level because each project can have different
> profiles.
>> Stereotypes being related to profiles it is logical that outside your
>> initial project you can't recover your stereotypes !!
> I don't understand why project have anything to do with this. UML2 works
> stand alone without projects.
>> This is not a really important issue because you still have
> alternative for code generation with MagicDraw such as the use of
> AndroMDA 3.2.
> When your goal is to transform to Ecore, that's not much of a consolation.
> Ok if Ecore transformation is the target then I agree but this user has an
> existing MagicDraw model which is already an UML model. So why to go to
> ecore and then go back to UML if you can directly go from UML to UML and
> use tools such as AndroMDA, Mia-software or Blue Age.
Re: Ecore UML Profile, adding Ecore annotation [message #492571 is a reply to message #490345] Tue, 20 October 2009 19:13 Go to previous message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Karel,

Assuming you've set the 'Ecore Tagged Values' option to 'Process' in the
model wizard, this should just work. If you continue to have issues,
please provide a representative model and we'll look into it.

Kenn

Karel Smutny wrote:
> Thank you.
>
> Just a note: It is definitely not a MagicDraw issue, the
> EAttribute.annotation tag is present in the exported EMF UML2 model. It
> is just not transfered/converted to Ecore annotations during UML2Ecore
> conversion.
>
> K.
>
> Ed Merks wrote:
>> Karel,
>>
>> I'm not sure if this is a Magic Draw issue or a UML importer issue,
>> but it's certainly not a basic EMF issue I can answer. I've added
>> the UMl2 newsgroup to the "to" list of the reply because the UML2
>> project provides the support for UML <-> Ecore importers and
>> exporters, so they might be able to answer.
>>
>>
>> Karel Smutny wrote:
>>> Hello,
>>>
>>> I am experiencing problems with addind Ecore annotations to elements
>>> in UML model (with Ecore profile used).
>>>
>>> I have a class with an attribute with stereotype EAttribute and
>>> defined annotation tag. For UML I use MagicDraw 16.5.
>>>
>>> When I create GenModel from UML model, the annotations are not
>>> present in the converted Ecore model unless they are defined for
>>> EPackage.
>>>
>>> I don't see any annotations defined for e.g. EDataType or EAttribute.
>>>
>>> Do I miss something or the UML to Ecore conversion ignores
>>> annotations on all elements except Packages (with EPackage stereotype).
>>>
>>> Thanks in advance for any clue.
>>> Karel
Re: Ecore UML Profile, adding Ecore annotation [message #627977 is a reply to message #490344] Thu, 08 October 2009 12:01 Go to previous message
Karel Smutny is currently offline Karel Smutny
Messages: 7
Registered: July 2009
Junior Member
Thank you.

Just a note: It is definitely not a MagicDraw issue, the
EAttribute.annotation tag is present in the exported EMF UML2 model. It
is just not transfered/converted to Ecore annotations during UML2Ecore
conversion.

K.

Ed Merks wrote:
> Karel,
>
> I'm not sure if this is a Magic Draw issue or a UML importer issue, but
> it's certainly not a basic EMF issue I can answer. I've added the UMl2
> newsgroup to the "to" list of the reply because the UML2 project
> provides the support for UML <-> Ecore importers and exporters, so they
> might be able to answer.
>
>
> Karel Smutny wrote:
>> Hello,
>>
>> I am experiencing problems with addind Ecore annotations to elements
>> in UML model (with Ecore profile used).
>>
>> I have a class with an attribute with stereotype EAttribute and
>> defined annotation tag. For UML I use MagicDraw 16.5.
>>
>> When I create GenModel from UML model, the annotations are not present
>> in the converted Ecore model unless they are defined for EPackage.
>>
>> I don't see any annotations defined for e.g. EDataType or EAttribute.
>>
>> Do I miss something or the UML to Ecore conversion ignores annotations
>> on all elements except Packages (with EPackage stereotype).
>>
>> Thanks in advance for any clue.
>> Karel
Re: Ecore UML Profile, adding Ecore annotation [message #627978 is a reply to message #490344] Fri, 09 October 2009 08:18 Go to previous message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Stereotype are lost during EMF transformation stage. We have the same issue when we paste and copy models coming from RSA, Topcased, Payprus and others EclipseUML2 compatible tools from one project to another.

I think that loosing stereotypes information is logical because a stereotype is related to a profile which is only a project property.
I mean you can't add a profile on a model. You can only add a profile on a project as property. Stereotypes being related to profiles it is logical that outside your initial project you can't recover your stereotypes !!
This is not a really important issue because you still have alternative for code generation with MagicDraw such as the use of AndroMDA 3.2.
Re: Ecore UML Profile, adding Ecore annotation [message #627979 is a reply to message #627978] Fri, 09 October 2009 08:57 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
Vlad,

Comments below.

Vlad Varnica wrote:
> Stereotype are lost during EMF transformation stage.
You see to have missed the point: stereotype information that's
specifically designed to specify Ecore Ennotations should be accurately
reflected when transforming to Ecore. It's their one and only purpose
for existing...
> We have the same issue when we paste and copy models coming from RSA,
> Topcased, Payprus and others EclipseUML2 compatible tools from one
> project to another.
No, you've missed the point.
> I think that loosing stereotypes information is logical because a
> stereotype is related to a profile which is only a project property.
No, the information in this case is supposed to be guide the specific
transformation.
> I mean you can't add a profile on a model. You can only add a profile
> on a project as property.
This isn't true either. Profiles are applied to the UML model itself,
not to an Eclipse project.
> Stereotypes being related to profiles it is logical that outside your
> initial project you can't recover your stereotypes !!
I don't understand why project have anything to do with this. UML2
works stand alone without projects.
> This is not a really important issue because you still have
> alternative for code generation with MagicDraw such as the use of
> AndroMDA 3.2.
When your goal is to transform to Ecore, that's not much of a consolation.
Re: Ecore UML Profile, adding Ecore annotation [message #627981 is a reply to message #490344] Fri, 09 October 2009 11:02 Go to previous message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
My answer below:

> Stereotype are lost during EMF transformation stage.
You see to have missed the point: stereotype information that's
specifically designed to specify Ecore Ennotations should be accurately reflected when transforming to Ecore. It's their one and only purpose
Ok, then EMF doens't work because the migration stereotype methods in the EMF framework just erase stereotype at transformation stage. This could be a bug but I don't think it is.
for existing...
> We have the same issue when we paste and copy models coming from RSA,Topcased, Payprus and others EclipseUML2 compatible tools from one > project to another.
No, you've missed the point.
Why ? We have tried in a test and this is what happened. This is not a metamodel brain masturbation :) !!
> I think that loosing stereotypes information is logical because a > stereotype is related to a profile which is only a project property.
No, the information in this case is supposed to be guide the specific transformation.
It is even better as vision I agree
> I mean you can't add a profile on a model. You can only add a profile> on a project as property.
This isn't true either. Profiles are applied to the UML model itself,
not to an Eclipse project.
Profile is a specific graphical view of your model which customize your project menus, graphical represnetation etc....We have decided to apply the profile at project level because each project can have different profiles.
> Stereotypes being related to profiles it is logical that outside your initial project you can't recover your stereotypes !!
I don't understand why project have anything to do with this. UML2 works stand alone without projects.
> This is not a really important issue because you still have
alternative for code generation with MagicDraw such as the use of AndroMDA 3.2.
When your goal is to transform to Ecore, that's not much of a consolation.
Ok if Ecore transformation is the target then I agree but this user has an existing MagicDraw model which is already an UML model. So why to go to ecore and then go back to UML if you can directly go from UML to UML and use tools such as AndroMDA, Mia-software or Blue Age.
Re: Ecore UML Profile, adding Ecore annotation [message #627986 is a reply to message #627981] Tue, 13 October 2009 14:02 Go to previous message
james bruck is currently offline james bruck
Messages: 1724
Registered: July 2009
Senior Member
Hi Vlad, Ed

I just wanted to inject one comment so that others reading this post are not
misled.

As Ed mentioned, UML profiles are indeed applied to a package (a model is a
package) and not to a project.
The Profile mechanism is a way to extend an existing metamodel. Chapter 18
of the UML spec discuss profiles in detail.

'Project' is not a meta-type defined in UML. Profile is not ".. a specific
graphical view of your model".

The "isStrict" feature of StereotypeApplication allows for certain filtering
to be applied but I don't think this is what Vlad was getting at.


- James.


"Vlad Varnica" <varnica@omondo.com> wrote in message
news:han57r$rmb$1@build.eclipse.org...
> My answer below:
>
>> Stereotype are lost during EMF transformation stage.
> You see to have missed the point: stereotype information that's
> specifically designed to specify Ecore Ennotations should be accurately
> reflected when transforming to Ecore. It's their one and only purpose
> Ok, then EMF doens't work because the migration stereotype methods in the
> EMF framework just erase stereotype at transformation stage. This could be
> a bug but I don't think it is.
> for existing...
>> We have the same issue when we paste and copy models coming from
>> RSA,Topcased, Payprus and others EclipseUML2 compatible tools from one >
>> project to another.
> No, you've missed the point.
> Why ? We have tried in a test and this is what happened. This is not a
> metamodel brain masturbation :) !!
>> I think that loosing stereotypes information is logical because a >
>> stereotype is related to a profile which is only a project property.
> No, the information in this case is supposed to be guide the specific
> transformation.
> It is even better as vision I agree
>> I mean you can't add a profile on a model. You can only add a profile> on
>> a project as property.
> This isn't true either. Profiles are applied to the UML model itself,
> not to an Eclipse project.
> Profile is a specific graphical view of your model which customize your
> project menus, graphical represnetation etc....We have decided to apply
> the profile at project level because each project can have different
> profiles.
>> Stereotypes being related to profiles it is logical that outside your
>> initial project you can't recover your stereotypes !!
> I don't understand why project have anything to do with this. UML2 works
> stand alone without projects.
>> This is not a really important issue because you still have
> alternative for code generation with MagicDraw such as the use of
> AndroMDA 3.2.
> When your goal is to transform to Ecore, that's not much of a consolation.
> Ok if Ecore transformation is the target then I agree but this user has an
> existing MagicDraw model which is already an UML model. So why to go to
> ecore and then go back to UML if you can directly go from UML to UML and
> use tools such as AndroMDA, Mia-software or Blue Age.
Re: Ecore UML Profile, adding Ecore annotation [message #628000 is a reply to message #490345] Tue, 20 October 2009 19:13 Go to previous message
Kenn Hussey is currently offline Kenn Hussey
Messages: 1618
Registered: July 2009
Senior Member
Karel,

Assuming you've set the 'Ecore Tagged Values' option to 'Process' in the
model wizard, this should just work. If you continue to have issues,
please provide a representative model and we'll look into it.

Kenn

Karel Smutny wrote:
> Thank you.
>
> Just a note: It is definitely not a MagicDraw issue, the
> EAttribute.annotation tag is present in the exported EMF UML2 model. It
> is just not transfered/converted to Ecore annotations during UML2Ecore
> conversion.
>
> K.
>
> Ed Merks wrote:
>> Karel,
>>
>> I'm not sure if this is a Magic Draw issue or a UML importer issue,
>> but it's certainly not a basic EMF issue I can answer. I've added
>> the UMl2 newsgroup to the "to" list of the reply because the UML2
>> project provides the support for UML <-> Ecore importers and
>> exporters, so they might be able to answer.
>>
>>
>> Karel Smutny wrote:
>>> Hello,
>>>
>>> I am experiencing problems with addind Ecore annotations to elements
>>> in UML model (with Ecore profile used).
>>>
>>> I have a class with an attribute with stereotype EAttribute and
>>> defined annotation tag. For UML I use MagicDraw 16.5.
>>>
>>> When I create GenModel from UML model, the annotations are not
>>> present in the converted Ecore model unless they are defined for
>>> EPackage.
>>>
>>> I don't see any annotations defined for e.g. EDataType or EAttribute.
>>>
>>> Do I miss something or the UML to Ecore conversion ignores
>>> annotations on all elements except Packages (with EPackage stereotype).
>>>
>>> Thanks in advance for any clue.
>>> Karel
Previous Topic:Loading programatically a model referring to a profile in a standalone application
Next Topic:Improved support for static UML profiles.
Goto Forum:
  


Current Time: Sat Oct 25 04:24:37 GMT 2014

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

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