Ir al contenido

resolveLabelExpression

Esta página aún no está disponible en tu idioma.

cda-developer-portal


cda-developer-portal / resolveLabelExpression

resolveLabelExpression(model, node): string | null

Defined in: parser/label-expression.d.ts:36

Evaluates Archi’s Label Expression syntax (see https://github.com/archimatetool/archi/wiki/Label-Expressions) against a diagram object, connection, or note.

Supports the “core” placeholders that resolve from the object itself: ${name}, ${documentation}, ${content}, ${type}, ${strength}, ${accessType}, ${property:key}, ${properties}, ${propertiesvalues}, ${properties:separator:key}, ${wordwrap:count:expression}, ${if:cond:val}, ${if:cond:val1:val2}, ${nvl:cond:val} — including expressions nested inside another expression’s arguments.

Does NOT support the “Reference Prefix” forms ($parent{...}, $source{...}, $model{...}, $<relationship>:source{...}, etc.), which need to traverse the model graph (parent view/folder, connected relationships) rather than just read the object itself — those are left verbatim, unresolved, in the output. ${specialization} and ${viewpoint} are likewise left unresolved (not yet captured by the parser).

Returns null if the object has no labelExpression feature — there is nothing to evaluate, as opposed to evaluating to an empty string.

ArchiModel

ArchiDiagramObject | ArchiDiagramConnection | ArchiNote

string | null