Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Simple, step by step, working tutorial, from UML to code?
[Acceleo] Simple, step by step, working tutorial, from UML to code? [message #1019777] Sat, 16 March 2013 16:32 Go to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,

As in the subject.

I am looking for a simple, step by step, working tutorial, from UML to
code. I have found several "tutorials" and looked at the example
provided by Acceleo itself (file->new->example-UML to Java) but nothing
actually seems to work.

TIA

Joost


Cheers,

Joost
Re: [Acceleo] Simple, step by step, working tutorial, from UML to code? [message #1021082 is a reply to message #1019777] Tue, 19 March 2013 13:54 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

but nothing actually seems to work.


What is your problem precisely? An error message in particular?

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com | Eclipse Java Development Tools Tips and Tricks
Re: [Acceleo] Simple, step by step, working tutorial, from UML to code? [message #1021322 is a reply to message #1021082] Tue, 19 March 2013 21:32 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
On 19-03-13 14:54, Stephane Begaudeau wrote:
> Hi,
>
> but nothing actually seems to work.
>
> What is your problem precisely? An error message in particular?
The tutorial in the help files of Eclipse is just a pretty picture
without anything useful. It rather look as a place holder for the future
tutorial?

The tutorial at http://wiki.eclipse.org/Acceleo/Getting_Started appears
to be written for a previous version and shows screens that are not in
the current Juno SR2 edition.

If I add the code in generate.mtl as presented in "Genrating java beans"
and run the app I get an error in the error log:

"Couldn't load class org.eclipse.acceleo.module.sample.main.Generate
from project org.eclipse.acceleo.module.sample"

and a warning:

"Couldn't load class org.eclipse.acceleo.module.sample.main.Generate.
Check that its containing package is exported."

At this point there almost no documentation on how to go further that is
useful for a complete newbie with Acceleo.

TIA

Joost


Cheers,

Joost
Re: [Acceleo] Simple, step by step, working tutorial, from UML to code? [message #1021658 is a reply to message #1021322] Wed, 20 March 2013 13:16 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

"Couldn't load class org.eclipse.acceleo.module.sample.main.Generate 
from project org.eclipse.acceleo.module.sample"

and a warning:

"Couldn't load class org.eclipse.acceleo.module.sample.main.Generate. 
Check that its containing package is exported."


If you open the file MANIFEST.MF of your generator, do you have the package containing your java launcher exported as detailled here?

Quote:
Since this module contains a @main annotation, we will need to export its containing package (so that other Eclipse plugins may launch the generation). For this, open the META-INF/MANIFEST.MF file of your project, go to its Runtime tab, click Add and select the org.eclipse.acceleo.module.sample.main package. The tab should look like this when you are done :


Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: +stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com | Eclipse Java Development Tools Tips and Tricks
Re: [Acceleo] Simple, step by step, working tutorial, from UML to code? [message #1021812 is a reply to message #1021658] Wed, 20 March 2013 18:14 Go to previous message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
On 20-03-13 14:16, Stephane Begaudeau wrote:
> Hi,
>
> "Couldn't load class org.eclipse.acceleo.module.sample.main.Generate
> from project org.eclipse.acceleo.module.sample"
>
> and a warning:
>
> "Couldn't load class org.eclipse.acceleo.module.sample.main.Generate.
> Check that its containing package is exported."
>
> If you open the file MANIFEST.MF of your generator, do you have the
> package containing your java launcher exported as detailled
> http://wiki.eclipse.org/Acceleo/Getting_Started#Creating_a_main_module?

Of course not. The tutorial does not mention this at the point (or
before the point) where it says "Right-click on the Acceleo module file
(that is, the generate.mtl file) and select Run As > Launch Acceleo
Application.". It mentions this 8 times pages down on a 21' screen, 9600
pixels below the first time it says to generate. Strange that I did not
notice this before. Silly me.

But thanks for the tip. It seems to work now.

Joost


Cheers,

Joost
Previous Topic:[Acceleo] Problem calling AcceleoService programatically
Next Topic:[Acceleo] Why Activity node get executed in a template that accepts only Class Type ?
Goto Forum:
  


Current Time: Fri Apr 19 19:35:17 GMT 2024

Powered by FUDForum. Page generated in 0.02977 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top