User documentation
If you want to find out how to convert your own EMF models to Scala code that is ready to be used in a Synchronization context, this page is for you.
Building the generator
The generator is build using sbt. To run it, it is recommend to generate an executable JAR first.
The following commands should get you started as quick as possible:
$ git clone --recurse-submodules https://git-st.inf.tu-dresden.de/cwerner/code_generator.git
$ cd code_generator
$ sbt assembly
The resulting JAR can than be found at /target/scala-2.12/CodeGenerator-assembly-X.Y.jar
(make
sure to substitute X.Y
with your version number). It may simply be invoked using the java -jar
command (see Running the generator for details).
Running the generator
Currently the generator is supposed to be run as a command line utility. It expects the path to an
ecore
model as required argument. All other parameters are optional.
You can call the generator like this: java -jar generator.jar [ARGS] ECORE
. The following
arguments are supported:
Argument | Long | Parameter | Meaning |
---|---|---|---|
|
|
<none> |
will exclude the generated |
|
|
OPATH |
will write the generated |
ECORE |
the path to the ecore XML-file which contains the model. |
Supported EMF features
Implemented
-
Generation of classes according to its
EAttributes
-
Traversal of inheritance hierarchies and generation of matching code (this does not include multiple inheritance yet)
-
Resolution of (containment) references as attributes
Not yet implemented
-
Re-use of methods with attached implementation in the generated code (currently all methods in the EMF will be discarded)
-
Generation of
final
attributes -
Resolution of inheritance hierarchies that utilize multiple inheritance
Known bugs
None yet.