The Model Development Kit for Kermeta contains various kind of codes that work with Ecore models: some helper classes and some transformations.
Tip | |
---|---|
To use them you simply have to add the corresponding require statement to your kermeta code. Then, the outline and the KermetaDoc views should help you to use its content. |
Ecore MDK available files
Currently, the MDK provides the following files :
require "http://www.eclipse.org/emf/2002/Ecore"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/ecore_behavior.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/helpers/EcoreHelper.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/helpers/EPackageHelper.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/transformations/Patterns4Ecore.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/transformations/ContainmentBasedActionPerformerGenerator.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/transformations/CleanEcoreKMAnnotations.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/ecore2dot/ecore2dot.kmt"
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/persistence/EcoreResource.kmt"
Kermeta Ecore MDK main part consist of the implementation of Ecore behavior in kermeta. Almost all operations and derived properties are available.
To use it, you simply have to add this require statement to your kermeta code :
require "platform:/plugin/fr.irisa.triskell.kermeta.ecore/src/kermeta/ecore_behavior.kmt"
Note | |
---|---|
In the current implementation of the derived properties with a multiplicity greater than 1, you'll get a new collection with the desired content. However, even if you can modify the elements themselves, these collections aren't the real container of the elements, if you modify it (adding or removing elements) the real attributes (from which the derived properties are calculated) won't be changed. |