Hi
I have the problem with my generation process. In my project I use an Acceleo UI Launcher. It works as expected if I run it in Eclipse as a new Eclipse Application but it doesn't work if I install it into the host. I can find in the log the following:
!ENTRY org.eclipse.acceleo.engine 2 0 2015-07-14 22:19:51.248
!MESSAGE The generation failed 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 could also come from a missing [comment @main/]
in the template used as the entry point of the generation.
The comment main is within my main module. The packages are registered as followed (Generate.java):
/**
* This can be used to update the resource set's package registry with all needed EPackages.
*
* @param resourceSet
* The resource set which registry has to be updated.
* @generated NOT
*/
@Override
public void registerPackages(ResourceSet resourceSet)
{
super.registerPackages(resourceSet);
if (!isInWorkspace(MyProjectPackage.class))
{
// The normal package registration if your metamodel is in a plugin.
resourceSet.getPackageRegistry().put(MyProjectPackage.eNS_URI, MyProjectPackage.eINSTANCE);
}
}
/**
* This can be used to update the resource set's resource factory registry with all needed factories.
*
* @param resourceSet
* The resource set which registry has to be updated.
* @generated NOT
*/
@Override
public void registerResourceFactories(ResourceSet resourceSet)
{
super.registerResourceFactories(resourceSet);
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("myproject", new XMIResourceFactoryImpl());
}
I work with Eclipse Luna SR1 4.4.1 and Acceleo 3.4.1.
Thanks a lot & BR