We created a custom generator to produce Java-based implementations of operations specified in OCLinEcore in the Ecore meta-model. To reuse the EcoreGenerator, we made a few minor adjustments that we would push upstream:
- Move the adapter registration to a separate protected method that can be overridden:
generator.getAdapterFactoryDescriptorRegistry().addDescriptor(
GenModelPackage.eNS_URI,
new GeneratorAdapterDescriptor(
getTypeMapper(),
getLineDelimiter()));
- Make
generator a protected field
- Optionally change
genModel to protected or add a getter
- Optionally move the
generator initialisation to a method
If there is interest, we can also provide the custom OCLinEcoreGenerator.
We created a custom generator to produce Java-based implementations of operations specified in OCLinEcore in the Ecore meta-model. To reuse the EcoreGenerator, we made a few minor adjustments that we would push upstream:
generatora protected fieldgenModelto protected or add a gettergeneratorinitialisation to a methodIf there is interest, we can also provide the custom
OCLinEcoreGenerator.