blob: 124ce1db9a5146f487fca6d8f3e334e4ed7bab05 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<!--
/********************************************************************************
** Copyright (c) 2012 Obeo.
** All rights reserved. This program and the accompanying materials
** are made available under the terms of the Eclipse Public License v1.0
** which accompanies this distribution, and is available at
** http://www.eclipse.org/legal/epl-v10.html
**
** Contributors:
** Stephane Begaudeau (Obeo) - initial API and implementation
*********************************************************************************/
-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="St&eacute;phane B&eacute;gaudeau">
<!-- IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="../../assets/css/bootstrap.css" rel="stylesheet">
<link href="../../assets/css/docs.css" rel="stylesheet">
<title>Acceleo</title>
</head>
<body>
<div class="container">
<section id="description">
<div class="page-header">
<h1>Acceleo Project <small>definition and configuration</small></h1>
</div>
<p>
First of all, an Acceleo project is an Eclipse plug-in project and as such an OSGI bundle too. This concept is
important because strongly encourage you to follow Eclipse conventions when managing and Acceleo project. An
Acceleo project should follow the same naming convention as an Eclipse plug-in project:<br />
&lt;domain_url&gt;.&lt;project_name&gt;.&lt;metamodel_name&gt;.gen.&lt;target&gt; (ex: org.eclipse.acceleo.uml.gen.java).
<br />
You can of course adopt another kind of naming convention but try to keep the spirit of Acceleo naming convention.
</p>
<p>
The name of the project is directly used to determine the name of several elements starting with the name of the
root package of the Acceleo modules (one of the reason why "My Generation Project" would create problems).
</p>
</section>
<section id="dependencies">
<div class="page-header">
<h1>Dependencies <small>what do you need?</small></h1>
</div>
<p>
An Acceleo project, being an Eclipse plug-in project, handles its dependencies thanks to OSGI. Don't be scared, there
is no need to be an OSGI expert to manage dependencies. All Acceleo projects contain and file named MANIFEST.MF in the
META-INF folder. This file should be opened by default by the Plug-in Manifest Editor. Once open, you can go to the
"dependencies" tab to add a dependency to another Eclipse plug-in required for your generator. One of the first plug-in
required is the plug-in containing your meta-model. If you are creating a generator using UML models, you need to
referenced the UML meta-model, since it is located in the plug-in "org.eclipse.uml2.uml", you need to find or add the
dependency to "org.eclipse.uml2.uml" in the dependency tab of the MANIFEST.MF of your generator.
</p>
<p>
You also need to register your meta-model in the Java class generated by the entry point of your generator. Most of the
time, Acceleo can compute the registration required but sometime you have to do it manually, you can have a look at
the <a href="standalone.html">stand alone section</a> of the documentation for more information on package registration.
</p>
<p>
If you want to use multiple meta-models related one to the others, for example a meta-model extending another one, the
dependencies must be defined in the same way. The project containing the meta-model must define a dependency to EMF since
it is required for all EMF-based meta-models (org.eclipse.emf.ecore). The meta-model depending on the first meta-model
must have the dependency to the first meta-model setup in its MANIFEST.MF too and the generator must have a dependency to
this second meta-model declared in its MANIFEST.MF.
</p>
<br />
<br />
</section>
<footer class="footer">
<p>
The material in these guides are Copyright (c) 2008, 2012 Obeo. This material is available under the Eclipse Public License v1.0
</p>
</footer>
</div>
</body>
</html>