Scripting Conventions

The general scripting conventions of ModelAnt are:

  1. The ModelAnt properties may store objects other than just strings.
  2. The property named this holds the current object to process, unless anything else stated.
  3. TheĀ ModelAnt tasks, macros and types receive as parameters (attributes) the names of the properties instead of string values.
  4. Common attribute names of ModelAnt tasks, macros and types:
    • property – holds the name of the property with the actual value to process. Default value: this;
    • name – holds the name of the property where to assign the produced value. Default value: this;
  5. Being also ANT tasks, macros and types, the ModelAnt tasks, macros and types are named as follows:
    • all letters are lower case;
    • ‘.’ is used as word separator;
    • they have function or component-specific common prefix like
      • ref – JMI reflective access to model elements;
      • mdr – management of the MetaData Repository;
      • uml13 – UML 1.3-relatedĀ  processing;
      • wrap – features related to model wrappers;
    • no prefix is used only for widely used tasks, macros and types;
  6. Common model navigation attributes of ModelAnt tasks, macros and types:
    • extent attribute holds the name of the extent of the model repository where the model or metamodel to process is/should be loaded;
    • path attribute holds a navigation path through model attributes and associations evaluated starting from the current object to process;
    • metaclass holds the qualified name of the metaclass to process.

See also:

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.