When embedding models into code (mostly for tests), developers usually struggles with 2 strategies:
-
Using resource source and weighing the project with
-
Hard-to-read/edit/merge content
-
Very repetitive
-
Stale version
-
-
Using code and undergo
-
Unfriendly EMF syntax
-
Sequential descriptions of hierarchical elements
-
declare-before-reference constraints
-
This library frees developers of tedious EMF factory syntax making model description similar to a JSon file with compilation check. It also suppresses the constraint of sequential code by providing a registry mechanism and resolving references in an assembling phase.
Using such syntax helps to:
-
Speed up the creation of tests,
-
Improve the readability of the tests,
-
Improve maintainability when the tested meta-model changes
-
Ease the creation of interconnected models
It has been created and used in industrial projects to ease the creation input for JUnit tests on the meta-model and business rules.
It comes with various features:
-
EModit: EMF model factory API.
-
EReversIt generates Xtend sources from existing models providing:
-
Efficient tool to convert existing project resource,
-
Round-trips for manual tests to automatic test process.
-
-
EMF Resource factory extension provides dynamic content as an EMF Resource.
-
Using plugin URI ending with '.modit', you can target class creating EMF models.
-
-
EMF Sirius integration to write Sirius model in textual mode and lambda in XTend (avoiding text|not-compiled queries).
-
SiriusReverseIt can generated classes from an existing ODesign.
-
-
EMF enrichment where user can associate properties and lambda to meta-model and providing pseudo multi-inheritance for EObject.
-
i18n classes to use Xtend template instead of properties syntax.
Documentation and release can be access on related GH-Pages.
-
Fork it!
-
Create your feature branch:
git checkout -b my-new-feature
-
Commit your changes:
git commit -am 'Add some feature'
-
Push to the branch:
git push origin my-new-feature
-
Submit a pull request.