Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Generating code with stereotypes
Re: Generating code with stereotypes [message #474205] Fri, 13 July 2007 15:21 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Jose,

Probably it's best to start with the UML newsgroup with this question,
so I've added that to the "to" list of my reply. I'm not sure what it
does with arbitrary stereotypes, but I think it throws them away. The
closest equivalent concept in Ecore would be an EAnnotation, so you
might need to use that.


Jose wrote:
> Hi,
>
> How can I generate code with EMF from a UML Diagram that uses
> stereotypes? With OCL? EAnnotation from EMF?
> What have I to do for not lost the stereotypes and generate code
> correctly?
>
> Thanks.
> (Sorry for my English).


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generating code with stereotypes [message #474217 is a reply to message #474205] Mon, 16 July 2007 13:18 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jose,

Information from arbitrary stereotypes is not used in the conversion from
uml to ecore.
There is some facility to generate code from OCL when it is used in the
original model but not when it is in an applied stereotype ( check out the
new and noteworthy section for some details. ).
UML also now has the means to use static profile definition ( also see new
and noteworthy ), but this might not be what you are interested in.

There does seem to be an outstanding defect that might be similar to what
you are looking for https://bugs.eclipse.org/bugs/show_bug.cgi?id=101404.
You might want to state your exact needs in a bugzilla or add to the one I
just mentioned and it will be looked into.

- James.


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f785au$g6s$1@build.eclipse.org...
> Jose,
>
> Probably it's best to start with the UML newsgroup with this question,
> so I've added that to the "to" list of my reply. I'm not sure what it
> does with arbitrary stereotypes, but I think it throws them away. The
> closest equivalent concept in Ecore would be an EAnnotation, so you
> might need to use that.
>
>
> Jose wrote:
> > Hi,
> >
> > How can I generate code with EMF from a UML Diagram that uses
> > stereotypes? With OCL? EAnnotation from EMF?
> > What have I to do for not lost the stereotypes and generate code
> > correctly?
> >
> > Thanks.
> > (Sorry for my English).
Re: Generating code with stereotypes [message #474391 is a reply to message #474217] Fri, 20 July 2007 11:38 Go to previous messageGo to next message
Jose is currently offline JoseFriend
Messages: 51
Registered: July 2009
Member
Thanks James-Bruck,

But Omondo's group can generate code using UML2 and EMF, so that I could
not do it?

Excuse me if the question is very stupid.

Thanks.

James Bruck escribió:
> Hi Jose,
>
> Information from arbitrary stereotypes is not used in the conversion from
> uml to ecore.
> There is some facility to generate code from OCL when it is used in the
> original model but not when it is in an applied stereotype ( check out the
> new and noteworthy section for some details. ).
> UML also now has the means to use static profile definition ( also see new
> and noteworthy ), but this might not be what you are interested in.
>
> There does seem to be an outstanding defect that might be similar to what
> you are looking for https://bugs.eclipse.org/bugs/show_bug.cgi?id=101404.
> You might want to state your exact needs in a bugzilla or add to the one I
> just mentioned and it will be looked into.
>
> - James.
>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:f785au$g6s$1@build.eclipse.org...
>> Jose,
>>
>> Probably it's best to start with the UML newsgroup with this question,
>> so I've added that to the "to" list of my reply. I'm not sure what it
>> does with arbitrary stereotypes, but I think it throws them away. The
>> closest equivalent concept in Ecore would be an EAnnotation, so you
>> might need to use that.
>>
>>
>> Jose wrote:
>>> Hi,
>>>
>>> How can I generate code with EMF from a UML Diagram that uses
>>> stereotypes? With OCL? EAnnotation from EMF?
>>> What have I to do for not lost the stereotypes and generate code
>>> correctly?
>>>
>>> Thanks.
>>> (Sorry for my English).
>
>
Re: Generating code with stereotypes [message #474392 is a reply to message #474391] Fri, 20 July 2007 14:16 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jose,

I'm not sure I'm interpreting your question correctly.

Are you saying that Omondo can generate code from applied stereotypes from
some specific profile?
or are you saying that Omondo can generate code from UML2 in general?

If it's the first case: I'm not familiar with Omondo but they might be
extending the uml to ecore converter in some way. The existing
UML2EcoreConverter does for example take the Ecore profile into account in
the conversion process. Perhaps Omondo does something special with another
profile?

If it's the second case: You can generate code using UML2 by converting to
ecore and then generating code from the ecore representation.



By adding a stereotype you are introducing a new item at the meta model
level. I'm not sure how the general uml to ecore converter can interpret
this new meta level property. Ultimately, code generation from uml happens
by first mapping the uml representation to an ecore representation and then
code generation occurrs from ecore. There would have to be some agreed
upon mapping from these newly introduced values within the stereotype to an
ecore representation.


- James.




"Jose" <ja.navarro.a@alumnos.urjc.es> wrote in message
news:f7q6sj$d5s$1@build.eclipse.org...
> Thanks James-Bruck,
>
> But Omondo's group can generate code using UML2 and EMF, so that I could
> not do it?
>
> Excuse me if the question is very stupid.
>
> Thanks.
>
> James Bruck escribi
Re: Generating code with stereotypes [message #474394 is a reply to message #474392] Fri, 20 July 2007 14:54 Go to previous message
Jose is currently offline JoseFriend
Messages: 51
Registered: July 2009
Member
Thank you very much, James

James Bruck wrote:
> Hi Jose,
>
> I'm not sure I'm interpreting your question correctly.
>
> Are you saying that Omondo can generate code from applied stereotypes from
> some specific profile?
> or are you saying that Omondo can generate code from UML2 in general?
>
> If it's the first case: I'm not familiar with Omondo but they might be
> extending the uml to ecore converter in some way. The existing
> UML2EcoreConverter does for example take the Ecore profile into account in
> the conversion process. Perhaps Omondo does something special with another
> profile?
>
> If it's the second case: You can generate code using UML2 by converting to
> ecore and then generating code from the ecore representation.
>
>
>
> By adding a stereotype you are introducing a new item at the meta model
> level. I'm not sure how the general uml to ecore converter can interpret
> this new meta level property. Ultimately, code generation from uml happens
> by first mapping the uml representation to an ecore representation and then
> code generation occurrs from ecore. There would have to be some agreed
> upon mapping from these newly introduced values within the stereotype to an
> ecore representation.
>
>
> - James.
>
>
>
>
> "Jose" <ja.navarro.a@alumnos.urjc.es> wrote in message
> news:f7q6sj$d5s$1@build.eclipse.org...
>> Thanks James-Bruck,
>>
>> But Omondo's group can generate code using UML2 and EMF, so that I could
>> not do it?
>>
>> Excuse me if the question is very stupid.
>>
>> Thanks.
>>
>> James Bruck wrote:
>>> Hi Jose,
>>>
>>> Information from arbitrary stereotypes is not used in the conversion
> from
>>> uml to ecore.
>>> There is some facility to generate code from OCL when it is used in the
>>> original model but not when it is in an applied stereotype ( check out
> the
>>> new and noteworthy section for some details. ).
>>> UML also now has the means to use static profile definition ( also see
> new
>>> and noteworthy ), but this might not be what you are interested in.
>>>
>>> There does seem to be an outstanding defect that might be similar to
> what
>>> you are looking for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=101404.
>>> You might want to state your exact needs in a bugzilla or add to the one
> I
>>> just mentioned and it will be looked into.
>>>
>>> - James.
>>>
>>>
>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>> news:f785au$g6s$1@build.eclipse.org...
>>>> Jose,
>>>>
>>>> Probably it's best to start with the UML newsgroup with this question,
>>>> so I've added that to the "to" list of my reply. I'm not sure what it
>>>> does with arbitrary stereotypes, but I think it throws them away. The
>>>> closest equivalent concept in Ecore would be an EAnnotation, so you
>>>> might need to use that.
>>>>
>>>>
>>>> Jose wrote:
>>>>> Hi,
>>>>>
>>>>> How can I generate code with EMF from a UML Diagram that uses
>>>>> stereotypes? With OCL? EAnnotation from EMF?
>>>>> What have I to do for not lost the stereotypes and generate code
>>>>> correctly?
>>>>>
>>>>> Thanks.
>>>>> (Sorry for my English).
>>>
>
>
Re: Generating code with stereotypes [message #623674 is a reply to message #474205] Mon, 16 July 2007 13:18 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jose,

Information from arbitrary stereotypes is not used in the conversion from
uml to ecore.
There is some facility to generate code from OCL when it is used in the
original model but not when it is in an applied stereotype ( check out the
new and noteworthy section for some details. ).
UML also now has the means to use static profile definition ( also see new
and noteworthy ), but this might not be what you are interested in.

There does seem to be an outstanding defect that might be similar to what
you are looking for https://bugs.eclipse.org/bugs/show_bug.cgi?id=101404
You might want to state your exact needs in a bugzilla or add to the one I
just mentioned and it will be looked into.

- James.


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:f785au$g6s$1@build.eclipse.org...
> Jose,
>
> Probably it's best to start with the UML newsgroup with this question,
> so I've added that to the "to" list of my reply. I'm not sure what it
> does with arbitrary stereotypes, but I think it throws them away. The
> closest equivalent concept in Ecore would be an EAnnotation, so you
> might need to use that.
>
>
> Jose wrote:
> > Hi,
> >
> > How can I generate code with EMF from a UML Diagram that uses
> > stereotypes? With OCL? EAnnotation from EMF?
> > What have I to do for not lost the stereotypes and generate code
> > correctly?
> >
> > Thanks.
> > (Sorry for my English).
Re: Generating code with stereotypes [message #623917 is a reply to message #474217] Fri, 20 July 2007 11:38 Go to previous message
Jose is currently offline JoseFriend
Messages: 51
Registered: July 2009
Member
Thanks James-Bruck,

But Omondo's group can generate code using UML2 and EMF, so that I could
not do it?

Excuse me if the question is very stupid.

Thanks.

James Bruck escribió:
> Hi Jose,
>
> Information from arbitrary stereotypes is not used in the conversion from
> uml to ecore.
> There is some facility to generate code from OCL when it is used in the
> original model but not when it is in an applied stereotype ( check out the
> new and noteworthy section for some details. ).
> UML also now has the means to use static profile definition ( also see new
> and noteworthy ), but this might not be what you are interested in.
>
> There does seem to be an outstanding defect that might be similar to what
> you are looking for https://bugs.eclipse.org/bugs/show_bug.cgi?id=101404
> You might want to state your exact needs in a bugzilla or add to the one I
> just mentioned and it will be looked into.
>
> - James.
>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:f785au$g6s$1@build.eclipse.org...
>> Jose,
>>
>> Probably it's best to start with the UML newsgroup with this question,
>> so I've added that to the "to" list of my reply. I'm not sure what it
>> does with arbitrary stereotypes, but I think it throws them away. The
>> closest equivalent concept in Ecore would be an EAnnotation, so you
>> might need to use that.
>>
>>
>> Jose wrote:
>>> Hi,
>>>
>>> How can I generate code with EMF from a UML Diagram that uses
>>> stereotypes? With OCL? EAnnotation from EMF?
>>> What have I to do for not lost the stereotypes and generate code
>>> correctly?
>>>
>>> Thanks.
>>> (Sorry for my English).
>
>
Re: Generating code with stereotypes [message #623919 is a reply to message #474391] Fri, 20 July 2007 14:16 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Jose,

I'm not sure I'm interpreting your question correctly.

Are you saying that Omondo can generate code from applied stereotypes from
some specific profile?
or are you saying that Omondo can generate code from UML2 in general?

If it's the first case: I'm not familiar with Omondo but they might be
extending the uml to ecore converter in some way. The existing
UML2EcoreConverter does for example take the Ecore profile into account in
the conversion process. Perhaps Omondo does something special with another
profile?

If it's the second case: You can generate code using UML2 by converting to
ecore and then generating code from the ecore representation.



By adding a stereotype you are introducing a new item at the meta model
level. I'm not sure how the general uml to ecore converter can interpret
this new meta level property. Ultimately, code generation from uml happens
by first mapping the uml representation to an ecore representation and then
code generation occurrs from ecore. There would have to be some agreed
upon mapping from these newly introduced values within the stereotype to an
ecore representation.


- James.




"Jose" <ja.navarro.a@alumnos.urjc.es> wrote in message
news:f7q6sj$d5s$1@build.eclipse.org...
> Thanks James-Bruck,
>
> But Omondo's group can generate code using UML2 and EMF, so that I could
> not do it?
>
> Excuse me if the question is very stupid.
>
> Thanks.
>
> James Bruck escribi
Re: Generating code with stereotypes [message #623925 is a reply to message #474392] Fri, 20 July 2007 14:54 Go to previous message
Jose is currently offline JoseFriend
Messages: 51
Registered: July 2009
Member
Thank you very much, James

James Bruck wrote:
> Hi Jose,
>
> I'm not sure I'm interpreting your question correctly.
>
> Are you saying that Omondo can generate code from applied stereotypes from
> some specific profile?
> or are you saying that Omondo can generate code from UML2 in general?
>
> If it's the first case: I'm not familiar with Omondo but they might be
> extending the uml to ecore converter in some way. The existing
> UML2EcoreConverter does for example take the Ecore profile into account in
> the conversion process. Perhaps Omondo does something special with another
> profile?
>
> If it's the second case: You can generate code using UML2 by converting to
> ecore and then generating code from the ecore representation.
>
>
>
> By adding a stereotype you are introducing a new item at the meta model
> level. I'm not sure how the general uml to ecore converter can interpret
> this new meta level property. Ultimately, code generation from uml happens
> by first mapping the uml representation to an ecore representation and then
> code generation occurrs from ecore. There would have to be some agreed
> upon mapping from these newly introduced values within the stereotype to an
> ecore representation.
>
>
> - James.
>
>
>
>
> "Jose" <ja.navarro.a@alumnos.urjc.es> wrote in message
> news:f7q6sj$d5s$1@build.eclipse.org...
>> Thanks James-Bruck,
>>
>> But Omondo's group can generate code using UML2 and EMF, so that I could
>> not do it?
>>
>> Excuse me if the question is very stupid.
>>
>> Thanks.
>>
>> James Bruck wrote:
>>> Hi Jose,
>>>
>>> Information from arbitrary stereotypes is not used in the conversion
> from
>>> uml to ecore.
>>> There is some facility to generate code from OCL when it is used in the
>>> original model but not when it is in an applied stereotype ( check out
> the
>>> new and noteworthy section for some details. ).
>>> UML also now has the means to use static profile definition ( also see
> new
>>> and noteworthy ), but this might not be what you are interested in.
>>>
>>> There does seem to be an outstanding defect that might be similar to
> what
>>> you are looking for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=101404
>>> You might want to state your exact needs in a bugzilla or add to the one
> I
>>> just mentioned and it will be looked into.
>>>
>>> - James.
>>>
>>>
>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>> news:f785au$g6s$1@build.eclipse.org...
>>>> Jose,
>>>>
>>>> Probably it's best to start with the UML newsgroup with this question,
>>>> so I've added that to the "to" list of my reply. I'm not sure what it
>>>> does with arbitrary stereotypes, but I think it throws them away. The
>>>> closest equivalent concept in Ecore would be an EAnnotation, so you
>>>> might need to use that.
>>>>
>>>>
>>>> Jose wrote:
>>>>> Hi,
>>>>>
>>>>> How can I generate code with EMF from a UML Diagram that uses
>>>>> stereotypes? With OCL? EAnnotation from EMF?
>>>>> What have I to do for not lost the stereotypes and generate code
>>>>> correctly?
>>>>>
>>>>> Thanks.
>>>>> (Sorry for my English).
>>>
>
>
Previous Topic:Interaction Messages
Next Topic:Package merge question
Goto Forum:
  


Current Time: Thu Mar 28 09:20:41 GMT 2024

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

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

Back to the top