Define script execution context : <context> tag

Before a <gendoc> tag, a <context> must have been defined to determine the model and the element to use as starting context.

<context> tag can contain the following attributes :

<context
  model='${model_folder}/model_1.uml'
  element='model/package1/subpackage1'
  importedBundles='gmf;papyrus'
  searchMetamodels='true'
/>

The context tag must be defined at least once in the document.

When executing a script, the last defined context is used.

Values of the attributes that are not updated are kept from previous context.
For example, “importedBundles” attribute can be defined only once in the document and will be kept until a new value is indicated.

Dealing with specific models

Using multiple meta-models

If the model selected references another meta-model, set the following attribute to “true” in order for gendoc to analyse meta-models used as references.

searchMetamodels='true'

Meta-models where elements have no ‘name’ feature

With specific meta-models where elements have no ‘name’ property, context elements are defined: