Tutoriel architecte
73 Pages
English

Tutoriel architecte

-

Downloading requires you to have access to the YouScribe library
Learn all about the services we offer

Description

ACCELEO
Architect Tutorial
This handbook is the exclusive ownership of its authors and was conceded to the profit of Obe o SARL. This
handbook is protected by intellectual ownership rights.
It deals with a software product called ACCELEO, currently distributed under the open source E clipse Public
License E(PL). The distribution of this handbook is however not free.
This handbook makes it possible to fully take advantage of the many advanced functionalities o f ACCELEO
software and required on behalf of its authors and of OBEO an important compilation and synth esis work, as
well as consequent financial and time investments. Nevertheless, there may still be mistakes le ft in this
document, OBEO shall not be held responsible for any resulting inconvenience. ACCELEO as we ll as the
content of this document may be altered without prior notice.
This document is not under Free licens. eThis document can be downloaded without any fee f rom the
OBEO website after proper registering. You may read and use it for any activity, commercial or not, related
to ACCELEO. Yet permission of copying, translating or distributing freely or commercially this manual is
subject to prior approval by OBEO.
____________________
"OBEO”, "ACCELEO”, as well as OBEO and ACCELEO logosa re registered trademarks of Obeo in Fra nce
and in other countr.ies
All other names, titles, drawings, and logos are the exclusive ownership of their authors and are protected by
intellectual ownership rights.
This ...

Subjects

Informations

Published by
Reads 0
Language English
Document size 1 MB
ACCELEO
Architect Tutorial
This handbook is the exclusive ownership of its authors and was conceded to the profit of Obeo SARL. This handbook is protected by intellectual ownership rights. It deals with a software product called ACCELEO, currently distributed under the open source Eclipse Public License (EPL). The distribution of this handbook is however not free. This handbook makes it possible to fully take advantage of the many advanced functionalities of ACCELEO software and required on behalf of its authors and of OBEO an important compilation and synthesis work, as well as consequent financial and time investments. Nevertheless, there may still be mistakes left in this document, OBEO shall not be held responsible for any resulting inconvenience. ACCELEO as well as the content of this document may be altered without prior notice. This document is not under Free license. This document can be downloaded without any fee from the OBEO website after proper registering. You may read and use it for any activity, commercial or not, related to ACCELEO. Yet permission of copying, translating or distributing freely or commercially this manual is subject to prior approval by OBEO. ____________________
"OBEO”, "ACCELEO”, as well as OBEO and ACCELEO logos are registered trademarks of Obeo in France and in other countries. All other names, titles, drawings, and logos are the exclusive ownership of their authors and are protected by intellectual ownership rights. This handbook was written with the following tools: OpenOffice ____________________
Authors: Jonathan MUSSET, Étienne JULIOT, Stéphane LACRAMPE With the participation of: Laurent GOUBET, Goulwen LE FUR, Julien DUPONT, Guillaume RAIMBAULT, Nathalie LEPINE, William PIERS and Cédric BRUN
Copyright 2006-2008 Obeo. All rights reserved.
Summary 1 - Introduction.......................................................................................................................1 2 - Installation.........................................................................................................................2 3 - Preparation.......................................................................................................................3 4 - Scenario 1: Simple XHTML Generator.............................................................................4 4.1  Creation of a Prototype..............................................................................................4 -4.1.1 - Structure of a Prototype Project.........................................................................4 4.1.2 - Prototype Page...................................................................................................6 4.2 - Creation of the Generator..........................................................................................8 4.2.1 - Generator Project...............................................................................................8 4.2.2 - Creation of the Generator..................................................................................9 4.2.3 - From the Template to the Generator: Using the Reflective Editor..................10 4.2.4 - Using Data from the Model in the Generator...................................................13 4.2.5 - Creation of the Execution Chain......................................................................17 5 - Scenario 2: Basic Java Class Generator........................................................................19 5.1 - Creation of the Prototype........................................................................................19 5.1.1 - Structure of a Prototype Project.......................................................................19 5.1.2 - Java Class Prototype.......................................................................................19 5.2 - Creation of the Basic Generator..............................................................................22 5.2.1 - Structure of a Prototype Project.......................................................................22 5.2.2 - From the Template to the Generator:..............................................................22 5.2.3 - Adapting the Prototype.....................................................................................23 5.2.4 - Correctly formatting – Creating and using Services........................................26 5.2.5 - Selection of the Files to be Generated.............................................................29 5.2.5.1 - Stereotypes in the Model..........................................................................29 5.2.5.2 - "hasStereotype" Service ..........................................................................29 5.2.5.3 - Filtering Classes using the "hasStereotype" Service...............................30 5.2.6 - Creation of an Execution File...........................................................................32 5.3 - Improving the Generator.........................................................................................33 5.3.1  Managing Operations.......................................................................................33 -5.3.2 - Incremental Generation – Using User Code Tags ..........................................35 5.3.3 - Managing Inheritance.......................................................................................37 5.3.4 - Parameterized Constructor..............................................................................38 6 - Scenario 3: Customization of the JSP/JDBC Example Module ....................................39 6.1 - Installing and Testing the JSP/JDBC Model...........................................................39 6.1.1 - Downloading and Installing the Model from the Acceleo.org Web Site...........39
6.1.2 - Analyzing the Existing Module.........................................................................40 6.1.2.1 - JSP Page Generator.................................................................................41 6.1.2.2 - Generator for the Navigation Page...........................................................41 6.1.2.3 - Action Generation.....................................................................................41 6.1.2.4 - Configuration of the Web Application - "web.xml" file..............................42 6.1.2.5 - Data Transfer Classes..............................................................................42 6.1.2.6 - Data Access Classes................................................................................42 6.1.3 - Module's generation result...............................................................................42 6.2 - Customization of the Module...................................................................................44 6.2.1 - Adding an SQL Generator................................................................................45 6.2.1.1 - New Generator File...................................................................................45 6.2.1.2 - SQL Generator..........................................................................................45 6.2.1.3 - Changing the Execution Chain.................................................................49 6.2.2 - Configuring the Generation – "Property" Files.................................................52 6.2.2.1 - Creation of a Default "properties" File......................................................52 6.2.2.2 - Adapting Generators.................................................................................53 6.2.2.3 - Flexibility of the Method – Reconfiguration of the Generation.................55 7 - Scenario 4: Specific Meta-Model – Creation and Use....................................................56 7.1 - Creation of a Meta-Model........................................................................................56 7.1.1 - Meta-Model Project..........................................................................................56 7.1.2 - Creation of the Meta-model..............................................................................57 7.2 - Creation of a Model Editor.......................................................................................60 7.3 - Dynamic instance of a Cinematic based model......................................................61 7.4 - XHTML Screen Generator.......................................................................................65 7.5 - Generation Chain....................................................................................................68 7.6 - The Same Possibilities with Meta-models...............................................................69