Skip to content

Commit

Permalink
Added generator launcher documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Apr 3, 2024
1 parent a09d561 commit 644a697
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 49 additions & 1 deletion plugins/org.eclipse.acceleo.aql.doc/doc/Acceleo/tool.html
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@
<li><a href="#_the_acceleo_editor">The Acceleo Editor</a></li>
<li><a href="#_the_acceleo_debugger">The Acceleo Debugger</a></li>
<li><a href="#_acceleo_profiler">Acceleo Profiler</a></li>
<li><a href="#_java_launchers">Java launchers</a></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -957,10 +958,57 @@ <h4 id="_coverage_informations">Coverage informations</h4>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_java_launchers">Java launchers</h3>
<div class="paragraph">
<p>You can select a module file that contains a main template to generate the Java code that will launch your module. There are two menus:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><strong>Generate Generator Class</strong> that will generate a Java class that can be used in standalone</p>
<div class="ulist">
<ul>
<li>
<p>It creates a Java main class next to your module</p>
</li>
<li>
<p>It can be integrated in other application outside or inside of Eclipse</p>
</li>
</ul>
</div>
</li>
<li>
<p><strong>Create Eclipse UI Generator Project</strong> that will generate an Eclipse plugin</p>
<div class="ulist">
<ul>
<li>
<p>It creates an Eclipse plugin projet next to your generator project</p>
</li>
<li>
<p>It extends the standalone class (the standalone main class will be generated)</p>
</li>
<li>
<p>It contribute a menu to objects that can be passed to your main template</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="imageblock">
<div class="content">
<img src="images/JavaGenerators.png" alt="Java Generators">
</div>
</div>
<div class="paragraph">
<p>All the code above is generated using Acceleo 4. You can extend and override the content of the generated files like you would with any Acceleo 4 generator. The source code is in this <a href="https://github.com/eclipse-acceleo/acceleo/tree/master/plugins/org.eclipse.acceleo.aql.ide.ui/src-module/">source folder</a>.</p>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-03-22 15:54:21 +0100
Last updated 2024-04-03 14:50:49 +0200
</div>
</div>
</body>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions plugins/org.eclipse.acceleo.aql.doc/pages/Acceleo/tool.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ The Acceleo 4 Profiler allows you to keep track of executions and see where time

The first thing to do to profile an Acceleo generation is to create a Profile Configuration, which is as we will see very similar to a Launch Configuration. To create a Profile Configuration, right-click on an Acceleo module file, and select Profile As > Profile Configurations....

image::images/ProfileAs.png[Profile As]
image::images/ProfileAs.png[Profile As]

A configuration page appears, which looks very much like the traditional launch configuration page.

Expand All @@ -229,7 +229,7 @@ You can simply select a folder in this dialog, in which the profile file will be

Acceleo stores the result of a profiled execution in a file which extension is .mtlp. This file is actually just a serialized EMF model. Let's take a closer look at it.

image::images/ProfileFile.png[Profile File]
image::images/ProfileFile.png[Profile File]

The above image shows the content of an mtlp file, and correspondances between the profiled data and the Acceleo template elements.

Expand All @@ -243,6 +243,23 @@ The profile editor also provides coverage informations based on the profiling re

You can double-click on the module in the profile editor (or on any module element in the profile model) to accurately see what has been used in a given module. It shows in green what has been covered by the execution and in red what has been ignored.

image::images/Coverage.png[Coverage]
image::images/Coverage.png[Coverage]

To get rid of the coverage highlighting you can simply close the editor and reopen the file from the explorer.

=== Java launchers

You can select a module file that contains a main template to generate the Java code that will launch your module. There are two menus:

* *Generate Generator Class* that will generate a Java class that can be used in standalone
** It creates a Java main class next to your module
** It can be integrated in other application outside or inside of Eclipse
* *Create Eclipse UI Generator Project* that will generate an Eclipse plugin
** It creates an Eclipse plugin projet next to your generator project
** It extends the standalone class (the standalone main class will be generated)
** It contribute a menu to objects that can be passed to your main template


image::images/JavaGenerators.png[Java Generators]

All the code above is generated using Acceleo 4. You can extend and override the content of the generated files like you would with any Acceleo 4 generator. The source code is in this https://github.com/eclipse-acceleo/acceleo/tree/master/plugins/org.eclipse.acceleo.aql.ide.ui/src-module/[source folder].

0 comments on commit 644a697

Please sign in to comment.