archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
946 stars 269 forks source link

Folder names do not react to label expressions #723

Closed heikkil closed 3 years ago

heikkil commented 3 years ago

Version of Archi

4.8.1

Archi Plug-ins

no

Operating System

MacOS 10.15.7 (19H524)

Expected Behaviour

When I define a label expression for a folder to control the visible name in the model tree window, the visible name should change.

Actual Behaviour

The visible name does not change

Steps to Reproduce the Behaviour

  1. Select a folder icon (e.g. Views [or a user created subfolder])
  2. Define label: ${property:$model{property:lang}}
  3. Define two properties: en:Views fi:Näkymät
  4. Define a property for the model: lang:fi
Phillipus commented 3 years ago

This is intended.

Folder label expressions affect the display of child objects, not the folder itself. Folders inherit the label expression of their parent folder.

https://github.com/archimatetool/archi/wiki/Label-Expressions#folders

heikkil commented 3 years ago

I seemed to have missed that piece of information about folders, thanks.

However, I do have a subfolder to the Views folder and they both have properties properly set and labels pointing to the model lang property. I can not get the folder names to change whatever I try. Maybe '${property:$model{property:lang}}' is too complex and is not supported?

Phillipus commented 3 years ago

I do have a subfolder to the Views folder

The expression in a folder or sub-folder is applied to child objects. Folders don't display label expressions.

The above setting works for the Note element but not for the Visual Grouping element

I tested your example above and bit work for Note and Visual Grouping.

heikkil commented 3 years ago

Sorry for the trouble. I deleted the message as soon as I realised my mistake.

The problem was a space character at the end of the tag, 'en '. They are really hard to spot. In fact, in structured fields like properties trailing white space should be banned and ideally automatically removed.

Phillipus commented 3 years ago

Closing as working as intended.