while

Syntax

[#while condition]
    body
[/#while]

where:

Description

The while tag processes the code between the start-tag and end-tag while the condition evaluates to true.

Examples

This code prints the name of an element and of its owners:

Hierarchy:
[#set]element : uml21.Element = ...[/#set]
[#while element != null]
    name: ${element.name}
    [#set]element = element.owner[/#set]
[/#while]

The above code would produce an output similar to the following:

Hierarchy:
    Account
    AccountPackage
    Model