Epsilon is a family of Java-based scripting languages for automating common model-based software engineering tasks, such as code generation, model-to-model transformation and model validation, that work out of the box with EMF (including Xtext and Sirius), UML (including Cameo/MagicDraw), Simulink, XML and other types of models.
pre {
for (p in Person.all) {
p.~index = loopCount;
p.~index.println();
}
}
rule Person2TaskList
transform p : Person {
template: "template.egl"
target : "gen/" + p.~index.println() + ".html"
}
post {
for (p in Person.all) {
p.~index.println();
}
}
Should print
1
2
1
2
1
2
however it prints
1
2
1
This is because after template.egl is executed for the first time, it clears the extended properties passed to it from its parent EGX module.
Changing the EGX program of https://eclipse.dev/epsilon/playground/?egx as follows
Should print
however it prints
This is because after
template.egl
is executed for the first time, it clears the extended properties passed to it from its parent EGX module.