Archi Forum

Archi Plug-ins => Other Plug-ins => Topic started by: audreykoz on May 14, 2019, 16:36:51 PM

Title: Specialization Plugin: Proper use of the "view" prefix
Post by: audreykoz on May 14, 2019, 16:36:51 PM
Hey Herve,
I was wondering the correct way to use the "view" prefix. I've tried it a variety of ways in my config file, such as creating a new column in a tab that should display the view that an element is contained in (if it is contained in a view), however, this results in errors that the "${view}" variable does not exist.
What's the intended usage/syntax for this prefix?
Thanks!
Title: Re: Specialization Plugin: Proper use of the "view" prefix
Post by: Hervé on May 14, 2019, 20:29:53 PM
Hi Audrey,

Basically, the key thing to understand is that the variables always correspond to the Archimate concept. So the variables of the form ${prop} (like ${id}, ${name}, ${description}, ...) refer to the corresponding property of the selected Archimate concept.

But is some cases, accessing properties of this specific Archimate concept is not sufficient, so I introduced the ability to change the scope of the variable, using the form ${scope:prop}, where the scope can be:

So if your variable is ${view:name}, then you'll get the name of the view where the selected graphical object stands.

Hope this helps :-)

Best regards
Hervé

ps: please note that this is exactly the same mechanism in the specialization plugin and the form plugin.
Title: Re: Specialization Plugin: Proper use of the "view" prefix
Post by: audreykoz on May 15, 2019, 15:34:29 PM
Gotcha, thank you!
Title: Re: Specialization Plugin: Proper use of the "view" prefix
Post by: audreykoz on May 16, 2019, 16:44:11 PM
Hey, quick follow up (although unrelated) question.
Is there any way to delete a property, and not just it's value using the plugin?
Title: Re: Specialization Plugin: Proper use of the "view" prefix
Post by: Hervé on May 16, 2019, 19:42:43 PM
Indeed  ;)

For every editable widget (text, richtext, combo, checkbox), there is a field called "when empty" on the graphical editor ("whenEmpty" in the configuration file). The values can be:

Please note this works even inside tables.

Best regards
Hervé
Title: Re: Specialization Plugin: Proper use of the "view" prefix
Post by: audreykoz on May 16, 2019, 19:57:03 PM
Gotcha, thanks!
Title: Re: Specialization Plugin: Proper use of the "view" prefix
Post by: Hervé on May 16, 2019, 20:05:22 PM
My apologies, my explanation was incomplete !!!

This behaviour is when the variable value is empty only.

If there is a value if the variable, then the property is always created/updated and never deleted.

Hope this is clear, else please do not hesitate to ask again  ;)