2

I am new to Eclipse and Acceleo, and I have been trying to complete the First Generator Model Tutorial. I am using Juno 4.2 and Acceleo 3.3.

Here is what I have done so far:

  1. I created an Accelo projece with a UML Metamodel and Generate Type Class.

  2. I added the provided code for the generate file, and put the [comment @main/] below the template line.

  3. I made changes to the MANIFEST file. Under the Bundle SymbolicName, I added singleton:=true. I added the files for runtime, added all the necessary plugins and under extensions, I added the UML generate and dynamic package.

  4. I then created a new Java Project, and then selected UML Model and made it a package. I then created a class by right clicking on the package, selecting New Child and then class.

  5. I go to launch the generate file. I selected the uml model and the target as the src file under the new Java Project. It says it is launching it, but I can not see the generated file, or it is not actually generating it.

I would really appreciate any help or feedback. I am really stuck on this!

j0k
  • 22,600
  • 28
  • 79
  • 90
  • Hi, AxA's answer below is one possibility. Otherwise we'll need a little more info : do you have anything in the error log (Window > Show View > Error Log)? Do you have a [file] block in your template? Does your model contain an element of the type required by your "@main" template? – Kellindil Aug 21 '12 at 08:10

1 Answers1

0

I'm also quite new to Acceleo, but I can give it a try: do you have a [file] construct in your generate.mtl file? Because without it Acceleo doesn't generate any file.

This is an example of usage of the [file] in the generate.mtl file. It creates a myFile.txt file with a class name inside:

[comment encoding = UTF-8 /]
[module genAFile('http:///org/eclipse/uml.... etc ')/]

[template public genAFile(aClass : Class)]
    [file ('myFile.txt', false, 'UTF-8')]
        [aClass.name/]
    [/file]
[/template]

Hope it helps

AxA
  • 319
  • 5
  • 18