Skip to content

mypsycho/ModIt

 
 

Repository files navigation

Mod-it

Github action status

Mod-it library provides an API to ease creations of EMF Models in XTend.

Rationale

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.

Content

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.

Getting started

Documentation and release can be access on related GH-Pages.

Contributing

  1. Fork it!

  2. Create your feature branch: git checkout -b my-new-feature

  3. Commit your changes: git commit -am 'Add some feature'

  4. Push to the branch: git push origin my-new-feature

  5. Submit a pull request.

About

Readable models in code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 51.8%
  • Xtend 47.8%
  • Other 0.4%