Book a Demo

Author Topic: Accessing tags in tag hierarchy during transform  (Read 3648 times)

Christhonie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Accessing tags in tag hierarchy during transform
« on: October 16, 2008, 08:12:07 pm »
Hi,

How can I access inherited tag values when writing transforms or when generating code?

I have ClassA with attribute Att1 of type ClassB.  The tags of both the attribute and those defined for ClassB are visible in the Tagged Values panel (under sections "Att1 (Attribute) and "from ClassB"), but the %attTag:"xx"% macro is only able to access those explicitly defined in the current attribute.

The EA User Guide (at http://www.sparxsystems.com/uml_tool_guide/what_is_uml_modeling/advancedtagmanagement.html) states that users can "View Tagged Values inherited from parent Classes or realized interfaces or applied stereotypes", override them and delete them, but what is the use if not accessible using the macros.  Am I missing something?

Any help would be appreciated.

Regard,
Chris

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • ArenĀ“t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Accessing tags in tag hierarchy during transfo
« Reply #1 on: October 16, 2008, 09:58:50 pm »
Quote
The EA User Guide (at http://www.sparxsystems.com/uml_tool_guide/what_is_uml_modeling/advancedtagmanagement.html) states that users can "View Tagged Values inherited from parent Classes or realized interfaces or applied stereotypes", override them and delete them, but what is the use if not accessible using the macros.  Am I missing something?

Inherited tags will only be part of that element, if you override them.
I assume that the inheritance takes place in the EA GUI layer only so they are not part of the model element unless you apply overriding on them.
The automation interface accesses the model information only, not what is visible in a dialog so in that case you will not be able to benefit from the inheritance mechanism.

A workaround would be to gather the realize link of the elements and explicitely get the tags from the parent element.

Maybe someone can prove me wrong here but I believe this is the way it goes.

Oliver