Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF diagram editor cardinalities issue(only one cardinality)
icon5.gif  EMF diagram editor cardinalities issue [message #1029182] Fri, 29 March 2013 09:11 Go to next message
sams good is currently offline sams goodFriend
Messages: 11
Registered: March 2013
Junior Member
Hi,
I'm trying to draw an ecore meta-model diagram (.ecordiag) using EMF editor.
I'm wondering why in associations and aggregations there is only one cardinality instead of two ?
thank you .
Re: EMF diagram editor cardinalities issue [message #1029347 is a reply to message #1029182] Fri, 29 March 2013 14:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Which particular case do you mean? If it's 1..1 we only show one, but
for 0..* I'd expect to see two. In general, if the upper and lower
bound are the same, it only shows it once.


On 29/03/2013 8:56 AM, sams good wrote:
> Hi,
> I'm trying to draw an ecore meta-model diagram (.ecordiag) using EMF
> editor.
> I'm wondering why in associations and aggregations there is only one
> cardinality instead of two ?
> thank you .


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF diagram editor cardinalities issue [message #1029381 is a reply to message #1029347] Fri, 29 March 2013 15:53 Go to previous messageGo to next message
sams good is currently offline sams goodFriend
Messages: 11
Registered: March 2013
Junior Member
thank you for your reply,
not really, I'm trying to apply the example of Family To Person and when I try to draw for exemple the first aggregation from left, between Family and Person (familyDaughter to daughters 0..1 to 0..*) it only shows the first one (0..1) and not (0..*), whatever the cardinality values. it doesnt allow you to add a second cardinality, in this case the 0..* one.
http://wiki.eclipse.org/images/2/26/FamiliesMetamodel.jpg
am I missing something ??
thank you.
Re: EMF diagram editor cardinalities issue [message #1029392 is a reply to message #1029381] Fri, 29 March 2013 16:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is definitely for an Ecore model, not UML? What does the
properties view for the reference show? You should always be able to
edit both the upper and lower bound via the properties...

On 29/03/2013 11:53 AM, sams good wrote:
> thank you for your reply,
> not really, I'm trying to apply the example of
> http://wiki.eclipse.org/ATL/Tutorials_-_Create_a_simple_ATL_transformation
> and when I try to draw for exemple the first aggregation from left,
> between Family and Person (familyDaughter to daughters 0..1 to 0..*)
> it only shows the first one (0..1) and not (0..*), whatever the
> cardinality values. it doesnt allow you to add a second cardinality,
> in this case the 0..* one.
>
> am I missing something ??
> thank you.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF diagram editor cardinalities issue [message #1029397 is a reply to message #1029392] Fri, 29 March 2013 16:24 Go to previous messageGo to next message
sams good is currently offline sams goodFriend
Messages: 11
Registered: March 2013
Junior Member
yes its an ecore diagram (*.ecore_diagram).
here is a snapshot in attachments
index.php/fa/14192/0/
but what's confusing me is why in ecore diagrams there is only one cardinality by association??
  • Attachment: Capture.JPG
    (Size: 61.65KB, Downloaded 905 times)
Re: EMF diagram editor cardinalities issue [message #1029632 is a reply to message #1029397] Sat, 30 March 2013 00:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Because they're not associations, they're references and references are
only in one direction. You'd have to create two references related via
EReference.eOpposite to form a bidirectional reference, each with its
own multiplicity.


On 29/03/2013 12:24 PM, sams good wrote:
> yes its an ecore diagram (*.ecore_diagram).
> here is a snapshot in attachments
>
> but what's confusing me is why in ecore diagrams there is only one cardinality by association??


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF diagram editor cardinalities issue [message #1029826 is a reply to message #1029632] Sat, 30 March 2013 07:32 Go to previous message
sams good is currently offline sams goodFriend
Messages: 11
Registered: March 2013
Junior Member
thank you so much for the answer, its all clear to me now Smile
Previous Topic:EMFStore Branching support
Next Topic:[Texo] Resolve proxies
Goto Forum:
  


Current Time: Fri Mar 29 14:32:18 GMT 2024

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

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

Back to the top