Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » import an uml model into ecore file
import an uml model into ecore file [message #1694960] Sun, 10 May 2015 21:43 Go to next message
55 66 is currently offline 55 66Friend
Messages: 7
Registered: May 2015
Junior Member
I created an uml model with papyrus and tried to import it into an emf generated model, but the ecore file generated does not have the associations Crying or Very Sad
i think there is something missing with the associations in the model explorer like a property that i should add to the classes.
I attached a screenshot of an uml exemple with the model explorer.
index.php/fa/21766/0/
  • Attachment: 4.png
    (Size: 13.16KB, Downloaded 771 times)

[Updated on: Tue, 12 May 2015 06:33]

Report message to a moderator

Re: import an uml model into ecore file [message #1695030 is a reply to message #1694960] Mon, 11 May 2015 13:26 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1222
Registered: July 2009
Location: Canada
Senior Member

Hi,

Indeed, the image that you attach shows an association that owns both
of its ends. Because Ecore does not have an explicit model of
associations (EReferences may indicate their opposites), you need the
classes at one or both ends of the association to own the corresponding
property.

The tool that you show in the screenshot is not Papyrus, so I don't
know how to help with that. But in Papyrus, the Properties view makes
it easy to change the ownership of an association end. Select the
association and you will find a pick-list for each end that lets you
choose the Association or the Classifier as the owner (of course, an
association is a classifier, but whatever).

HTH,

Christian

On 2015-05-11 13:05:26 +0000, Selma Bns said:

> I created an uml model with papyrus and tried to import it into an emf
> generated model, but the ecore file generated does not have the
> associations :cry:
> i think there is something missing with the associations in the model
> explorer like a property that i should add to the classes.
> I attached a screenshot of an uml exemple with the model explorer.
> <image>
Re: import an uml model into ecore file [message #1695031 is a reply to message #1695030] Mon, 11 May 2015 13:28 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1222
Registered: July 2009
Location: Canada
Senior Member

Hmm, sorry, of course that's Papyrus. I just didn't recognize the
Windows UI ...

Christian


On 2015-05-11 13:26:55 +0000, Christian W. Damus said:

> Hi,
>
> Indeed, the image that you attach shows an association that owns both
> of its ends. Because Ecore does not have an explicit model of
> associations (EReferences may indicate their opposites), you need the
> classes at one or both ends of the association to own the corresponding
> property.
>
> The tool that you show in the screenshot is not Papyrus, so I don't
> know how to help with that. But in Papyrus, the Properties view makes
> it easy to change the ownership of an association end. Select the
> association and you will find a pick-list for each end that lets you
> choose the Association or the Classifier as the owner (of course, an
> association is a classifier, but whatever).
>
> HTH,
>
> Christian
>
> On 2015-05-11 13:05:26 +0000, Selma Bns said:
>
>> I created an uml model with papyrus and tried to import it into an emf
>> generated model, but the ecore file generated does not have the
>> associations :cry:
>> i think there is something missing with the associations in the model
>> explorer like a property that i should add to the classes.
>> I attached a screenshot of an uml exemple with the model explorer.
>> <image>
Re: import an uml model into ecore file [message #1695053 is a reply to message #1694960] Mon, 11 May 2015 15:43 Go to previous messageGo to next message
Cedric Dumoulin is currently offline Cedric DumoulinFriend
Messages: 50
Registered: July 2009
Member
Selma Bns a écrit :
> I created an uml model with papyrus and tried to import it into an emf generated model, but the ecore file generated does not have the associations :cry:
> i think there is something missing with the associations in the model explorer like a property that i should add to the classes.
> I attached a screenshot of an uml exemple with the model explorer.
>
Hi,

Your classes should own the ends of the association.
- Select the association
- Open the Properties view
- Select the UML tab
- Locate the 'Member End' you want to change,
- Set 'Owner' to 'Classifier' on the end(s) you want to use in ECore.
Both end can be changed.

Hope this help,
Cedric
  • Attachment: memberEnd.png
    (Size: 12.94KB, Downloaded 127 times)
Re: import an uml model into ecore file [message #1695110 is a reply to message #1695053] Tue, 12 May 2015 06:54 Go to previous message
55 66 is currently offline 55 66Friend
Messages: 7
Registered: May 2015
Junior Member
Thank you so much Very Happy this solution worked for me.
Previous Topic:newbee: How to locate an element in the model explorer(
Next Topic:Java Code Generator fails
Goto Forum:
  


Current Time: Fri Dec 04 00:08:49 GMT 2020

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

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

Back to the top