Those working with Eclipse EMF Ecore models are familiar with the Ecore code generation editors and process:
* The Ecore model contains the model definition - packages, classifiers, structural features, operations, etc.
* The generator model contains additional information required for code generation - java package names, names of base classes, ...
* There are four "generation targets":
* Edit support
Nasdanika Ecore Code Generation extends the code generation concepts in the following ways:
* Allows users to select a sub-set of model elements for which to generate code.
* Generation targets can be contributed to the UI through the Eclipse extensions mechanism and a set of generation targets of interest is selected by a user at the generator model creation time.
* Code generator model
* Root element - keeps a list of EPackages included in the model and a list of generation targets.
* Model elements - reference Ecore model elements - packages, classifiers, ... Generator model elements keep track of element Ecore model elements selection and contain configuration elements for the model element.
* Generator target is an extension point which defines a name of the target and an implementation class which performs actual generation.
* The target generator class has a method which creates configuration elements contained in the generation model.
* The target generator also has a method selecting model elements supported by the target. Only model elements supported by at least one target are displayed in the tree view.
* Configuration elements are displayed in the tab view in the right bottom of the editor.
Please keep in mind that you need to install at least one generation target in order to use the editor! E.g. the Web UI Generation Target - https://marketplace.eclipse.org/content/web-ui-generation-target-nasdani....
It is recommended to tag generation target solutions in Eclipse Marketplace with nasdanika-codegen-ecore-target tag.