Book a Demo

Author Topic: How to set a stereotype?  (Read 3333 times)

furman76

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
How to set a stereotype?
« on: September 30, 2011, 10:18:04 pm »
Hi,

        Attribute attr = parent.GetAttributes().AddNew(name, type);
        attr.SetStereotype("My Attribute");
        attr.Update();

works, and "My Attribute" is displayed on the class, but it is not linked in any way to the "My Attribute" stereotype defined in my UML Profile. I still have to manually update stereotype for every attribute imported. Is there any way to set specific stereotype through the API? Also, is there a way to invoke tagged value synchronization for the stereotypes defined in the UML profile?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to set a stereotype?
« Reply #1 on: October 01, 2011, 12:38:36 am »
Not sure if this works at all: try to qualify the stereotype with your MDG (like MYMDG::My Stereotype).

q.
« Last Edit: October 01, 2011, 12:38:59 am by qwerty »

furman76

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: How to set a stereotype?
« Reply #2 on: October 01, 2011, 01:16:26 am »
Tried it. Also tried to specify stereotype GUID instead of name. It just treats it as string. Looks like a gap.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to set a stereotype?
« Reply #3 on: October 03, 2011, 03:56:25 am »
While working on my new ebook I once again stumbled over this. According to this thread the creation does work. I tried this with my own profile but failed. Probably there's a bug in EA. I'll investigate a bit more.

q.
« Last Edit: June 19, 2012, 07:03:01 pm by qwerty »