Book a Demo

Author Topic: Supported Attributes on Stereotypes  (Read 3194 times)

Hannes Stauss

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Supported Attributes on Stereotypes
« on: December 12, 2007, 05:55:12 am »
Hi!
Just tried to define a stereotype with a supported attribute as described here

http://www.sparxsystems.com.au/EAUserGuide/index.html?supportedattributes_2.htm

What I want to achieve is to show all tagged values on a stereotype whenever one drops the stereotype on a diagramm from the toolbox. Therefore I added the supported attribute

_Tag: int = 1

to my stereotype that extends an Actor metaclass. I assumed that the tagged value will be hidden in the tags view and that all tagged values show up when the stereotype is dopped on the diagram.

However, neither all tags are shown nor is "Show Element Compartments: Tags" checked in the feature visibility dialog. Moreover, the _Tag tag is an editable tag in the tagged values view.

Thanks for any hints in advance.

Hannes

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Supported Attributes on Stereotypes
« Reply #1 on: December 12, 2007, 07:37:24 am »
Had that problem myself some weeks ago. It's simple however: you have to define the _Tag attribute not on the stereotype, but on the metaclass. It plainly says so in EA help

Quote
The following attributes can be applied to metatype Classes in UML Profiles, and refer to the stereotypes that extend them


but I overread it first time too, because it's so weird.

Frank

Hannes Stauss

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Supported Attributes on Stereotypes
« Reply #2 on: December 12, 2007, 09:45:11 am »
Thanks Frank,
that solved the issue.

Regards
Hannes

Banvari Lakhotia

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Supported Attributes on Stereotypes
« Reply #3 on: August 24, 2009, 07:02:54 pm »
Hi,

I came across your discussion about Tag's visibility. I followed the same process, all tagged values on a stereotype visible when one drops the stereotype on a diagram from the toolbox. But the same could not be achived with automation script.
here is my process:
1. Add element.
2. assign stereotype from profile
3. Update element
4. Project.CustomCommand() - to get all tags available
5. Update all tags values
6. Add diagram object and assign element reference.
7. Update diagram object.

When I go to diagram, I could not see available tags. I have to go to diagram properties -> element -> check the box for Tags visibilty and to see all tags.

Is any step missing in automation? Appreciate your feedback.

Regards,
Banvari