If a script section is used several times in a same document template, tag <fragment> can be used to define the script section and its attributes.
It can then be called from <gendoc> tags inside the same template document
<fragment> tag can contain the following attributes:
A | B | |
---|---|---|
1 |
<fragment name=’displayDiagram’ importedBundles=’commons;gmf;papyrus’> <arg name=’element’ type=’uml::Element’/> [for (d:Diagram|element.getPapyrusDiagrams())]<drop/> | |
2 | Diagram [d.name/]: | |
4 | <image object=’[d.getDiagram()/]’ maxH=’true’/> | |
4 |
[/for] </fragment><drop/> |
|
5 | ||
6 |
<gendoc> [for(p:Package|Package.allInstances())]<drop/> |
|
7 | [p.name/] | |
8 | [p.displayDiagram()/] | |
9 |
[/for] </gendoc> <drop/> |