I have 3 template for example:-
main, genA, genB
The genB
module is a specification for genA
and supposed to overwrite one template bar
. The problem is, that if you call the overwritten template within genA it is not the template specified in genB.
Here are the simplified templates:-
main:-
[module main('http://www.eclipse.org/uml2/5.0.0/UML')]
[import genB /]
[template public generateElement(aClass : Class)]
[comment @main/]
[foo() /][bar() /]
[/template]
genA:-
[module generateA('http://www.eclipse.org/uml2/5.0.0/UML') extends genB]
[template public foo()]
[bar() /]
[/template]
[template public bar()]
barA
[/template]
genB:-
[module generateB('http://www.eclipse.org/uml2/5.0.0/UML') extends genA]
[template public bar() overrides bar]
barB
[/template]
the output is barAbarB
so the call within genA
is not overwritten. This behavior is mentioned in the docs. What would be the suggested way to overwrite the template ?