Text-type Properties with Links

<< Click to Display Table of Contents >>

 

Text-type Properties with Links

Some Text-type properties Text allow using expressions when used in Links, as follows:

The expression must be enclosed in braces. If users need to display braces, these characters must be duplicated in the text ("{{" at the beginning and "}}" at the end). Text outside braces are considered as literal.

Property's text may have as many expressions as needed, provided that the opening braces of each expression have their corresponding closing braces at the end of that expression.

If an expression is invalid, at run time the Link displays the text "NULL". If the expression also contains literal text, this text is displayed and the part relative to the invalid expression contains the text "NULL".

The expression also supports the @(Context) format, where Context is a String with the name of a context implemented by an object on the upper hierarchy of the current object. For a list with names of all available contexts, please check the Context method on Elipse Power Reference and Scripts Manual.

 

Examples of Valid Expressions

Displays the text "Protection Mode: ", followed by the content of the DocString property.

Protection Mode: {DocString}

 

Displays the content of the Name property, followed by the text " - " and the content of the ShortName property between braces.

{Name} - {{ShortName}}

 

Displays the text "Area: ", followed by the content of the PathName property of the first object on the upper hierarchy of the current object that implements the Area context.

Area: {@(Area).PathName}

 

Examples of Invalid Expressions

Displays the text "Protection Mode: NULL", because the name of the DocString property is wrong.

Protection Mode: {DocStrin}

 

Displays the content of the Name property, followed by the text " - NULL", because the number of braces at the beginning and at the end of the ShortName property's expression does not match.

{Name} - {{ShortName}}}

 

Displays the text "Area: NULL", because context's name is wrong.

Area: {@(Arrea).PathName}

Was this page useful?