|
|
Re: ATL Design Patterns [message #1650380 is a reply to message #1648193] |
Wed, 04 March 2015 20:14 |
|
Thanks! It's a simple pattern, which is good. It also allows you to customise tracing any way you like.
For safety reasons (not overwriting existing traces, not generating duplicate elements) you may also want to look at unique lazy rules, which can also take primitive type elements as input these days, e.g.:
unique lazy rule StringToEClass {
from s : String
to t : ECORE!EClass (
name <- s)
do {
thisModule.elementsMap <- thisModule.elementsMap->including(s, t);
t; -- return value
}
}
In EMFTVM, you don't even need to record your own traces for unique lazy rules. You can use the special, three-parameter version of resolveTemp() listed under https://wiki.eclipse.org/ATL/EMFTVM#ATL_Module_operations .
I propose to add your pattern as Custom Tracing, is that ok for you?
Cheers,
Dennis
[Updated on: Wed, 04 March 2015 20:15] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03696 seconds