Author: jcouteau Date: 2010-03-10 17:38:02 +0100 (Wed, 10 Mar 2010) New Revision: 849 Log: Add english translation Added: trunk/src/site/rst/01-introduction.rst trunk/src/site/rst/02-objectmodel.rst trunk/src/site/rst/03-generation.rst trunk/src/site/rst/04-templates.rst trunk/src/site/rst/05-execution.rst trunk/src/site/rst/06-fonctionnalites-avancees.rst trunk/src/site/rst/07-glossaire.rst trunk/src/site/rst/08-FAQ.rst trunk/src/site/rst/09-tutoriel-index.rst Modified: trunk/src/site/rst/index.rst trunk/src/site/site_en.xml Added: trunk/src/site/rst/01-introduction.rst =================================================================== --- trunk/src/site/rst/01-introduction.rst (rev 0) +++ trunk/src/site/rst/01-introduction.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,71 @@ +Introduction +============ + +:Authors: Julien Ruchaud, Florian Desbois, Jean Couteau +:Contact: eugene-devel@list.nuiton.org or eugene-users@list.nuiton.org +:Revision: $Revision: 833 $ +:Date: $Date: 2010-03-04 17:17:03 +0100 (jeu. 04 mars 2010) $ + +.. contents:: + +What is MDA (Model Driven Architecture) +--------------------------------------- + +EUGene is based on MDA technology. MDA's main principle is the software +development based on models. It consists in abstracting technical choices by +modeling the needs, and then transform this model according to the target +platform. One of many examples is java code generation from an UML model. + +To make models (M1), it is necessary to define a modeling language which is +called meta-model (M2). To make transformations between languages, it is +necessary to have in common a meta-language, which is called meta-meta-model +(M3). To do not have another language in top of the meta-meta-model, this one +needs to be self-descriptive, i.e. it is possible to write a meta-model +describing the meta-meta-model. The last level is the model application (M0) in +the real world. + +Here are some examples : + +M3 MOF Grammar UML +M2 UML Language Flying specific language +M1 Java Sentence Airport definition +M0 Objet Speech The airport + + +It exists two strategies in manipulating models : either defining +transformation rules from a meta-model to another, either by a template +representing the target model and manipulating the source model. + + +What is EUGene (Efficient Universal Generator) ? +------------------------------------------------ + +EUGene allows manipulating and generating models. It features : + + * reading UML class model in XMI independent from modeling. + * generation templates + * models transformation + * integration in project build + * independence in developer code and generated code + * independence from development tools + +Numerous solutions are available on the market, EUGene position itself, compared +to its competitors, as easy to use and to put into place, independent from +development tools and full-JAVA with no other language to learn. + +Comparison +---------- + +Comparison to other solutions existing on the market : + ++---------+----------------------+----------------------------+--------------+---------+--------+ +| | | | | | Output | +| | Generator | Independence | Build | Plugin | format | ++=========+======================+============================+==============+=========+========+ +| EUGene | java template | Development tools | Maven/Ant | Eclipse | All | ++---------+----------------------+----------------------------+--------------+---------+--------+ +| Acceleo | specific template | Linked to Eclipse platform | Not possible | Eclipse | All | ++---------+----------------------+----------------------------+--------------+---------+--------+ +| | Model transformation | | | | | +| ATL | in QVT | Linked to Eclipse platform | Not possible | Eclipse | Model | ++---------+----------------------+----------------------------+--------------+---------+--------+ Added: trunk/src/site/rst/02-objectmodel.rst =================================================================== --- trunk/src/site/rst/02-objectmodel.rst (rev 0) +++ trunk/src/site/rst/02-objectmodel.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,100 @@ +=========== +ObjectModel +=========== + +:Authors: Arnaud Thimel, Florian Desbois, Jean Couteau +:Contact: eugene-devel@list.nuiton.org or eugene-users@list.nuiton.org +:Revision: $Revision: 650 $ +:Date: $Date: 2009-10-21 15:22:32 +0200 (Wed, 21 Oct 2009) $ + +Note + This document does not take into account modifications made on EUGene 2.0 + version + +.. contents:: + +TODO : revoir cette documentation + +Introduction +============ + +ObjectModelGenerator generator is aimed to read and analyse object models and +generate code from them. In UML, an object model is represented by a class +diagram. This object models vision being wildly spread, it is +ObjectModelGenerator's basis (please note that this is not mandatory). + +Let start from the principle that we got a model (class diagram) created from +an XMI (XML Metadata Interchange format modeling tool. + +Code generation is made into three steps : + +- XMI purification into an XML code that keeps only useful information ; +- Simplified model put into memory ; +- Templates used / code generation. + +XMI model purification +====================== + +Most of the modelign tools describe their models using XMI, but XMI is too +verbose to be easily understood. + +Eugene uses XSLT transformation allowing to get a purified XML describing the +model and keeping the main information. + +This intermediate model insure EUGene's stability and durability as it is always +based on its own models and not external models (XMI) that changes too much from +a version to another. + +If we want to support a new XMI version, for example, we just need to create the +appropriate transformation stylesheet. + +Amongst the extracted information, we can name : + +- Objects (classes, abstract classes, interfaces) +- Attributes (names, type, visibility, ...) +- Relations between classes (all multiplicities, navigability, association classes, ...) +- Operations (name, return type, arguments name and type, thrown exceptions, ...) +- Stereotypes + +From the following diagram : + +.. image:: objectmodel/Hotel.png + +We got the following ObjectModel : + +.. image:: objectmodel/Hotel.objectmodel.png + + +Memory model +============ + +Once XMI has been changed into an understandable XML, the model is loaded into +memory so that it is generated. + +The instanciated model is based on the following class diagram (meta-model) : + +.. image:: objectmodel/ObjectModel.png + +Available interfaces for the generators are the following : + +.. image:: objectmodel/ObjectModel_Interfaces.png + +ObjectModelGenerator : + +.. image:: objectmodel/ObjectModel_Generator.png + +Templates application +===================== + +Each template is itself a generator inheriting from ObjectModelGenerator. All +the parts of this generator can be overloaded allowing a strong personalisation +of the generators. ObjectModelGenerator's aim is to navigate through the model +and on each key element of the model (model, classes, interfaces, classifier, +...) call the appropriate methods. By default, the methods described in the +generator are empty, so no code is generated. The templates are aimed to +overload those methods and describe the code that will be generated. + +The templates can be of all kind because they can generate a different file by +model, by interface, by class or even by classifier (common stub to classes and +interfaces). Moreover, they can generate every kind of code what so ever : Java, +XML, text, C++, ... Added: trunk/src/site/rst/03-generation.rst =================================================================== --- trunk/src/site/rst/03-generation.rst (rev 0) +++ trunk/src/site/rst/03-generation.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,102 @@ +Generation process +================== + +:Author: Florian Desbois, Jean Couteau +:Contact: eugene-devel@list.nuiton.org or eugene-users@list.nuiton.org +:Revision: $Revision: 828 $ +:Date: $Date: 2010-03-03 14:40:14 +0100 (mer. 03 mars 2010) $ + +Generation principle is split into three points : + +- Input files, representing a data model +- Generation process (templates, model transformers) +- Output files for a final application in the programming language wanted + + +EUGene uses UML modeling language (in XMI format) to read a data model, load it +into memory to manipulate it using Java and finally generate output files +adapted to a technology or a programming language. + +Two generation option : + +- `Simple generation`_ : generation template +- `Complete generation`_ : model reading + model transformer + simple generation + template (usually unique for the output language) + +We will also see the case of `Java generation`_ . + +Generation simple +----------------- + +EUGene needs one or more XMI files as input of the generation process. Those +files corresponds to the model to manipulate during generation. Those XMI files +will be converted in **.objectmodel** files easier to read to fill the +`ObjectModel`_ memory model. Since EUGene first versions, it is possible to +write generation templates to interpret the obtained ObjectModel's specificity +according to the desired output (whatever the language might be : java, xml, +php, C++, ...) + +In this generation case, the developer only needs to write one or more +generators (Generator) using a `simple syntax`_ interpreted by +`Nuiton-processor`_ . + +.. image:: schemas/03-generation-simple.png + +By default EUgene manipulate ObjectModel resulting from known file formats such +as zargo, zuml or xmi files (see `Writer`_ ). + +Complete generation +------------------- + +It is possible to use another file format than xmi or objectmodel as EUGene +input. In this case, it is necessary to convert this format to fill the memory +Objectmodel. It is then possible to use an appropiate `ModelReader`_. It is also +possible to use another model than the ObjectModel, StateModel for exemple (the +ModelReader used will then be StateModelReader). As seen previously, it is +possible to write genertors to interpret ObjectModel and convert it into files. +But it is also possible to use a model transformer that is behaving the same way +than a generator ; except that it does not end on files writing but on a new +model creation ready to be interpreted again by a generator. The transformer's +content is not a template anymore but model transformation : the conversion from +the input model interpreted by the ModelReader to an output model easier to +manipulate in another generator. this allows essentially to concentrate model's +interpretation by the transformers and use a basic generator specific to a +language for example. + +.. image:: schemas/03-generation-complete.png + +The ObjectModel can also be used as result model from the transformation without +necessarily contains model's specificity (UML norm) but more language's one +(Java for example). + +Java generation +--------------- + +We come to the practical case of Java code generation. Here the input model used +is ObjectModel with the default ObjectModelReader that will interpret the +.objectmodel files to fill in the memory ObjectModel. The developer will have to +create transformers inheriting from ObjectModelTransformerToJava to interpret +the input model (UML) to a new model close to Java language (still an +ObjectModel). The generator used is still the same, it is the JavaGenerator, +that will simply write the content of the Java specific model. + +.. image:: schemas/03-generation-java.png + +Tools can help adapt easily ObjectModel to the language wanted, like +`extensions`_ (for Java : ImportsManager, AnnotationManager, ...) and the +builder (for Java : JavaBuilder). + +Is is mainly advised to use Maven to `execute`_ generation using +`maven-eugene-plugin`_ . Plugin configuration allows to precise the different +generation elements (writer, reader, model, template, ...). + +.. _ObjectModel: 02-objectmodel.html +.. _simple syntax: 04-templates.html#Generator_writing_syntax +.. _Nuiton-processor: http://maven-site.nuiton.org/processor/nuiton-processor/index.html +.. _Writer: 06-fonctionnalites-avancees.html#Writer + +.. _ModelReader: 06-fonctionnalites-avancees.html#ModelReader + +.. _extensions: 06-fonctionnalites-avancees.html#Extension +.. _execute: 05-execution.html +.. _maven-eugene-plugin: ../maven-eugene-plugin/fr/index.html Added: trunk/src/site/rst/04-templates.rst =================================================================== --- trunk/src/site/rst/04-templates.rst (rev 0) +++ trunk/src/site/rst/04-templates.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,207 @@ +Templates +========= + +:Author: Florian Desbois, Jean Couteau +:Contact: eugene-devel@list.nuiton.org or eugene-users@list.nuiton.org +:Revision: $Revision: 833 $ +:Date: $Date: 2010-03-04 17:17:03 +0100 (jeu. 04 mars 2010) $ + +Like explained in the previous chapter (`Generation process`_ ), there are two +ways to generate files : + +- Use a Generator (template written in Java using Nuiton-processor) +- Use a Transformer (model transformation written in Java) + +EUGene consider Generators and Transformers like generation templates with in +common an input model. The different is the output, the Generator will write +files whereas Transformer will load another model of the same type or not. + +EUGene manipulate mainly the `ObjectModel`_ , so there is an Abstract for this +kind of model manipulation : ObjectModelGenerator and ObjectModelTransformer. + +Eugene implements also an easy solution for Java code generation. So a java +generator and a transformer are available : JavaGenerator and +ObjectModelTransformerToJava. + +Here is the resulting hierarchy : + +.. image:: schemas/04-templates-hierarchy.png + +We will start by describing the writing syntax of a Generator using +Nuiton-processor. Then we will describe Transformers' use to end with Java code +generation. + +.. contents:: + +Generator writing syntax +------------------------ + +To create a Generator, you first have to create a new class that inherit from +ObjectModelGenerator for generation from an ObjectModel's case. + +TODO + +Available Generators +~~~~~~~~~~~~~~~~~~~~ + +- `AbstractGenerator`_ : input to define +- `ObjectModelGenerator`_ : ObjectModel input +- `StateModelGenerator`_ : StateModel input +- `JavaGenerator`_ : Java oriented ObjectModel (with extensions) input + +Note + The maven plugin allows to know all the available transformers. + +Model transformation implementation +----------------------------------- + +As for Generators, Transformers work by inheritance. Everything depends on the +wanted model types in input and output. For an ObjectModel input, you have to +inherit from ObjectModelTransformer. + +The transformer steps are : + +- output initialisation +- transformer call before the actual transformation (useful for some chained + transformations) +- input model transformation +- call the output template with the transformed model as input. + +Transformer's input +~~~~~~~~~~~~~~~~~~~ + +Transformer's input is a Model. Usually, it is an ObjectModel but it is also +possible to use other kind of models (like StateModel for example). + +Transformer's output +~~~~~~~~~~~~~~~~~~~~ + +It is necessary to initialise the Transformer's output : + +- Output model : of what kind the output model is ? +- Output template : What is the template that will manipulate the output model ? + That can be a Generator or another Transformer. + +ObjectModelTransformer +~~~~~~~~~~~~~~~~~~~~~~ + +ObjectModelTransformer features a simple pattern to transform models elements. +All the ObjectModel will be run through and for each element type (Classifier, +Class, Interface, Enumeration) a method will do the transformation, the +developer will have to overload thos data to ease the transformation :: + + public void transformFromModel(ObjectModel model) { + } + + public void transformFromInterface(ObjectModelInterface interfacez) { + } + + public void transformFromClass(ObjectModelClass clazz) { + } + + public void transformFromClassifier(ObjectModelClassifier clazz) { + } + + public void transformFromEnumeration(ObjectModelEnumeration enumeration) { + } + +ObjectModelTransformer is abstract and need an inheritance to specify the kind +of model of the output (for Java code generation, it is also ObjectModel). + +ObjectModelBuilder +~~~~~~~~~~~~~~~~~~ + +`Ref ObjectModelBuilder`_ + +This tool allows to fill an ObjectModel from a Transformer, obviously in the +case the Transformer's output model is an ObjectModel. This class allows to ease +ObjectModel's writing, the interfaces of this model not having setters. + +Example of the available methods : + +- createClass : create an ObjectModelClass +- createInterface : create an ObjectModelInterface +- addOperation : add a method to an ObjectModelClassifier + (ObjectModelClass or ObjectModelInterface) +- addAttribute : add an attribute to an ObjectModelClassifier +- addParameter : add a parameter to an ObjectModelOperation +- ... + +Available Transformer +~~~~~~~~~~~~~~~~~~~~~ + +- `Transformer`_ : input and output to define +- `ObjectModelTransformer`_ : ObjectModel input, output to define +- `ObjectModelTransformerToJava`_ : ObjectModel input, ObjectModel output, + `JavaGenerator`_ as output template. + +Note + The maven plugin allows to know all the available transformers. + +Java generator +-------------- + +All the elements of the generation chain are available for a Java code +generation from an XMI data model (org.nuiton.eugen.java package) : + +- Output files : xmi, objectmodel, zargo, zuml +- input `Model`_ : ObjectModel +- output `Model`_ : Java oriented ObjectModel (with extensions) +- abstract `Transformer`_ : `ObjectModelTransformerToJava`_ +- output `Generator`_ : `JavaGenerator`_ + +For each kind of wanted generation, you just need to inherit from +ObjectModelTransformerToJava and use the transformFrom methods to record the +Java oriented ObjectModel that will be automatically generated via +JavaGenerator. The principle is to interpret the specificities of the input UML +model to transform them into Java according to the technical needs (technology, +framework, environment, ...). + +JavaBuilder +~~~~~~~~~~~ + +`Ref JavaBuilder`_ + +To simplify the Java oriented ObjectModel writing, JavaBuilder is used +transparently because ObjectModelTransformerToJava offering all its methods +directly (delegation). So, the transformation is made via the input model run +and those methods to load the output model. + +Methods examples : + +- createClass : create an ObjectModelClass +- createInterface : create an ObjectModelInterface +- addImport : Add an import to an ObjectModelClassifier +- addAnnotation : Add an annotation to an ObjectModelElement +- setSuperClass : Add a superclass to an ObjectModelClassifier (extends) with + automatic superclass type import added. +- addConstant : Add a constant (static final) to an ObjectModelClassifier +- addConstructor : Add a constructor to a class. +- ... + +Note + The imports management is done automatically on the types manipulated + (attribute, parameter, method return, interface, ... type). This management + uses the ImportsManagerExtension extension that manage an ImportsManager per + classifier. + +.. _Generation process: 03-generation.html +.. _ObjectModel: 02-objectmodel.html + +.. _AbstractGenerator: ../eugene/apidocs/org/nuiton/eugene/AbstractGenerator.html +.. _ObjectModelGenerator: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModelGenerator.html +.. _StateModelGenerator: ../eugene/apidocs/org/nuiton/eugene/models/state/StateModelGenerator.html +.. _JavaGenerator: ../eugene/apidocs/org/nuiton/eugene/java/JavaGenerator.html + +.. _Ref ObjectModelBuilder: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModelBuilder.html + +.. _Transformer: ../eugene/apidocs/org/nuiton/eugene/Transformer.html +.. _ObjectModelTransformer: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModelTransformer.html +.. _ObjectModelTransformerToJava: ../eugene/apidocs/org/nuiton/eugene/java/ObjectModelTransformerToJava.html + +.. _ModelReader: ../eugene/apidocs/org/nuiton/eugene/ModelReader.html +.. _ObjectModelReader: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModeReader.html +.. _Model: ../eugene/apidocs/org/nuiton/eugene/models/Model.html +.. _Generator: ../eugene/apidocs/org/nuiton/eugene/AbstractGenerator.html + +.. _Ref JavaBuilder: ../eugene/apidocs/org/nuiton/eugene/java/JavaBuilder.html Added: trunk/src/site/rst/05-execution.rst =================================================================== --- trunk/src/site/rst/05-execution.rst (rev 0) +++ trunk/src/site/rst/05-execution.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,36 @@ +Execution +========= + +:Author: Florian Desbois, Jean Couteau +:Contact: eugene-devel@list.nuiton.org or eugene-users@list.nuiton.org +:Revision: $Revision: 842 $ +:Date: $Date: 2010-03-05 16:11:45 +0100 (ven., 05 mars 2010) $ + +To put into place generation using EUGene, it is possible to use main +build utilities : `Ant`_ and `Maven`_ + +Ant +--- + +See documentation in `ant module`_. + +Maven +----- + +First, you need EUGene dependency to be able to use its API :: + + <dependency> + <groupId>org.nuiton.eugene</groupId> + <artifactId>eugene</artifactId> + <version>${eugene.version}</version> + <scope>provided</scope> + </dependency> + +It has to be noted that the provided scope is enough as EUGene is used only +during compile/generation. + +You can now extends wanted Transformer and Generator to be able to generate +files using the maven plugin. See `plugin documentation and examples`_ . + +.. _plugin documentation and examples: ../maven-eugene-plugin/fr/example.html +.. _module ant: ../ant-eugene-task/fr/ Added: trunk/src/site/rst/06-fonctionnalites-avancees.rst =================================================================== --- trunk/src/site/rst/06-fonctionnalites-avancees.rst (rev 0) +++ trunk/src/site/rst/06-fonctionnalites-avancees.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,142 @@ +Advanced functionalities +======================== + +:Author: Florian Desbois, Jean Couteau +:Contact: eugene-devel@list.nuiton.org or eugene-users@list.nuiton.org +:Revision: $Revision: 833 $ +:Date: $Date: 2010-03-04 17:17:03 +0100 (jeu. 04 mars 2010) $ + +This chapter concerns EUGene advanced functionalities, i.e. how to extend EUGene +to adapt it to another model than the ObjectModel or how to extend the +ObjectModel using extensions. + +EUGene can be extended on the four basic notions : + +- `Writer`_ : file to file conversion +- `ModelReader`_ : file to model conversion +- Transformer : model to model conversion (see `Templates`_ ) +- Generator : model to file conversion (see `Templates`_ ) + +The `Extensions`_ also allow to enrich EUGene basic model : ObjectModel. + +Writer +------ + +EUGene manage by default the following input formats : + +- xmi : standard file for UML modeling language. Versions 1.2 and 2.1 are + supported by EUGene +- zargo : `ArgoUML`_ file (xmi 1.2) +- zuml : `TopCased`_ file (xmi 2.1 voir 3.0) +- objectmodel : xmi simplified version to generate ObjectModel +- statemodel : xmi simplified version to generate StateModel + +A writer is defined by : + +- a model type (objectmodel, statemodel) +- an input protocol +- an output protocol +- resources to process +- the task execution logic + +The writers can be chained (the output protocol becomes the input protocol of +the following Writer) and this in a hierarchical way (we have to keep an order +on the tasks to execute...). + +For example, if we have a zargo file input and we want java files, the following +steps are necessary : + +- extract xmi file from zargo archive +- xmi transformation to an objectmodel file +- templates application and java file generation from objectmodel + +Each of those steps uses a writer : + +- zargo2xmi (input: zargo, output: xmi) +- xmi2objectmodel (input: xmi, output: objectmodel) +- objectmodel2java (input: objectmodel, output: file (java or other)) + +To use Writers' execution engine, we need to save its resources to process. It +will find the right Writers to call amongst those available and will launch +the tasks (Writer) in the correct order. + +If, for example, we give him an objectmodel file, it will only call the last +writer (objectmodel2java). + +ModelReader +----------- + +`Ref ModelReader`_ + +The ModeLReader allows to load a Model from files. It's used by EUGene's +execution to read some input files and fill the corresponding model. The two +ModelReader available are : + +- `ObjectModelReader`_ : use digesters to read **objectmodel** files. +- `StateModelReader`_ : use digesters to read **statemodel** files. + +It is possible to manage other input file formats and manipulate them using a +new ModelReader that you will need to create inheriting from the basis +ModelReader. It is also possible to manage another type of Model and to create +a ModelReader that will fill it in. + +The maven plugin allows to specify which reader to use. For more informations +consult the maven goals configuration. + +Extension +--------- + +EUGene mainly manipulates ObjectModel. This model gives 90% of the necessary +functionalities to numerous output files generation whatever the programming +language might be. Meanwhile some specificities of those languages might block +the usage of ObjectModel and lead the developer to create a new model finally +really close to the existing ObjectModel. + +The idea is so to extend the ObjectModel by extensions not to interfere with its +main goal : provide classes representing UML norm. + +The root ObjectModel allows the recovery of an extension with a unique +reference. If the extension does not exists, it will be automatically created. +You have to use the `ObjectModel interface`_ to do so:: + + <O> O getExtension(String reference, Class<O> extensionClass) + throws ClassCastException, IllegalArgumentException; + +You just have to attach any class to the model to ba able to manipulate it as +an extension. The aim being to recover it at any step of the generation process +(reader, transformer, generator). + +For Java, three extensions have been created : + +- `ImportsManagerExtension`_ : associate an `ImportsManager`_ with an + `ObjectModelClassifier`_ . The ImportsManager will record all the imports + necessary for this classifier (class, interface, enum). + +- `AnnotationsManagerExtension`_ : associate an `AnnotationsManager`_ with an + `ObjectModelClassifier`_ . The AnnotationManager will record the annotations + for a classifier on an `ObjectModelElement`_ (operation, parameter, attribute, + classifier, ...) + +- `ConstantsManagerExtension`_ : allows to manage a cache on the manipulated + constants' names during a generation. The recent generation constants + integration (for example to specify a bean property name) now authorise us to + use those constants in the generated code. So the constant's name calculation + from a property come quite often and is cached by this extension. + +.. _Templates: 04-templates.html + +.. _Ref ModelReader: ../eugene/apidocs/org/nuiton/eugene/ModelReader.html +.. _ObjectModelReader: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModelReader.html +.. _StateModelReader: ../eugene/apidocs/org/nuiton/eugene/models/state/StateModelReader.html + +.. _ObjectModel interface: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModel.html + +.. _ImportsManagerExtension: ../eugene/apidocs/org/nuiton/eugene/java/ImportsManagerExtension.html +.. _ImportsManager: ../eugene/apidocs/org/nuiton/eugene/java/ImportsManager.html +.. _AnnotationsManagerExtension: ../eugene/apidocs/org/nuiton/eugene/java/AnnotationsManagerExtension.html +.. _AnnotationsManager: ../eugene/apidocs/org/nuiton/eugene/java/AnnotationsManager.html +.. _ConstantsManagerExtension: ../eugene/apidocs/org/nuiton/eugene/java/ConstantsManagerExtension.html + +.. _ObjectModelElement: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModelElement.html +.. _ObjectModelClassifier: ../eugene/apidocs/org/nuiton/eugene/models/object/ObjectModelClassifier.html + Added: trunk/src/site/rst/07-glossaire.rst =================================================================== --- trunk/src/site/rst/07-glossaire.rst (rev 0) +++ trunk/src/site/rst/07-glossaire.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,86 @@ +Glossary +======== + +MDA +--- + +**M**odel **D**riven **A**rchitecture : programming technique based on models. + +Refs : `MDA`_ , `Introduction EUGene`_ + +.. _MDA: http://fr.wikipedia.org/wiki/Model_driven_architecture +.. _Introduction EUGene: 01-introduction.html + +UML +--- + +**U**nified **M**odeling **L**anguage : modeling language. + +Refs : `UML official website`_ , `ObjectModel EUGene`_ + +.. _UML official website: http://www.uml.org/ +.. _ObjectModel EUGene: 02-objectmodel.html + +XMI +--- + +**X**ML **M**etadata **I**nterchange : XML norm for UML language. + +Refs : `XMI official website`_ , `ObjectModel EUGene`_ + +.. _XMI official website: http://www.omg.org/technology/documents/formal/xmi.htm + +Template +-------- + +Class that allows file generation from a data model. + +Ref : `EUgene templates`_ , `Nuiton-processor library`_ + +.. _EUGene templates: 04-templates.html +.. _Nuiton-processor library: http://maven-site.nuiton.org/processor + +Transformer +----------- + +Model transformer : conversion from a model A to a model B. + +Ref : `EUGene templates`_ + +Generator +--------- + +Output files generator from an input data model. + +Ref : `EUGene templates`_ + +ObjectModel +----------- + +EUGene object meta-model with UML specificities (multiplicities, inheritance, ...) + +Refs : `ObjectModel EUGene`_ + +Builder +------- + +Model builder, allows to create and fill a model directly in Java. + +Refs : `EUGene advanced functionalities`_ + +.. _EUGene advanced functionalities: 06-fonctionnalites-avancees.html + +Extension +--------- + +Model extensions, allows to add specific functionalities to a model. Mainly used +in ObjectModel to add Java language specificities to it. + +Refs : `EUGene advanced functionalities`_ + +Nuiton-processor +---------------- + +Library allowing the template syntax interpretation. + +Ref : `Nuiton-processor library`_ Added: trunk/src/site/rst/08-FAQ.rst =================================================================== --- trunk/src/site/rst/08-FAQ.rst (rev 0) +++ trunk/src/site/rst/08-FAQ.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -0,0 +1,53 @@ +=== +FAQ +=== + +How to convert UML models from Poseidon to AgroUML ? +==================================================== + +You have to save your model using Poseidon in XMI, or extract it from the .zuml +file which is in fact a zip file:: + + xlstproc -o <argo-file>.xmi poseidon2argouml.xsl <poseidon-file>.xmi + +Then in ArgoUML open the generated file. + +The diagrams are not converted, you have to create them agein from the classes +doing drag&drop. + +How to write Transformer's methods ? +==================================== + +The interest of the Transformers is to use less template syntax as possible to +generate the final code. Nevertheless it is necessary to use this syntax for +the methods body. Nuiton-processor interprets differently Transformers and +Generators, it is necessary to add as Transformer's heading the following +configuration :: + + /*{generator option: parentheses = false}*/ + /*{generator option: writeString = +}*/ + +You then just need to use the balises ``/*{ }*/`` to add the body of a method:: + + setOperationBody(setValue, "" + /*{ + this.value = value; + }*/ + ); + +Note + It is advised to make tests for the output file page setting as well as for + Generators results. + +Where can I find examples of Transformer or Generator ? +======================================================= + +Waiting for tutorials and a demo version, the project you can find with the most +of concrete examples on EUGene use is `ToPIA`_ . You can find in the source code +(ToPIA-persistence module) lots of examples of Transformer and/or Generator for +Java code generation (uses ObjectModelTransformerToJava or ObjectModelGenerator +as superclass). You can also find some examples of integration tests of +`maven-eugene-plugin`_ : directory **src/it/smart-generate**. + +.. _ToPIA: http://nuiton.org/projects/show/topia +.. _maven-eugene-plugin: maven-eugene-plugin/index.html Modified: trunk/src/site/rst/index.rst =================================================================== --- trunk/src/site/rst/index.rst 2010-03-10 11:42:00 UTC (rev 848) +++ trunk/src/site/rst/index.rst 2010-03-10 16:38:02 UTC (rev 849) @@ -1,19 +1,42 @@ ====== -EUGEne +EUGene ====== -.. contents:: +**E**fficient **U**niversal **Gene**rator +You will find in this documentation : -Home ----- +- `Introduction`_ : introduction to EUGene's principles +- `ObjectModel`_ : EUGene main meta-model used for generation +- `Generation process`_ : Generation steps +- `Templates`_ : Templates writing (`Transformer`_ et `Generator`_ ) +- `Execution`_ : Generation's execution (via Maven ou Ant) +- `Advanced functionalities`_ : How to extend EUGene's functionalities +- `Glossary`_ : Glossary of the terms used in EUGene +- `FAQ`_ : Frequently Asked Question -EUGene's project is distributed in 3 modules : +.. _Introduction: 01-introduction.html +.. _ObjectModel: 02-objectmodel.html +.. _Generation process: 03-generation.html +.. _Templates: 04-templates.html +.. _Execution: 05-execution.html +.. _Advanced functionalities: 06-fonctionnalites-avancees.html +.. _Glossary: 07-glossaire.html +.. _Transformer: 07-glossaire.html +.. _Generator: 07-glossaire.html +.. _FAQ: 08-FAQ.html +EUGene is divided into 3 modules : + * `eugene-api`_ * `ant-eugene-task`_ * `maven-eugene-plugin`_ -.. _eugene-api: eugene/index.html -.. _ant-eugene-task: ant-eugene-task/index.html -.. _maven-eugene-plugin: maven-eugene-plugin/index.html \ No newline at end of file +.. _eugene-api: ../eugene/fr/index.html +.. _ant-eugene-task: ../ant-eugene-task/fr/index.html +.. _maven-eugene-plugin: ../maven-eugene-plugin/fr/index.html + +More info on the project on `nuiton's forge`_ . + +.. _nuiton's forge: http://www.nuiton.org/projects/show/eugene + Modified: trunk/src/site/site_en.xml =================================================================== --- trunk/src/site/site_en.xml 2010-03-10 11:42:00 UTC (rev 848) +++ trunk/src/site/site_en.xml 2010-03-10 16:38:02 UTC (rev 849) @@ -21,11 +21,34 @@ <links> <item name="Libre-Entreprise" href="http://www.libre-entreprise.org/" /> </links> - - <menu name="User"> + + <menu name="Documentation"> + <item name="French version" href="fr/index.html" /> <item name="Home" href="index.html" /> - <item name="French version" href="fr/index.html" /> + <item name="Introduction" href="01-introduction.html" /> + <item name="ObjectModel" href="02-objectmodel.html" /> + <item name="Generation process" href="03-generation.html" /> + <item name="Templates" href="04-templates.html" /> + <item name="Execution" href="05-execution.html" /> + <item name="Advanced functionalities" href="06-fonctionnalites-avancees.html" /> + <item name="Glossary" href="07-glossaire.html" /> + <item name="FAQ" href="08-FAQ.html" /> </menu> + + <menu name="Project"> + <item name="Home" href="http://nuiton.org/projects/show/eugene" /> + <item name="Download" href="http://nuiton.org/projects/list_files/eugene" /> + <item name="Trackers" href="http://nuiton.org/projects/eugene/issues" /> + </menu> + + <menu name="Links"> + <item name="Nuiton-processor" href="http://maven-site.nuiton.org/processor"/> + <item name="ToPIA" href="http://maven-site.nuiton.org/topia"/> + <item name="ArgoUML" href="http://argouml.tigris.org/"/> + <item name="UML" href="http://www.uml.org/"/> + <item name="XMI" href="http://www.omg.org/technology/documents/formal/xmi.htm"/> + </menu> + <menu ref="modules"/> <menu ref="reports"/>