Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Building UML2-approximated Model in EMF
Re: Building UML2-approximated Model in EMF [message #477831] Wed, 15 October 2008 20:22 Go to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Timothy,

All of this is implemented by the UML2 project in a layer on top of the
EMF run-time and code-generation components.

The UML2 project defines a custom EList mini-framework, in the
org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
subsets. See, for example, the SubsetSupersetEObjectEList and
DerivedUnionEObjectEList classes.

For redefinitions, there are two cases. In the case that the redefining
property has has a different name than all of the redefined properties,
UML2's conversion to Ecore can create a corresponding EStructuralFeature
in the specializing EClass. This EStructuralFeature is decorated with
an EAnnotation that references the EStructuralFeatures corresponding to
the redefined properties.

In the case that the redefining property does have the same name as any
of the redefined properties, UML2 cannot create a corresponding
EStructuralFeature in the specializing EClass. Instead, it creates an
EAnnotation and adds the EStructuralFeature to it, in its contents list.
The annotation referencing the redefined features is as in the first
case.

I think I got this right ... I am including the UML2 newsgroup in my
reply for their input.

Cheers,

Christian

Timothy Marc wrote:
> Hi all,
>
> i've a question concerning the generation of an Ecore model from an UML
> model. How are features like Subsets and Union realized during the
> converting mechanism from UML to Ecore?
> Here is a concrete scenario:
>
> In my department, i have to adopt a complete UML Class model, defined in
> MagicDraw with subsets, unions and redefinitions, and have to create an
> EMF-Model out of it. MagicDraw provides a good exporter to EMF, that's not
> the problem. But how are the subsets and union features are treated during
> the process of converting it to an Ecore and generating an genmodel and of
> course the sources. I hoped, that the converte would produce something
> similiar to the UML2-API for my specific metamodel.
>
> In the wonderful article from Ken Hussey
> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is explained,
> that EMF doesn't support these concepts. However, fro the UML2-Project, it
> seems, that the subsets/union-things are working. Currently, i'm a bit
> confusing of the topic.
>
> Thx
> Timothy
>
>
Re: Building UML2-approximated Model in EMF [message #477834 is a reply to message #477831] Thu, 16 October 2008 11:28 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear Christian,

so the EMF code generator ignores all the UML2 special things, when it
converts my model, that make use of these concepts, into an Ecore model? Is
this right?
But i need those crucial functionality, and i guess, that it is possible to
reuse the UML2 code generator instead of the EMF default one in some way?
Does anyone has some experiences with this?

Thx
Timothy


"Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
news:gd5jdv$79p$1@build.eclipse.org...
> Hi, Timothy,
>
> All of this is implemented by the UML2 project in a layer on top of the
> EMF run-time and code-generation components.
>
> The UML2 project defines a custom EList mini-framework, in the
> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
> subsets. See, for example, the SubsetSupersetEObjectEList and
> DerivedUnionEObjectEList classes.
>
> For redefinitions, there are two cases. In the case that the redefining
> property has has a different name than all of the redefined properties,
> UML2's conversion to Ecore can create a corresponding EStructuralFeature
> in the specializing EClass. This EStructuralFeature is decorated with an
> EAnnotation that references the EStructuralFeatures corresponding to the
> redefined properties.
>
> In the case that the redefining property does have the same name as any of
> the redefined properties, UML2 cannot create a corresponding
> EStructuralFeature in the specializing EClass. Instead, it creates an
> EAnnotation and adds the EStructuralFeature to it, in its contents list.
> The annotation referencing the redefined features is as in the first case.
>
> I think I got this right ... I am including the UML2 newsgroup in my reply
> for their input.
>
> Cheers,
>
> Christian
>
> Timothy Marc wrote:
>> Hi all,
>>
>> i've a question concerning the generation of an Ecore model from an UML
>> model. How are features like Subsets and Union realized during the
>> converting mechanism from UML to Ecore?
>> Here is a concrete scenario:
>>
>> In my department, i have to adopt a complete UML Class model, defined in
>> MagicDraw with subsets, unions and redefinitions, and have to create an
>> EMF-Model out of it. MagicDraw provides a good exporter to EMF, that's
>> not the problem. But how are the subsets and union features are treated
>> during the process of converting it to an Ecore and generating an
>> genmodel and of course the sources. I hoped, that the converte would
>> produce something similiar to the UML2-API for my specific metamodel.
>>
>> In the wonderful article from Ken Hussey
>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is explained,
>> that EMF doesn't support these concepts. However, fro the UML2-Project,
>> it seems, that the subsets/union-things are working. Currently, i'm a bit
>> confusing of the topic.
>>
>> Thx
>> Timothy
Re: Building UML2-approximated Model in EMF [message #477835 is a reply to message #477834] Thu, 16 October 2008 13:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Timothy,

That's right, it is the templates provided by UML2-n codegen extensions
that have the knowledge of these custom run-time bits. It wouldn't make
sense for EMF to have dependencies on UML-isms.

You will need to use the UML2 code generation instead of EMF. It should
be re-usable in your context in the same way as EMF's code generator,
though I wouldn't know the details of that ...

Cheers,

Christian


Timothy Marc wrote:
> Dear Christian,
>
> so the EMF code generator ignores all the UML2 special things, when it
> converts my model, that make use of these concepts, into an Ecore model? Is
> this right?
> But i need those crucial functionality, and i guess, that it is possible to
> reuse the UML2 code generator instead of the EMF default one in some way?
> Does anyone has some experiences with this?
>
> Thx
> Timothy
>
>
> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
> news:gd5jdv$79p$1@build.eclipse.org...
>> Hi, Timothy,
>>
>> All of this is implemented by the UML2 project in a layer on top of the
>> EMF run-time and code-generation components.
>>
>> The UML2 project defines a custom EList mini-framework, in the
>> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
>> subsets. See, for example, the SubsetSupersetEObjectEList and
>> DerivedUnionEObjectEList classes.
>>
>> For redefinitions, there are two cases. In the case that the redefining
>> property has has a different name than all of the redefined properties,
>> UML2's conversion to Ecore can create a corresponding EStructuralFeature
>> in the specializing EClass. This EStructuralFeature is decorated with an
>> EAnnotation that references the EStructuralFeatures corresponding to the
>> redefined properties.
>>
>> In the case that the redefining property does have the same name as any of
>> the redefined properties, UML2 cannot create a corresponding
>> EStructuralFeature in the specializing EClass. Instead, it creates an
>> EAnnotation and adds the EStructuralFeature to it, in its contents list.
>> The annotation referencing the redefined features is as in the first case.
>>
>> I think I got this right ... I am including the UML2 newsgroup in my reply
>> for their input.
>>
>> Cheers,
>>
>> Christian
>>
>> Timothy Marc wrote:
>>> Hi all,
>>>
>>> i've a question concerning the generation of an Ecore model from an UML
>>> model. How are features like Subsets and Union realized during the
>>> converting mechanism from UML to Ecore?
>>> Here is a concrete scenario:
>>>
>>> In my department, i have to adopt a complete UML Class model, defined in
>>> MagicDraw with subsets, unions and redefinitions, and have to create an
>>> EMF-Model out of it. MagicDraw provides a good exporter to EMF, that's
>>> not the problem. But how are the subsets and union features are treated
>>> during the process of converting it to an Ecore and generating an
>>> genmodel and of course the sources. I hoped, that the converte would
>>> produce something similiar to the UML2-API for my specific metamodel.
>>>
>>> In the wonderful article from Ken Hussey
>>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is explained,
>>> that EMF doesn't support these concepts. However, fro the UML2-Project,
>>> it seems, that the subsets/union-things are working. Currently, i'm a bit
>>> confusing of the topic.
>>>
>>> Thx
>>> Timothy
>
>
Re: Building UML2-approximated Model in EMF [message #477838 is a reply to message #477835] Thu, 16 October 2008 15:18 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hey,

it is me again.

Now, i'm really confused because it seems, that the generation of these UML
concepts work. I've created an EMF Project, pointed to the UML model and
generated an genmodel out of that. The resulting Ecore model provides all
the union, subsets as EAnnotations. After generating the code, i found that
EReferences that subsets another one, return a SubsetSupersetEList.

I've tested it with a little JUnit Test, and it seems to work fine....
however?!

Timothy


"Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
news:gd7eer$t3u$1@build.eclipse.org...
> Hi, Timothy,
>
> That's right, it is the templates provided by UML2-n codegen extensions
> that have the knowledge of these custom run-time bits. It wouldn't make
> sense for EMF to have dependencies on UML-isms.
>
> You will need to use the UML2 code generation instead of EMF. It should
> be re-usable in your context in the same way as EMF's code generator,
> though I wouldn't know the details of that ...
>
> Cheers,
>
> Christian
>
>
> Timothy Marc wrote:
>> Dear Christian,
>>
>> so the EMF code generator ignores all the UML2 special things, when it
>> converts my model, that make use of these concepts, into an Ecore model?
>> Is this right?
>> But i need those crucial functionality, and i guess, that it is possible
>> to reuse the UML2 code generator instead of the EMF default one in some
>> way? Does anyone has some experiences with this?
>>
>> Thx
>> Timothy
>>
>>
>> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
>> news:gd5jdv$79p$1@build.eclipse.org...
>>> Hi, Timothy,
>>>
>>> All of this is implemented by the UML2 project in a layer on top of the
>>> EMF run-time and code-generation components.
>>>
>>> The UML2 project defines a custom EList mini-framework, in the
>>> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
>>> subsets. See, for example, the SubsetSupersetEObjectEList and
>>> DerivedUnionEObjectEList classes.
>>>
>>> For redefinitions, there are two cases. In the case that the redefining
>>> property has has a different name than all of the redefined properties,
>>> UML2's conversion to Ecore can create a corresponding EStructuralFeature
>>> in the specializing EClass. This EStructuralFeature is decorated with
>>> an EAnnotation that references the EStructuralFeatures corresponding to
>>> the redefined properties.
>>>
>>> In the case that the redefining property does have the same name as any
>>> of the redefined properties, UML2 cannot create a corresponding
>>> EStructuralFeature in the specializing EClass. Instead, it creates an
>>> EAnnotation and adds the EStructuralFeature to it, in its contents list.
>>> The annotation referencing the redefined features is as in the first
>>> case.
>>>
>>> I think I got this right ... I am including the UML2 newsgroup in my
>>> reply for their input.
>>>
>>> Cheers,
>>>
>>> Christian
>>>
>>> Timothy Marc wrote:
>>>> Hi all,
>>>>
>>>> i've a question concerning the generation of an Ecore model from an UML
>>>> model. How are features like Subsets and Union realized during the
>>>> converting mechanism from UML to Ecore?
>>>> Here is a concrete scenario:
>>>>
>>>> In my department, i have to adopt a complete UML Class model, defined
>>>> in MagicDraw with subsets, unions and redefinitions, and have to create
>>>> an EMF-Model out of it. MagicDraw provides a good exporter to EMF,
>>>> that's not the problem. But how are the subsets and union features are
>>>> treated during the process of converting it to an Ecore and generating
>>>> an genmodel and of course the sources. I hoped, that the converte would
>>>> produce something similiar to the UML2-API for my specific metamodel.
>>>>
>>>> In the wonderful article from Ken Hussey
>>>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is
>>>> explained, that EMF doesn't support these concepts. However, fro the
>>>> UML2-Project, it seems, that the subsets/union-things are working.
>>>> Currently, i'm a bit confusing of the topic.
>>>>
>>>> Thx
>>>> Timothy
>>
Re: Building UML2-approximated Model in EMF [message #477839 is a reply to message #477838] Thu, 16 October 2008 15:30 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Timothy,

That's because, when you imported your genmodel from UML, EMF discovered
the UML2 project's extensions to the code generation framework via the
registered UML model importer.

If you had first converted the UML model to Ecore and then imported your
genmodel from that using the Ecore importer, then you would have gotten
the default Ecore code generation.

Cheers,

Christian

Timothy Marc wrote:
> Hey,
>
> it is me again.
>
> Now, i'm really confused because it seems, that the generation of these UML
> concepts work. I've created an EMF Project, pointed to the UML model and
> generated an genmodel out of that. The resulting Ecore model provides all
> the union, subsets as EAnnotations. After generating the code, i found that
> EReferences that subsets another one, return a SubsetSupersetEList.
>
> I've tested it with a little JUnit Test, and it seems to work fine....
> however?!
>
> Timothy
>
>
> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
> news:gd7eer$t3u$1@build.eclipse.org...
>> Hi, Timothy,
>>
>> That's right, it is the templates provided by UML2-n codegen extensions
>> that have the knowledge of these custom run-time bits. It wouldn't make
>> sense for EMF to have dependencies on UML-isms.
>>
>> You will need to use the UML2 code generation instead of EMF. It should
>> be re-usable in your context in the same way as EMF's code generator,
>> though I wouldn't know the details of that ...
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Timothy Marc wrote:
>>> Dear Christian,
>>>
>>> so the EMF code generator ignores all the UML2 special things, when it
>>> converts my model, that make use of these concepts, into an Ecore model?
>>> Is this right?
>>> But i need those crucial functionality, and i guess, that it is possible
>>> to reuse the UML2 code generator instead of the EMF default one in some
>>> way? Does anyone has some experiences with this?
>>>
>>> Thx
>>> Timothy
>>>
>>>
>>> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
>>> news:gd5jdv$79p$1@build.eclipse.org...
>>>> Hi, Timothy,
>>>>
>>>> All of this is implemented by the UML2 project in a layer on top of the
>>>> EMF run-time and code-generation components.
>>>>
>>>> The UML2 project defines a custom EList mini-framework, in the
>>>> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
>>>> subsets. See, for example, the SubsetSupersetEObjectEList and
>>>> DerivedUnionEObjectEList classes.
>>>>
>>>> For redefinitions, there are two cases. In the case that the redefining
>>>> property has has a different name than all of the redefined properties,
>>>> UML2's conversion to Ecore can create a corresponding EStructuralFeature
>>>> in the specializing EClass. This EStructuralFeature is decorated with
>>>> an EAnnotation that references the EStructuralFeatures corresponding to
>>>> the redefined properties.
>>>>
>>>> In the case that the redefining property does have the same name as any
>>>> of the redefined properties, UML2 cannot create a corresponding
>>>> EStructuralFeature in the specializing EClass. Instead, it creates an
>>>> EAnnotation and adds the EStructuralFeature to it, in its contents list.
>>>> The annotation referencing the redefined features is as in the first
>>>> case.
>>>>
>>>> I think I got this right ... I am including the UML2 newsgroup in my
>>>> reply for their input.
>>>>
>>>> Cheers,
>>>>
>>>> Christian
>>>>
>>>> Timothy Marc wrote:
>>>>> Hi all,
>>>>>
>>>>> i've a question concerning the generation of an Ecore model from an UML
>>>>> model. How are features like Subsets and Union realized during the
>>>>> converting mechanism from UML to Ecore?
>>>>> Here is a concrete scenario:
>>>>>
>>>>> In my department, i have to adopt a complete UML Class model, defined
>>>>> in MagicDraw with subsets, unions and redefinitions, and have to create
>>>>> an EMF-Model out of it. MagicDraw provides a good exporter to EMF,
>>>>> that's not the problem. But how are the subsets and union features are
>>>>> treated during the process of converting it to an Ecore and generating
>>>>> an genmodel and of course the sources. I hoped, that the converte would
>>>>> produce something similiar to the UML2-API for my specific metamodel.
>>>>>
>>>>> In the wonderful article from Ken Hussey
>>>>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is
>>>>> explained, that EMF doesn't support these concepts. However, fro the
>>>>> UML2-Project, it seems, that the subsets/union-things are working.
>>>>> Currently, i'm a bit confusing of the topic.
>>>>>
>>>>> Thx
>>>>> Timothy
>
Re: Building UML2-approximated Model in EMF [message #627039 is a reply to message #477831] Thu, 16 October 2008 11:28 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Dear Christian,

so the EMF code generator ignores all the UML2 special things, when it
converts my model, that make use of these concepts, into an Ecore model? Is
this right?
But i need those crucial functionality, and i guess, that it is possible to
reuse the UML2 code generator instead of the EMF default one in some way?
Does anyone has some experiences with this?

Thx
Timothy


"Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
news:gd5jdv$79p$1@build.eclipse.org...
> Hi, Timothy,
>
> All of this is implemented by the UML2 project in a layer on top of the
> EMF run-time and code-generation components.
>
> The UML2 project defines a custom EList mini-framework, in the
> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
> subsets. See, for example, the SubsetSupersetEObjectEList and
> DerivedUnionEObjectEList classes.
>
> For redefinitions, there are two cases. In the case that the redefining
> property has has a different name than all of the redefined properties,
> UML2's conversion to Ecore can create a corresponding EStructuralFeature
> in the specializing EClass. This EStructuralFeature is decorated with an
> EAnnotation that references the EStructuralFeatures corresponding to the
> redefined properties.
>
> In the case that the redefining property does have the same name as any of
> the redefined properties, UML2 cannot create a corresponding
> EStructuralFeature in the specializing EClass. Instead, it creates an
> EAnnotation and adds the EStructuralFeature to it, in its contents list.
> The annotation referencing the redefined features is as in the first case.
>
> I think I got this right ... I am including the UML2 newsgroup in my reply
> for their input.
>
> Cheers,
>
> Christian
>
> Timothy Marc wrote:
>> Hi all,
>>
>> i've a question concerning the generation of an Ecore model from an UML
>> model. How are features like Subsets and Union realized during the
>> converting mechanism from UML to Ecore?
>> Here is a concrete scenario:
>>
>> In my department, i have to adopt a complete UML Class model, defined in
>> MagicDraw with subsets, unions and redefinitions, and have to create an
>> EMF-Model out of it. MagicDraw provides a good exporter to EMF, that's
>> not the problem. But how are the subsets and union features are treated
>> during the process of converting it to an Ecore and generating an
>> genmodel and of course the sources. I hoped, that the converte would
>> produce something similiar to the UML2-API for my specific metamodel.
>>
>> In the wonderful article from Ken Hussey
>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is explained,
>> that EMF doesn't support these concepts. However, fro the UML2-Project,
>> it seems, that the subsets/union-things are working. Currently, i'm a bit
>> confusing of the topic.
>>
>> Thx
>> Timothy
Re: Building UML2-approximated Model in EMF [message #627040 is a reply to message #477834] Thu, 16 October 2008 13:09 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Timothy,

That's right, it is the templates provided by UML2-n codegen extensions
that have the knowledge of these custom run-time bits. It wouldn't make
sense for EMF to have dependencies on UML-isms.

You will need to use the UML2 code generation instead of EMF. It should
be re-usable in your context in the same way as EMF's code generator,
though I wouldn't know the details of that ...

Cheers,

Christian


Timothy Marc wrote:
> Dear Christian,
>
> so the EMF code generator ignores all the UML2 special things, when it
> converts my model, that make use of these concepts, into an Ecore model? Is
> this right?
> But i need those crucial functionality, and i guess, that it is possible to
> reuse the UML2 code generator instead of the EMF default one in some way?
> Does anyone has some experiences with this?
>
> Thx
> Timothy
>
>
> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
> news:gd5jdv$79p$1@build.eclipse.org...
>> Hi, Timothy,
>>
>> All of this is implemented by the UML2 project in a layer on top of the
>> EMF run-time and code-generation components.
>>
>> The UML2 project defines a custom EList mini-framework, in the
>> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
>> subsets. See, for example, the SubsetSupersetEObjectEList and
>> DerivedUnionEObjectEList classes.
>>
>> For redefinitions, there are two cases. In the case that the redefining
>> property has has a different name than all of the redefined properties,
>> UML2's conversion to Ecore can create a corresponding EStructuralFeature
>> in the specializing EClass. This EStructuralFeature is decorated with an
>> EAnnotation that references the EStructuralFeatures corresponding to the
>> redefined properties.
>>
>> In the case that the redefining property does have the same name as any of
>> the redefined properties, UML2 cannot create a corresponding
>> EStructuralFeature in the specializing EClass. Instead, it creates an
>> EAnnotation and adds the EStructuralFeature to it, in its contents list.
>> The annotation referencing the redefined features is as in the first case.
>>
>> I think I got this right ... I am including the UML2 newsgroup in my reply
>> for their input.
>>
>> Cheers,
>>
>> Christian
>>
>> Timothy Marc wrote:
>>> Hi all,
>>>
>>> i've a question concerning the generation of an Ecore model from an UML
>>> model. How are features like Subsets and Union realized during the
>>> converting mechanism from UML to Ecore?
>>> Here is a concrete scenario:
>>>
>>> In my department, i have to adopt a complete UML Class model, defined in
>>> MagicDraw with subsets, unions and redefinitions, and have to create an
>>> EMF-Model out of it. MagicDraw provides a good exporter to EMF, that's
>>> not the problem. But how are the subsets and union features are treated
>>> during the process of converting it to an Ecore and generating an
>>> genmodel and of course the sources. I hoped, that the converte would
>>> produce something similiar to the UML2-API for my specific metamodel.
>>>
>>> In the wonderful article from Ken Hussey
>>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is explained,
>>> that EMF doesn't support these concepts. However, fro the UML2-Project,
>>> it seems, that the subsets/union-things are working. Currently, i'm a bit
>>> confusing of the topic.
>>>
>>> Thx
>>> Timothy
>
>
Re: Building UML2-approximated Model in EMF [message #627043 is a reply to message #477835] Thu, 16 October 2008 15:18 Go to previous message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hey,

it is me again.

Now, i'm really confused because it seems, that the generation of these UML
concepts work. I've created an EMF Project, pointed to the UML model and
generated an genmodel out of that. The resulting Ecore model provides all
the union, subsets as EAnnotations. After generating the code, i found that
EReferences that subsets another one, return a SubsetSupersetEList.

I've tested it with a little JUnit Test, and it seems to work fine....
however?!

Timothy


"Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
news:gd7eer$t3u$1@build.eclipse.org...
> Hi, Timothy,
>
> That's right, it is the templates provided by UML2-n codegen extensions
> that have the knowledge of these custom run-time bits. It wouldn't make
> sense for EMF to have dependencies on UML-isms.
>
> You will need to use the UML2 code generation instead of EMF. It should
> be re-usable in your context in the same way as EMF's code generator,
> though I wouldn't know the details of that ...
>
> Cheers,
>
> Christian
>
>
> Timothy Marc wrote:
>> Dear Christian,
>>
>> so the EMF code generator ignores all the UML2 special things, when it
>> converts my model, that make use of these concepts, into an Ecore model?
>> Is this right?
>> But i need those crucial functionality, and i guess, that it is possible
>> to reuse the UML2 code generator instead of the EMF default one in some
>> way? Does anyone has some experiences with this?
>>
>> Thx
>> Timothy
>>
>>
>> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
>> news:gd5jdv$79p$1@build.eclipse.org...
>>> Hi, Timothy,
>>>
>>> All of this is implemented by the UML2 project in a layer on top of the
>>> EMF run-time and code-generation components.
>>>
>>> The UML2 project defines a custom EList mini-framework, in the
>>> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
>>> subsets. See, for example, the SubsetSupersetEObjectEList and
>>> DerivedUnionEObjectEList classes.
>>>
>>> For redefinitions, there are two cases. In the case that the redefining
>>> property has has a different name than all of the redefined properties,
>>> UML2's conversion to Ecore can create a corresponding EStructuralFeature
>>> in the specializing EClass. This EStructuralFeature is decorated with
>>> an EAnnotation that references the EStructuralFeatures corresponding to
>>> the redefined properties.
>>>
>>> In the case that the redefining property does have the same name as any
>>> of the redefined properties, UML2 cannot create a corresponding
>>> EStructuralFeature in the specializing EClass. Instead, it creates an
>>> EAnnotation and adds the EStructuralFeature to it, in its contents list.
>>> The annotation referencing the redefined features is as in the first
>>> case.
>>>
>>> I think I got this right ... I am including the UML2 newsgroup in my
>>> reply for their input.
>>>
>>> Cheers,
>>>
>>> Christian
>>>
>>> Timothy Marc wrote:
>>>> Hi all,
>>>>
>>>> i've a question concerning the generation of an Ecore model from an UML
>>>> model. How are features like Subsets and Union realized during the
>>>> converting mechanism from UML to Ecore?
>>>> Here is a concrete scenario:
>>>>
>>>> In my department, i have to adopt a complete UML Class model, defined
>>>> in MagicDraw with subsets, unions and redefinitions, and have to create
>>>> an EMF-Model out of it. MagicDraw provides a good exporter to EMF,
>>>> that's not the problem. But how are the subsets and union features are
>>>> treated during the process of converting it to an Ecore and generating
>>>> an genmodel and of course the sources. I hoped, that the converte would
>>>> produce something similiar to the UML2-API for my specific metamodel.
>>>>
>>>> In the wonderful article from Ken Hussey
>>>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is
>>>> explained, that EMF doesn't support these concepts. However, fro the
>>>> UML2-Project, it seems, that the subsets/union-things are working.
>>>> Currently, i'm a bit confusing of the topic.
>>>>
>>>> Thx
>>>> Timothy
>>
Re: Building UML2-approximated Model in EMF [message #627044 is a reply to message #477838] Thu, 16 October 2008 15:30 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Timothy,

That's because, when you imported your genmodel from UML, EMF discovered
the UML2 project's extensions to the code generation framework via the
registered UML model importer.

If you had first converted the UML model to Ecore and then imported your
genmodel from that using the Ecore importer, then you would have gotten
the default Ecore code generation.

Cheers,

Christian

Timothy Marc wrote:
> Hey,
>
> it is me again.
>
> Now, i'm really confused because it seems, that the generation of these UML
> concepts work. I've created an EMF Project, pointed to the UML model and
> generated an genmodel out of that. The resulting Ecore model provides all
> the union, subsets as EAnnotations. After generating the code, i found that
> EReferences that subsets another one, return a SubsetSupersetEList.
>
> I've tested it with a little JUnit Test, and it seems to work fine....
> however?!
>
> Timothy
>
>
> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
> news:gd7eer$t3u$1@build.eclipse.org...
>> Hi, Timothy,
>>
>> That's right, it is the templates provided by UML2-n codegen extensions
>> that have the knowledge of these custom run-time bits. It wouldn't make
>> sense for EMF to have dependencies on UML-isms.
>>
>> You will need to use the UML2 code generation instead of EMF. It should
>> be re-usable in your context in the same way as EMF's code generator,
>> though I wouldn't know the details of that ...
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Timothy Marc wrote:
>>> Dear Christian,
>>>
>>> so the EMF code generator ignores all the UML2 special things, when it
>>> converts my model, that make use of these concepts, into an Ecore model?
>>> Is this right?
>>> But i need those crucial functionality, and i guess, that it is possible
>>> to reuse the UML2 code generator instead of the EMF default one in some
>>> way? Does anyone has some experiences with this?
>>>
>>> Thx
>>> Timothy
>>>
>>>
>>> "Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
>>> news:gd5jdv$79p$1@build.eclipse.org...
>>>> Hi, Timothy,
>>>>
>>>> All of this is implemented by the UML2 project in a layer on top of the
>>>> EMF run-time and code-generation components.
>>>>
>>>> The UML2 project defines a custom EList mini-framework, in the
>>>> org.eclipse.uml2 plug-in, for subsetting, derived unions, and derived
>>>> subsets. See, for example, the SubsetSupersetEObjectEList and
>>>> DerivedUnionEObjectEList classes.
>>>>
>>>> For redefinitions, there are two cases. In the case that the redefining
>>>> property has has a different name than all of the redefined properties,
>>>> UML2's conversion to Ecore can create a corresponding EStructuralFeature
>>>> in the specializing EClass. This EStructuralFeature is decorated with
>>>> an EAnnotation that references the EStructuralFeatures corresponding to
>>>> the redefined properties.
>>>>
>>>> In the case that the redefining property does have the same name as any
>>>> of the redefined properties, UML2 cannot create a corresponding
>>>> EStructuralFeature in the specializing EClass. Instead, it creates an
>>>> EAnnotation and adds the EStructuralFeature to it, in its contents list.
>>>> The annotation referencing the redefined features is as in the first
>>>> case.
>>>>
>>>> I think I got this right ... I am including the UML2 newsgroup in my
>>>> reply for their input.
>>>>
>>>> Cheers,
>>>>
>>>> Christian
>>>>
>>>> Timothy Marc wrote:
>>>>> Hi all,
>>>>>
>>>>> i've a question concerning the generation of an Ecore model from an UML
>>>>> model. How are features like Subsets and Union realized during the
>>>>> converting mechanism from UML to Ecore?
>>>>> Here is a concrete scenario:
>>>>>
>>>>> In my department, i have to adopt a complete UML Class model, defined
>>>>> in MagicDraw with subsets, unions and redefinitions, and have to create
>>>>> an EMF-Model out of it. MagicDraw provides a good exporter to EMF,
>>>>> that's not the problem. But how are the subsets and union features are
>>>>> treated during the process of converting it to an Ecore and generating
>>>>> an genmodel and of course the sources. I hoped, that the converte would
>>>>> produce something similiar to the UML2-API for my specific metamodel.
>>>>>
>>>>> In the wonderful article from Ken Hussey
>>>>> https://bugs.eclipse.org/bugs/attachment.cgi?id=55337 there is
>>>>> explained, that EMF doesn't support these concepts. However, fro the
>>>>> UML2-Project, it seems, that the subsets/union-things are working.
>>>>> Currently, i'm a bit confusing of the topic.
>>>>>
>>>>> Thx
>>>>> Timothy
>
Previous Topic:Re: allOwnedElements() omits StructuredActivity's children
Next Topic:EMF Code generation from UML2 model fails
Goto Forum:
  


Current Time: Wed Apr 01 19:15:22 GMT 2020

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

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

Back to the top