Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Xor Constraint with EMF
Xor Constraint with EMF [message #1070822] Thu, 18 July 2013 19:00 Go to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
Hi,

what's the best way to realize a UML XOR constraint with EMF. The following model gives you an idea what I mean:

index.php/fa/15638/0/

Cheers,
Phil
  • Attachment: xor_emf.JPG
    (Size: 36.42KB, Downloaded 375 times)
Re: Xor Constraint with EMF [message #1070850 is a reply to message #1070822] Thu, 18 July 2013 20:22 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Phil,

The only way in the core framework is to define a constraint:

http://help.eclipse.org/kepler/index.jsp?topic=/org.eclipse.emf.doc/references/overview/EMF.Validation.html

This case could be handled as an invariant that tests that at most one
of the two features is non-null. Or it could be done as a named
constraint on the Remove EClass that tests the same thing.


On 18/07/2013 9:00 PM, Phil H wrote:
> Hi,
>
> what's the best way to realize a UML XOR constraint with EMF. The following model gives you an idea what I mean:
>
>
>
> Cheers,
> Phil


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:XSD to Ecore: Prevent generation of w3 schemas
Next Topic:Drag'n drop (or cut & paste) programmatically
Goto Forum:
  


Current Time: Thu Apr 25 01:32:06 GMT 2024

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

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

Back to the top