| Summary: | [EGL] Operations should have access to out and dynamic sections | ||
|---|---|---|---|
| Product: | [Modeling] Epsilon | Reporter: | Louis Rose <louis> |
| Component: | Core | Assignee: | Louis Rose <louis> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dkolovos, louis |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | All | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=313119 https://bugs.eclipse.org/bugs/show_bug.cgi?id=347367 https://bugs.eclipse.org/bugs/show_bug.cgi?id=347370 |
||
| Whiteboard: | interim | ||
out is currently a local variable, it should be a global. However, making it a global would mean that subtemplates would access the same outputbuffer as their parent, and this is undesirable. Instead, we need a mechanism for indicating that a variable has global scope in the current template, and is inaccessible from subtemplates. Chatting with Antonio, it seems he has a similar problem for data bindings in EUnit. We need to discuss this and see if there is a common solution. Fixing this will cause the error message added for #313119 to be redundant, and that logic should be removed. Fixing this will make it less clear when to annotate an operation with @template. The differences should be investigated: Do we need to make @template and normal operations exactly the same? If so, do we need to deprecate @template? Do we need to make @template and normal operation more different in some way? Either way, we should also update the EGL documentation. (In reply to comment #1) > out is currently a local variable, it should be a global. However, making it a > global would mean that subtemplates would access the same outputbuffer as their > parent, and this is undesirable. Instead, we need a mechanism for indicating > that a variable has global scope in the current template, and is inaccessible > from subtemplates. > > Chatting with Antonio, it seems he has a similar problem for data bindings in > EUnit. We need to discuss this and see if there is a common solution. For now, I've fixed this by shuffling the global frame before and after executing a template. We've opened #347367 and will investigate a more general solution in the future. (In reply to comment #2) > Fixing this will cause the error message added for #313119 to be redundant, and > that logic should be removed. I've removed this check as part of the fix. (In reply to comment #3) > Fixing this will make it less clear when to annotate an operation with > @template. The differences should be investigated: > > Do we need to make @template and normal operations exactly the same? If so, do > we need to deprecate @template? > Do we need to make @template and normal operation more different in some way? > > Either way, we should also update the EGL documentation. I've opened #347370 to cover this investigation and update to the documentation. Fix checked into SVN. Assigning to Dimitris for build integration, thanks! This is fixed in SVN, and will appear in the next interim/stable builds. Fixed in 0.9.1 |
Operations should be able to access the out variable. The following, for example, throws an exception right now: [% setup() %] [% operation setup() { out.setContentType("XML"); } %]