Home » Modeling » Epsilon » Best way to realize constraints in meta model
|
Re: Best way to realize constraints in meta model [message #1073461 is a reply to message #1073455] |
Wed, 24 July 2013 21:12 |
|
Hi Phil,
EVL should be fine for this. Off the top of my head, your constraint would look like this:
context Remove {
constraint PropertyXorElement {
check: self.elementToRemove.isDefined() xor self.propToRemove.isDefined()
message: self + " cannot remove both an element and a property"
}
}
Cheers,
Dimitris
|
|
| | | |
Re: Best way to realize constraints in meta model [message #1073805 is a reply to message #1073803] |
Thu, 25 July 2013 14:18 |
|
Hi Phil,
These errors come from EMF itself as your model doesn't seem to be conforming to the cardinalities specified in its metamodel (e.g. a VariationElement is required to have a Remove, a ConcreteProperty etc as the minimum cardinality of its respective references is 1). To make these errors go away I'd suggest that you set the cardinalities of these references to 0..1 instead.
Cheers,
Dimitris
|
|
| | | | | | | |
Re: Best way to realize constraints in meta model [message #1076144 is a reply to message #1076065] |
Tue, 30 July 2013 19:56 |
|
Hi Phil,
Your plugin.xml looks fine but unfortunately I'm not able to run the editor as I'm missing a couple of plugins (de.itemis.xtext.utils.gmf, de.itemis.xtext.utils.jface). Could you please try with a clean GMF editor to see whether it's the interplay with Xtext that's causing this problem?
Cheers,
Dimitris
|
|
| | |
Goto Forum:
Current Time: Thu Sep 19 20:32:36 GMT 2024
Powered by FUDForum. Page generated in 0.05064 seconds
|