Book a Demo

Author Topic: Association Classes in UML profiles  (Read 3435 times)

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Association Classes in UML profiles
« on: June 23, 2014, 06:28:41 am »
Hi there

I am creating an MDG which includes a stereotype based on the Association Class.
I create the stereotype by:

1. Creating an AssociationClass metaclass.
2. Creating a stereotype which extends the aforementioned metaclass.
3. Adding the attributes in the sterotype in order to get tagged values in my stereotype.

However, when I add my new stereotype to my toolbox and compile the MDG, something goes awry.
The new stereotype appears in the toolbox and I can drag it onto the page as you would expect to.

BUT there are no tagged values associated with the stereotype.

Additionally, it also prefixes the class name with the name of my profile/technology despite the fact that the stereotype class has been defined in the same profile as all the other elements on the page.

If anyone can help me resolve this issue, it would be greatly appreciated.

Thanks

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Association Classes in UML profiles
« Reply #1 on: June 23, 2014, 10:27:15 am »
You don't say what version of EA you are using. A very quick test with the latest EA 11 works as expected.
The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Association Classes in UML profiles
« Reply #2 on: June 23, 2014, 10:32:57 am »
Oops! Sorry.
I'm currently on 9.3.933

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Association Classes in UML profiles
« Reply #3 on: June 23, 2014, 10:40:47 am »
I think EA 9.3 used to get confused, thinking: "This is a class with a stereotype, but that stereotype extends AssociationClass so it must be a different stereotype." If you make your stereotype extend Class,  Association AND AssociationClass, then I think it will work for you. Or you could upgrade to EA 11 ;)
The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Association Classes in UML profiles
« Reply #4 on: June 23, 2014, 10:42:49 am »
Yep, in the process of doing that. But in the mean time, I have to make do.

Thanks for that  :)