|[Accele0 3] Quick start/Getting started problem [message #870121]
||Sun, 06 May 2012 17:41
| Joost Kraaijeveld
Registered: July 2009
I am trying to follow the Quick start/Getting started tutorials without
The first assumes that one creates a UML model, which I did. But
whenever I choose the "Launch Acceleo Application" it shows a message
"Selection does not contain a main type (@main annotation is missing in
your main template)",
which look correct as I do not have a main template or anything that
contains the string "main".
The second tutorial mentions at some point:
"You can now launch the generation of your Java beans using this
generation module but you need an ".uml" model as the input. You can
create one thanks to the wizards and editor provided by the UML project
or you can take the one provided in the UML to Java Acceleo example
(File -> New -> Example -> Acceleo -> UML to Java).
In order to do this, you will have to :
Right-click on the Acceleo module file (that is, the generate.mtl file)
and select Run As > Launch Acceleo Application."
This is confusing. Do I have to right click etc. to get a UML model, in
which case I get the same error message as in the Quick start tutorial.
Or do I first have to create a UML model by choosing (File -> New ->
Example -> Acceleo -> UML to Java)? In which case: this does not do
anything: no file is generated.
Am I missing something? It appears that the version of Acceleo that is
used in the tutorial is a different version than I use, based on the
screen shots (my version is 3.1.3c20120214-0359 according to the Eclipse
SDK Installation Details, plug-ins dialog) and several dialogs seem to
have many more options than are shown in the tutorial's screen shots.
Are there other, working, tutorials somewhere available?
|Re: [Accele0 3] Quick start/Getting started problem [message #870865 is a reply to message #870684]
||Thu, 10 May 2012 05:31
| Joost Kraaijeveld
Registered: July 2009
Thanks for answering. I did not get it working thought, although some
progress is made. See my comments below.
On 09/05/12 12:49, Laurent Goubet wrote:
> Which is your problem, since the "main" template is the entry point of a
> generation. See
> http://wiki.eclipse.org/Acceleo/Getting_Started#Creating_a_main_module .
Ah, I did not see that. Maybe because it is is introduced *after* the
part in the tutorial where I was supposed to generate the Java Beans.
The tutorial mentions to append "*/main*" at the end of the parent
fiels. If I do that it still does not work and a directory structure
with the strang names sample*/main*/ and the file umlToBeans.mtl is
created, and I cannot run it as Acceleo program. Moving the file to
sample/main (without the "*") solved the problem of the messasgebox.
It generated no code but the error log mentions:
"The generation fail to generate any file because there are no model
elements that matches at least the type of the first parameter of one of
your main templates.
The problem may be caused by a problem with the registration of your
metamodel, please see the method named "registerPackages" in the Java
launcher of your generator."
It may be a trivial problem, but as a very first time user of the tool I
do not have enough insight yet to understand it. I used the attached
Ecore model as the model. Should such an Ecore model work? And I thought
it contained a package?
>> This is a bit confusing. Do I have to "right-click on the Acceleo.." to
>> get a UML model, or do I first have to create a UML model by choosing
>> "File -> New -> Example -> Acceleo -> UML to Java" or by some other
> You have to first create the UML model through another tool. You can use
> "File -> New -> Example -> Acceleo -> UML to Java" to get a working full
> generator along with an example UML model. This action will create a new
> project in your workspace containing that sample model and the
> corresponding "UML to Java" generators. You can then either launch these
> generators or use the sample model with your own.
This menu option does not generate anything. No new project or other
>> Trying the second option "File -> New -> Example -> Acceleo -> UML to
>> Java" does not create any files at all.
> This is not normal. It should import new projects in your workspace. In
> what version of Eclipse did you try,
I am following the tutorial using Eclipse 3.7.2 and the Acceleo SDK
and do you have something in the
> error log (Window > Show View > Error Log)? Please post it here if you do.
> If it helps, you can also retrieve sample generators from the improved
> UML-to-java example on https://github.com/ObeoNetwork/UML-Java-Generation.
Ok, thanks. I will definitely look into that.
Powered by FUDForum
. Page generated in 0.06232 seconds