eclipsemodelmdaeclipse-emfeclipse-emf-ecore

Ecore, genmodel and OCL


I am defining the meta model of a domain specific modeling language by means of Ecore in EMF. I therefore generate an editor from the related genmodel I can use to create models conform to the meta-model. I would like to specify some OCL constraint on the values that some elements of the meta-model can assume. It would be very nice if I could specify these constraint in the Ecore model and have the related checks automatically generated editor Java code.

Is there a standard way to do that?


Solution

  • You should have a look at the recent work of the OCL project in Eclipse with "OCL in Ecore" or you could try one of the other way to integrate OCL with Ecore specified in the OCL Juno documentation.