Home » Modeling » M2T (model-to-text transformation) » Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a (Issues with the Acceleo 3.1.0 version)
Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a [message #673668] |
Tue, 24 May 2011 08:41  |
Eclipse User |
|
|
|
I have written a transformation in Acceleo, which uses xml as input. For this I wrote the required contenthandler and everthing else. The transformation works fine in the version 3.1.0M6a.
I haven't changed handling for the xml files, nor the templates for Acceleo. The main template is defined as
[comment encoding = UTF-8 /]
[module generate('xxx')/]
[...]
[template public generate(w : WebType)]
[for( m0 : MenuType | w.menu )]
[generateMenu(m0,w)/]
and the implementation of the Generator is given as:
public void registerPackages(ResourceSet resourceSet) {
super.registerPackages(resourceSet);
// TODO If you need additional package registrations, do them here. The following line is an example for UML.
if (!isInWorkspace(WebmlPackage.class)) {
// The normal package registration if your metamodel is in a plugin.
resourceSet.getPackageRegistry().put(WebmlPackage.eNS_URI, WebmlPackage.eINSTANCE);
} else {
// The package registration that will be used if the metamodel is not deployed in a plugin.
// This should be used if your metamodel is in your workspace.
resourceSet.getPackageRegistry().put("/de.malime.ecore.webml/model/webml.ecore", WebmlPackage.eINSTANCE);
}
}
with an xml file
<?xml version="1.0" ?>
<web theme="theme/malime.css" xmlns="xxxxx" >
<meta name="keywords" value="IBM,Rational Software,RSA,RSM,RFT,RTC,jazz.net,MDA,MBD,MDD,eclipse,plugins,features" />
....
</web>
Since Acceleo 3.1.0M7 I get the warning: "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."
Does somebody have any idea, what could be done or changes to resolve this issue?
TIA
Rainer Menke
|
|
| | | | | | | | | |
Goto Forum:
Current Time: Fri Jul 04 19:23:13 EDT 2025
Powered by FUDForum. Page generated in 0.03742 seconds
|