forked from tsaglam/JavaCodeEcorification
-
Notifications
You must be signed in to change notification settings - Fork 0
1. Ecore Model CodeGen
Timur Sağlam edited this page Feb 26, 2017
·
3 revisions
The class GenModelGenerator
allows creating GenModels with the method generate()
. The method takes a GeneratedEcoreMetamodel
as the parameter. A GenModelGenerator
can be initialized with default values and with custom
values. The values affect the GenModel configuration. The default values are:
complianceLevel = GenJDKLevel.JDK80_LITERAL;
importerID = "org.eclipse.emf.importer.ecore";
rootExtendsClass = "org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container";
xmlEncoding = "UTF-8";
The class ModelCodeGenerator
generates code from an existing GenModel
. To do this, one has to call generate(GenModel genModel)
with a valid GenModel as parameter. The class utilizes the class MonitorToLoggerAdapter
to feed the output stream of the code generation into a log4j logger. This allows to receive information about the generation process.