title: overwrite or extend a template in an Acceleo template
body: <p>I have 3 template for example:-</p>
  
  <pre><code>main, genA, genB
  </code></pre>
  
  <p>The <code>genB</code> module is a specification for <code>genA</code> and supposed to overwrite one template <code>bar</code>. The problem is, that if you call the overwritten template within genA it is not the template specified in <code>genB.</code></p>
  
  <p>Here are the simplified templates:-</p>
  
  <p>main:-</p>
  
  <pre><code>[module main('http://www.eclipse.org/uml2/5.0.0/UML')]
  
  [import genB /]
  
  [template public generateElement(aClass : Class)]
  [comment @main/]
  [foo() /][bar() /]
  [/template]
  </code></pre>
  
  <p>genA:-</p>
  
  <pre><code>[module generateA('http://www.eclipse.org/uml2/5.0.0/UML') extends genB]
  
  [template public foo()]
  [bar() /]
  [/template]
  
  [template public bar()]
  barA
  [/template]
  </code></pre>
  
  <p>genB:-</p>
  
  <pre><code>[module generateB('http://www.eclipse.org/uml2/5.0.0/UML') extends genA]
  
  [template public bar() overrides bar]
  barB
  [/template]
  </code></pre>
  
  <p>the output is <code>barAbarB</code> so the call within <code>genA</code> is not overwritten. This behavior is mentioned in the <a href="https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.acceleo.doc%2Fpages%2Freference%2Flanguage.html#template" rel="nofollow noreferrer">docs</a>. What would be the suggested way to overwrite the template ?</p>