A first part presented the enhancement of the EMF Generation by EGF, with executable patterns and factory components. Jet remains the support of the EMF Generation but capabilities of Jet are extended with patterns; factory components enable to manage the generation orchestration and to build customized off-the-shelf EMF Generations. This second part continues to explain this enhancement with the notion of generation chain.
A generation chain defines, at a high level of description, a sequence of generations. The objectives of a generation chain are:
- to reduce the time to define a suite of generations,
- to work at an action semantic level, instead of at the implementation level, and to encapsulate the irrelevant details of generation.
The interest is:
- to reduce the complexity to define generations,
- to facilitate the maintenance,
- to manage large generations.
In the EMF Generation context, the user simply declares the EMF Generations to be applied: s/he selects a set of ecore models, sets the main generation features (e.g., plugin, base package names) and executes the generation chain. Before the execution, those features are translated into generation elements at the implementation level. Genmodels are automatically created with the management of the genmodel dependencies, and the management of the [workspace / platform / runtime] priority. Next, the genmodels can be modified at any time.
At the meta-level, the structure of a generation chain is extensible. This means that the EMF Generation can be enriched with other generation aspects, such as the Java doc.
A generation chain is translated on the fly into factory components, for instance to take into account that the model / edit / editor parts are generated or not. However, internally, those factory components can be customized to have a customized EMF Generation. During the translation, this customization is preserved.
This post and the previous one have shown how to enhance the EMF Generation:
- Improvement of the reusability with patterns,
- Ability to support team working,
- Ability to define generation orchestration,
- Ability to create and customize off-the-shelf EMF Generations,
- Definition at a high level of EMF Generations in order to facilitate the creation and maintenance of EMF Generation chains.
EGF is a generation framework and the EMF Generation represents a domain-specific generation for EGF. The interest was to assess EGF on a complex case. The other interest is to offer another operational development context of the EMF Generation but in the continuity of the current practice.
A video is available is here