[Acceleo] Problem with file generation [message #1234090] |
Tue, 21 January 2014 08:08 |
Marc-Florian Wendland Messages: 83 Registered: January 2013 |
Member |
|
|
Hi all,
very strange, I executed the day before yesterday rather my code generator
with UML2 elements and it worked as expected. Without any noticible reason
(at least, I have not noticed it), I get the following warning:
!ENTRY org.eclipse.acceleo.engine 2 0 2014-01-21 08:47:27.999
!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 main template (which worked a dozen of times) looks like:
[template public utp2ttcn3(testContextAI : InstanceSpecification)]
[comment @main/]
[file('test.tl', false, 'UTF-8']
[testContextAI.name/]
[/file]
[/template]
It will not generate the file any more du to the above mentioned warning. I
can access the UML metamodel in my template editor with code completion
working as expected.
I made a test and changed the main template as follows:
[template public utp2ttcn3(testContextAI : EObject)]
[comment @main/]
[file('test.tl', false, 'UTF-8']
[testContextAI/]
[/file]
[/template]
It writes the file and puts
org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImpl@1db60321 (name:
TestContextArtifactInstance, visibility: <unset>)
into it.
I do not know why this suddenly happened and I am grateful for any hint.
Regards,
Marc-Florian
|
|
|
Re: [Acceleo] Problem with file generation [message #1234163 is a reply to message #1234090] |
Tue, 21 January 2014 11:24 |
Ed Willink Messages: 7675 Registered: July 2009 |
Senior Member |
|
|
HI
If you are following the very latest UML N-builds you will have just
switched fronm 4.0 to 5.0 as part of the UML 2.5 support. This could
certainly cause surprises since it is work in progress.
Regards
Ed Willink
On 21/01/2014 08:08, Marc-Florian Wendland wrote:
> Hi all,
> very strange, I executed the day before yesterday rather my code
> generator with UML2 elements and it worked as expected. Without any
> noticible reason (at least, I have not noticed it), I get the
> following warning:
>
> !ENTRY org.eclipse.acceleo.engine 2 0 2014-01-21 08:47:27.999
> !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 main template (which worked a dozen of times) looks like:
>
> [template public utp2ttcn3(testContextAI : InstanceSpecification)]
> [comment @main/]
> [file('test.tl', false, 'UTF-8']
> [testContextAI.name/]
> [/file]
> [/template]
>
> It will not generate the file any more du to the above mentioned
> warning. I can access the UML metamodel in my template editor with
> code completion working as expected.
>
> I made a test and changed the main template as follows:
>
> [template public utp2ttcn3(testContextAI : EObject)]
> [comment @main/]
> [file('test.tl', false, 'UTF-8']
> [testContextAI/]
> [/file]
> [/template]
>
> It writes the file and puts
>
> org.eclipse.uml2.uml.internal.impl.InstanceSpecificationImpl@1db60321
> (name: TestContextArtifactInstance, visibility: <unset>)
>
> into it.
>
> I do not know why this suddenly happened and I am grateful for any hint.
>
> Regards,
> Marc-Florian
|
|
|
|
Powered by
FUDForum. Page generated in 0.04055 seconds