How to generate preserved regions from EGL @template operation [message #1007950] |
Fri, 08 February 2013 07:15  |
Eclipse User |
|
|
|
Hi all,
I am trying to generate a preserved region from an EGL template.
myTemplate.egl:
[%
@template
operation MyObject myOperation() {
%][%=out.startPreserve("//", "", "myRegion", true) %]
blah
[%= out.stopPreserve() %][%
}
%]
myFile.egl:
[%
import "myTemplate.egl"
This is my file
[%= myObject.myOperation() %]
More of my file
%]
But the above example returns a NullPointerException:
Error encountered whilst processing template. (generate-files.eol@21:14)
Cause: Internal error: Internal error: Internal error: Internal error: java.lang.NullPointerException
at org.eclipse.epsilon.egl.output.OutputBuffer.startPreserve[OutputBuffer.java:181]
at sun.reflect.GeneratedMethodAccessor48.invoke[Unknown Source]
at sun.reflect.DelegatingMethodAccessorImpl.invoke[DelegatingMethodAccessorImpl.java:43]
at java.lang.reflect.Method.invoke[Method.java:601]
at org.eclipse.epsilon.eol.util.ReflectionUtil.executeMethod[ReflectionUtil.java:175]
at org.eclipse.epsilon.eol.util.ReflectionUtil.executeMethod[ReflectionUtil.java:157]
at org.eclipse.epsilon.eol.execute.PointExecutor.executeOperation[PointExecutor.java:154]
at org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointExecutor.java:75]
at org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointExecutor.java:44]
at org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointExecutor.java:90]
at org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[ExecutorFactory.java:226]
...and so on...
When looking around with the debugger it seems that OutputBuffer does have 'context' set, resulting in the NPE when an instance method of 'context' is called.
Am I doing something wrong? Or is it not possible to create a protected region from a EGL @template operation?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.23236 seconds