Book a Demo

Author Topic: Adding metatype  (Read 3920 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Adding metatype
« on: January 20, 2014, 09:02:43 pm »
Hi there!


In a recent release of a profile, I added the _metatype attribute to one of my stereotypes. I deployed it in the same MDG Technology as always.

In my target project, I have now observed that some of the pre-existing classes with this stereotype are labelled Class (in dialogs etc) while others have the specified metatype. I would like them all to have the metatype.

Does this sound familiar to anyone? Is there a simple trick I can do to force the metatype onto these elements? And what's the underlying reason for this behaviour (so I can avoid it next time I go fiddling with metatypes)?

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Adding metatype
« Reply #1 on: January 20, 2014, 11:29:50 pm »
Yes. Making such changes to your MDG will cause grief. You need to sanitize that with a script and set the metatype for the old elements.

In a former project I had some sort of migration procedure for MDG changes.

q.
« Last Edit: January 20, 2014, 11:30:54 pm by qwerty »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Adding metatype
« Reply #2 on: January 21, 2014, 09:00:58 am »
If a class displays the wrong metatype, it will be because it has the wrong stereotype (think fully-qualified names: same stereotype, different profile). Have you changed the name of the profile? Or have a look in Settings > UML Types and see if the stereotype is in there (effectively the "global" profile). You may need to reapply the stereotype to those elements.
The Sparx Team
[email protected]