[Acceleo] No output despite correct input [message #1281755] |
Tue, 01 April 2014 09:57 |
Arjan van der Meer Messages: 8 Registered: February 2010 |
Junior Member |
|
|
Hello,
I'm having some problems with an Acceleo plugin I am working on. the plugin should generate some output files based on the output of some QVTO transformations. I have adapted the generateAll method of one of the template UI plugins to achieve this, and if I execute the plugin using 'run as->Eclipse application', everything appears to be working fine.
However, if I 'Export->Deployable fragments and plugins->install into host' and then use the plugin, no output is produced, and I get the error message:
Quote: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.
As far as I can tell, the input of the template contains the required elements and there is a @main annotation in the template. I am not explicitely registering metamodels, but the plugin can work without it, so it doesn't seem necessary. As far as I can tell, everything should be working.
My questions are:
* There must be a difference between the two methods of running the plugin. How can I find out what the differences are?
* In general, what is a good method to debug a problem like this?
Regards,
Arjan van der Meer
|
|
|
Re: [Acceleo] No output despite correct input [message #1282371 is a reply to message #1281755] |
Wed, 02 April 2014 07:38 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
As the comments suggest your plugin registrations are wrong, but often
only understandable with hindsight.
In similar situations I just single step the initialization and see why
the parameters are mismatched.
Regards
Ed Willink
On 01/04/2014 10:57, Arjan van der Meer wrote:
> Hello,
>
> I'm having some problems with an Acceleo plugin I am working on. the
> plugin should generate some output files based on the output of some
> QVTO transformations. I have adapted the generateAll method of one of
> the template UI plugins to achieve this, and if I execute the plugin
> using 'run as->Eclipse application', everything appears to be working
> fine. However, if I 'Export->Deployable fragments and plugins->install
> into host' and then use the plugin, no output is produced, and I get
> the error message:
> Quote:
>> 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.
>
>
>
> As far as I can tell, the input of the template contains the required
> elements and there is a @main annotation in the template. I am not
> explicitely registering metamodels, but the plugin can work without
> it, so it doesn't seem necessary. As far as I can tell, everything
> should be working.
>
> My questions are:
> * There must be a difference between the two methods of running the
> plugin. How can I find out what the differences are?
> * In general, what is a good method to debug a problem like this?
>
> Regards,
> Arjan van der Meer
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02378 seconds