Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Unable to run transformation
[Acceleo] Unable to run transformation [message #702380] Tue, 26 July 2011 05:39 Go to next message
Eclipse UserFriend
Hello all,

I'm using acceleo to generate a text file out of an e-core model but I cannot get it to work. I'm using

acceleo: 3.1.0.v20110607-0602
eclipse: Indigo: 20110615-0604

Here is a small extract of my template:

[comment encoding = UTF-8 /]

[module generate('ua.ac.be/jdenil/CAMPAM11/SmallAR')/]

[template public generate(aModel : Model)]
	 
	[comment @main /] 
	[file ('filename.txt', false, 'UTF-8')]

...

	[/file]
[/template]


In the generate.java file the smallAR package is registered and resource factory:

public void registerPackages(ResourceSet resourceSet) {
        super.registerPackages(resourceSet);
        resourceSet.getPackageRegistry().put(SmallARPackage.eNS_URI, SmallARPackage.eINSTANCE);
}
public void registerResourceFactories(ResourceSet resourceSet) {
        super.registerResourceFactories(resourceSet);
        
        resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("smallar", new XMIResourceFactoryImpl());
    }


Though when I launch the application as a java application or as a plugin:

Quote:

An internal error occurred during: "Launching Generate".
The type of the first parameter of the main template named 'generate' is a proxy.


I aslo changed the acceleo compiler preferences to binary then no error was seen and nothing was produced...

What is going wrong?

Thank you,
Joachim Denil
Re: [Acceleo] Unable to run transformation [message #707089 is a reply to message #702380] Mon, 01 August 2011 04:15 Go to previous message
Eclipse UserFriend
Hi Joachim,

It would seem like the Acceleo engine didn't manage to properly load the template, and I'd say it is indeed due to the SmallAR metamodel.

Are you sure that SmallARPackage.eNS_URI is equal to "ua.ac.be/jdenil/CAMPAM11/SmallAR"? If not, you will have to either :
- use the value of SmallARPackage.eNS_URI as the URI of the module's metamodel ([module generate('<here>')/]), or
- register the package with the URI "ua.ac.be/jdenil/CAMPAM11/SmallAR" (resourceSet.getPackageRegistry().put(<here>, SmallARPackage.eINSTANCE);).

Laurent Goubet
Obeo
Previous Topic:[JET] Can JET accept variables of the array type?
Next Topic:how to generate an acceleo plugin
Goto Forum:
  


Current Time: Wed Jul 16 05:27:28 EDT 2025

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

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

Back to the top