EGL broken by upgrade [message #589410] |
Thu, 27 May 2010 17:16  |
Eclipse User |
|
|
|
Hello,
I have a number of EGL templates that worked fine until updating to 0.8.9. Operations (now marked with @template) produce no output. For example:
[%
inputAnt.println('InputAnt: ');
for (proj : AntProject in inputAnt.getAllOfType('AntProject')){%]
<project name="[%=proj.name%]" basedir="[%=proj.baseDir%]" default="[%=proj.default%]">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
[% for (target : AntTarget in proj.element) {
target.emitTarget();
}%]
</project>
[%}
@template
operation AntTarget emitTarget() {
self.println('Emitting target ');
%]
<target>
</target>
[%}
%]
This code produces the following output:
<project name="EpsilonTools" basedir="." default="">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
</project>
As you can see, the operation emitTarget() isn't emitting the targets.
Here's the console output, which shows the operations are being executed:
Buildfile: C:\Eclipse3.5\workspace\epsilontools.engine\design\Build.xml
GenerateBuildXML:
[epsilon.egl - GenerateBuildXML.egl] InputAnt: org.eclipse.epsilon.workflow.tasks.ModelReference@daa718
[epsilon.egl - GenerateBuildXML.egl] Emitting target epsilontools.ant.impl.AntTargetImpl@6a338e (propsFile: null, propsURL: null, propsResource: null) (name: TransformEcore2Logic, description: null)
...
[epsilon.egl - GenerateBuildXML.egl] Emitting target epsilontools.ant.impl.AntTargetImpl@31ebd9 (propsFile: null, propsURL: null, propsResource: null) (name: GenerateEngineConfiguration, description: null)
BUILD SUCCESSFUL
Total time: 766 milliseconds
I'm using the latest interim build, to address the bug in http://www.eclipse.org/forums/index.php?t=msg&th=166758& amp;start=0&
Is this another regression, or is there something I need to do besides adding the @template annotations?
|
|
|
Re: EGL broken by upgrade [message #589430 is a reply to message #589410] |
Fri, 28 May 2010 04:59  |
Eclipse User |
|
|
|
Hi Mark,
I'm sorry to hear you're having problems with EGL in 0.8.9. I think the following change to the EGL template should cause the ANT targets to be emitted:
[% for (target : AntTarget in proj.element) {
target.emitTarget();
}%]
becomes:
[% for (target : AntTarget in proj.element) { %]
[%=target.emitTarget()%]
[%}%]
@template operations return a string that should be output in the main template using a dynamic output section. Hence the [%= target.emitTarget() %] statement.
Prior to 0.8.9, @template operations had access to the main template and could be used without a dynamic output section. Though this was possible, it wasn't the intended semantics, and it's been "fixed" in 0.8.9.
I'll update the EGL documentation to describe how @template operations should be used and how they work. This is an area of EGL that we should describe more thoroughly.
Thanks for reporting this, and sorry once again for the confusion.
Cheers,
Louis.
|
|
|
Powered by
FUDForum. Page generated in 0.03107 seconds