|
Re: [Acceleo 3] Calling service on list [message #557221 is a reply to message #557193] |
Mon, 06 September 2010 07:44 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
This is a multi-part message in MIME format.
--------------000301050701070206010405
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
Could you provide us with the whole stack trace? This should be working.
Laurent Goubet
Obeo
galluzzo@gmail.com wrote:
> In Acceleo 2 we used to be able to call a service on a list of objects
> and it would execute the service on each object in the list. When I try
> to call the following line in Acceleo 3:
>
> eGenericSuperTypes.genSuperClassDeclaration(eClass.ePackage)
>
> (genSuperClassDeclaration is a service that I wrote in Acceleo 2 and is
> now a template I'm trying to run in Acceleo 3) this call causes an error
> in the higher level template:
>
> Evaluation failed with an exception: index=1, size=1
>
> Is this not doable anymore?
>
> Thanks for your help in advance
--------------000301050701070206010405
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------000301050701070206010405--
|
|
|
|
Re: [Acceleo 3] Calling service on list [message #557298 is a reply to message #557286] |
Mon, 06 September 2010 14:00 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
This is a multi-part message in MIME format.
--------------030208040406010400000901
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Tom,
Okay, this is a known issue we're striving to fix. In a nutshell, you're
trying to call a query which demands two or more parameters with the
first being implicit. In Acceleo words you have a query :
[query public myQuery(x : Foo, y : Bar = ... /]
and you try to invoke it from somewhere like such :
[template public myTemplate(x : Foo, y : Bar)]
[myQuery(y)/]
[/template]
Which *should* work ... yet does not because of bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=320474 . You can
workaround it by explicitely passing your elements :
[template public myTemplate(x : Foo, y : Bar)]
[x.myQuery(y)/]
[myQuery(x, y)/]
[/template]
Laurent Goubet
Obeo
Tom G wrote:
> Thanks for the quick response. This is why we're investing so much in
> Acceleo. I really like what you guys are doing. Here is the full stack:
>
> org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBounds Exception:
> index=1, size=1
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:3 52)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoQueryInvocation(AcceleoEvaluationVis itor.java:665)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoQueryInvocation(AcceleoEval
> uationVisitorDecorator.java:207)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitAcceleoQueryInvocation(AcceleoTraceabil
> ityVisitor.java:406)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 498)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV
> isitorDecorator.java:218)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:832)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE
> valuationVisitorDecorator.java:229)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea
> bilityVisitor.java:432)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 492)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.ocl.internal.evaluation.IterationTemplate.evalua
> te(IterationTemplate.java:87)
> at org.eclipse.ocl.EvaluationVisitorImpl.evaluateCollectIterato
> r(EvaluationVisitorImpl.java:1593)
> at org.eclipse.ocl.EvaluationVisitorImpl.visitIteratorExp(Evalu
> ationVisitorImpl.java:1443)
> at org.eclipse.ocl.EvaluationVisitorDecorator.visitIteratorExp(
> EvaluationVisitorDecorator.java:241)
> at org.eclipse.ocl.EvaluationVisitorDecorator.visitIteratorExp(
> EvaluationVisitorDecorator.java:241)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitIteratorExp(AcceleoTraceabilityVisitor. java:600)
> at org.eclipse.ocl.ecore.impl.IteratorExpImpl.accept(IteratorEx
> pImpl.java:114)
> at org.eclipse.ocl.AbstractEvaluationVisitor.visitExpression(Ab
> stractEvaluationVisitor.java:247)
> at org.eclipse.ocl.EvaluationVisitorDecorator.visitExpression(E
> valuationVisitorDecorator.java:156)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 517)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:473)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoIfBlock(AcceleoEvaluationVi
> sitorDecorator.java:163)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitAcceleoIfBlock(AcceleoTraceabilityVisit or.java:374)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 471)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV
> isitorDecorator.java:218)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:832)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE
> valuationVisitorDecorator.java:229)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea
> bilityVisitor.java:432)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 492)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:316)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoFileBlock(AcceleoEvaluation
> VisitorDecorator.java:143)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitAcceleoFileBlock(AcceleoTraceabilityVis itor.java:335)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 485)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV
> isitorDecorator.java:218)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation
> Visitor.java:832)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE
> valuationVisitorDecorator.java:229)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea
> bilityVisitor.java:432)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 492)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV
> isitorDecorator.java:218)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
> at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua
> tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
> at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac
> eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
> at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(Query
> Impl.java:152)
> at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:62)
> at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvalua
> te(AcceleoEngine.java:265)
> at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate
> (AcceleoEngine.java:130)
> at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate
> Template(AcceleoService.java:544)
> at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate
> (AcceleoService.java:389)
> at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.
> generate(AbstractAcceleoGenerator.java:120)
> at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.
> doGenerate(AbstractAcceleoGenerator.java:99)
> at org.openjaus.mercury.ecore.gen.cpp.Main.doGenerate(Main.java :148)
> at org.openjaus.mercury.ecore.gen.cpp.Main.main(Main.java:126)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchO
> peration.run(AcceleoLaunchOperation.java:105)
> at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL
> aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 220)
> at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL
> aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 123)
> at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchD
> elegate.launch(AcceleoLaunchDelegate.java:53)
> at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L
> aunchConfiguration.java:853)
> at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L
> aunchConfiguration.java:702)
> at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D
> ebugUIPlugin.java:923)
> at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu
> gin.java:1126)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
>
--------------030208040406010400000901
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------030208040406010400000901--
|
|
|
Re: [Acceleo 3] Calling service on list [message #557343 is a reply to message #557298] |
Tue, 07 September 2010 01:52 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Tom Galluzzo![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=galluzzo%40gmail.com) Messages: 16 Registered: June 2010 |
Junior Member |
|
|
Laurent,
Thanks for the idea. I tried a few things based on your suggestion. I'm not sure if the problem I'm having is exactly the same bug...
The first thing I tried was to explicitly pass the first parameter:
genSuperClassDeclaration(eGenericSuperTypes, eClass.ePackage)
When I did this I got the compile error:
illegal operation signature: (genSuperClassDeclaration(OrderedSet(EGenericType), EPackage)
Which is true because my template is defined as:
[template public genSuperClassDeclaration(eGenericType : ecore::EGenericType, currentPackage : ecore::EPackage)]
Like I mentioned before, with Acceleo 2 I used to be able to call a script on a list of objects as well as a single object and the generator would automatically call the script multiple times (once for each object in the list). If I pass in the parameter now explicitly this doesn't make sense because the parameter type is not a list, but I'm passing in a list. Is this "list type" template calling no longer possible in Acceleo 3, or do you still support it?
After this, I tried to explicitly call the template in a for loop:
[for (eGenericSuperTypes)][genSuperClassDeclaration(eClass.ePacka ge)/][/for]
This seemed to take away the error, but still didn't seem to execute correctly. Now after this template is finished the generation exits out of the [file] call and I see the following error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchO peration.run(AcceleoLaunchOperation.java:105)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 220)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginL aunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java: 123)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchD elegate.launch(AcceleoLaunchDelegate.java:53)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlu gin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBounds Exception: index=1, size=1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:3 52)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoQueryInvocation(AcceleoEvaluationVis itor.java:665)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoQueryInvocation(AcceleoEval uationVisitorDecorator.java:207)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoQueryInvocation(AcceleoTraceabil ityVisitor.java:406)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 498)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:832)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:432)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 492)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoForBlock(AcceleoEvaluationVisitor.ja va:423)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoForBlock(AcceleoEvaluationV isitorDecorator.java:153)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoForBlock(AcceleoTraceabilityVisi tor.java:356)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 478)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoIfBlock(AcceleoEvaluationVisitor.jav a:473)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoIfBlock(AcceleoEvaluationVi sitorDecorator.java:163)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoIfBlock(AcceleoTraceabilityVisit or.java:374)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 471)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:832)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:432)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 492)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoFileBlock(AcceleoEvaluationVisitor.j ava:316)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoFileBlock(AcceleoEvaluation VisitorDecorator.java:143)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoFileBlock(AcceleoTraceabilityVis itor.java:335)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 485)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplateInvocation(AcceleoEvaluation Visitor.java:832)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplateInvocation(AcceleoE valuationVisitorDecorator.java:229)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitAcceleoTemplateInvocation(AcceleoTracea bilityVisitor.java:432)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 492)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitAcceleoTemplate(AcceleoEvaluationVisitor.ja va:781)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitorDecorator.visitAcceleoTemplate(AcceleoEvaluationV isitorDecorator.java:218)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.switchExpression(AcceleoEvaluationVisitor.java:1 465)
at org.eclipse.acceleo.engine.internal.evaluation.AcceleoEvalua tionVisitor.visitExpression(AcceleoEvaluationVisitor.java:91 2)
at org.eclipse.acceleo.internal.traceability.engine.AcceleoTrac eabilityVisitor.visitExpression(AcceleoTraceabilityVisitor.j ava:524)
at org.eclipse.ocl.internal.evaluation.QueryImpl.evaluate(Query Impl.java:152)
at org.eclipse.ocl.ecore.QueryImpl.evaluate(QueryImpl.java:62)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.doEvalua te(AcceleoEngine.java:265)
at org.eclipse.acceleo.engine.generation.AcceleoEngine.evaluate (AcceleoEngine.java:130)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate Template(AcceleoService.java:544)
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate (AcceleoService.java:389)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. generate(AbstractAcceleoGenerator.java:120)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. doGenerate(AbstractAcceleoGenerator.java:99)
at org.openjaus.mercury.ecore.gen.cpp.Main.doGenerate(Main.java :148)
at org.openjaus.mercury.ecore.gen.cpp.Main.main(Main.java:126)
... 13 more
|
|
|
|
Re: [Acceleo 3] Calling service on list [message #557376 is a reply to message #557344] |
Tue, 07 September 2010 08:02 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
This is a multi-part message in MIME format.
--------------020803010304050509010005
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Tom,
As mentionned, it should work in Acceleo 3, as we did everything in
order for it to work. Yet you are in a case we didn't think of : calling
a multiple parameters query with a list of things for the first, and a
single value for the second parameter.
In short, with a query defined as :
[query public myQuery(x : Foo, y : Bar = ... /]
you should be able to call it with :
[x.myQuery(y)/]
[myQuery(x, y)/]
and thus, calling it from inside a loop on your list should work. The
other possibility is (with "sequence : Sequence(Foo)") :
[sequence.myQuery(y)/] <= automatically converted by OCL to
"sequence->collect(temp1 | temp1.myQuery(y))"
The possibility that fails because of the bug I mentionned earlier is :
[myQuery(y)/]
It will work in future versions. On the other hand, "myQuery(sequence,
y)" will never work.
Hope this clears out some of the confusion.
Laurent Goubet
Obeo
Tom G wrote:
> I did fix one issue... The genSuperClassDeclaration template was calling
> a query that calls invoke() on a java method I wrote. When I explicitly
> passed in the first argument of the query, things worked better, but now
> I'm having new issues I need to figure out. I'll post more on that soon...
>
> I'm still curious about the list template calling. I thought that was a
> really nice feature of Acceleo 2. Any information about that would be
> much appreciated.
>
> Thanks
> Tom G
--------------020803010304050509010005
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------020803010304050509010005--
|
|
|
Re: [Acceleo 3] Calling service on list [message #557387 is a reply to message #557193] |
Tue, 07 September 2010 09:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Hi Tom,
I was the one who created the entry on the bugzilla, but I didn't have the time to solve the problem at that moment. I checked the problem yesterday and this morning, and it should be solved for the next update of Acceleo 3.0 (SR1 in the end of september) and in Acceleo 3.1 next year.
![http://a.imageshack.us/img840/720/implicitcall.png](http://a.imageshack.us/img840/720/implicitcall.png)
Stephane Begaudeau, Obeo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04242 seconds