Book a Demo

Author Topic: Typing Custom Stereotype's Tag Values with Classes  (Read 2661 times)

syortsos

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Typing Custom Stereotype's Tag Values with Classes
« on: December 08, 2020, 03:40:54 pm »
Hi,

Is it possible to type a custom stereotype's attributes with a model element, such as a Class object that exists in that Project Browser?

Scenario: I am making a custom profile that defines custom stereotypes and custom attributes. I am typing some attributes with primitive data types (int, char, etc.) and some attributes with metaclasses (class, activity, etc.). When I import my custom profile to my project I am able to apply my stereotypes to its intended model elements (in my case the stereotypes extend from classes). However, I am unable to populate the stereotype's attribute with a model element, such as a class. When I open the objects properties, I see the attribute in its Tags, however I have no way to tie the value of that Tag to a model element (a class). Is there a way to do this?

Thanks,
Stevie

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Typing Custom Stereotype's Tag Values with Classes
« Reply #1 on: December 08, 2020, 04:15:55 pm »
Hi Stevie,

In the profile helper choose Add Specialize Tagged Value | Reference when adding a tagged value. Then choose the appropriate stereotype.
This will create a tagged value connector on your profile diagram.

You can move the target to a metaclass such as Class as well. The profile helper doesn't allow you to choose this, but it works when generating a UML profile.

Alternative is to create a new tagged value definition and use that as a predefined tagged value.

Geert

syortsos

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Typing Custom Stereotype's Tag Values with Classes
« Reply #2 on: December 10, 2020, 02:04:34 am »
Geert,

Thank you very much! That was exactly what I was looking for!

Stevie