Changes
Page history
[Dev] Complete and update doc
authored
Jan 27, 2019
by
Rico Bergmann
This fills missing parts, adds additional hints and corrects outdated information.
Show whitespace changes
Inline
Side-by-side
asciidoc/Developer-documentation.asciidoc
View page @
3c79057d
...
...
@@ -28,7 +28,13 @@ overview of the Generator's architecture:
.The coarse-scale architecture of the Generator
image::architecture.png[width=90%, align=center, link={imagesdir}/architecture.png]
== The Scala _Abstract class representation_
NOTE: as the CLI part of the _Generator_ just means parsing the parameters and setting up the
configuration data for the _Generator_ accordingly, these steps are not discussed here any further.
Consult the corresponding Scaladoc and
link:/cwerner/code_generator/blob/master/src/main/scala/org/rosi_project/model_sync/generator/CLIGenerator.scala[source code]
for details.
== The Scala _Abstract class representation_ [[acr]]
The _Abstract class representation_ (ACR) is the hearth of the Generator. It forms the meta-model
for the code to generate and provides facilities to adapt model instances for different purposes.
...
...
@@ -98,12 +104,15 @@ cumbersome creation of the actual method statements is hidden within the class i
== Working with models
IMPORTANT: a general introduction should be added
The __Generator__'s goal is to transform a synchronization model into a _JAR_ file which may than
be loaded, displayed and modified by the _Synchronization UI_. In order to do so, the _Generator_
creates a `SModel` which is a simple abstraction of such a model. It contains all classes as
instances of the <<acr, ACR>>.
=== Incremental construction of `SModel` instances
Adding new classes to an `SModel` instance is pretty straightforward: its default implementation
(`SimpleSModel`) already provides a `addModelClass(clazz)` method.
(`SimpleSModel`) already provides a
n
`addModelClass(clazz)` method.
However one often encouters the issue of some kind of cyclic reference in a model, i.e. a class `C0`
referencing other classes `C1, ... Cn` which in turn keep references until one of these references
...
...
@@ -191,11 +200,10 @@ The necessary preparations will be carried out through the visitors mentioned in
modifications specific to synchronization. It is important to run the general visitor first to
ensure that all classes contain setter methods. These will than be augmented by the second visitor.
WARNING: The Synchronization demo also expects some configuration classes for the model (namely
`DisplayableModel` instances for the models as well as a `ModelSyncProvider`). These are currently
not generated automatically. Thus they need to be added to the JAR manually.
NOTE: Generating these classes is currently being worked on.
WARNING: In order to integrate models into the Synchronization demo, configuration classes are
necessary. The Generator does currently not create those, as they need application specific
knowledge. At some point in the future this information may supplied as
https://www.eclipse.org/atl/[ATL] files.
== Writing to the File system [[compilation]]
...
...
...
...