Author Topic: MDG Extending 'Package' with new icon  (Read 2356 times)

Ian Mitchell

  • EA User
  • **
  • Posts: 506
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
MDG Extending 'Package' with new icon
« on: June 16, 2022, 08:38:01 pm »
Does anyone know why EA doesn't allow MDGs to create alternate project browser images for extensions to 'package' ? There's just a 1-liner in the documentation (V15.2:  'This does not apply to package elements").
Has anyone tried to get around this by defining a specialization of an element instead - for example as a extension of 'class' - and using this in place of a specialized package? Seems like most things will still work, except stuff like 'show package contents' in diagrams. Are there any big gotchas out there ?
I seem to want this capability quite a lot, to show the modeler that not all packages are alike, and some should have certain kinds of element, and other ones other kinds. Seems intuitive.
Is it possible to decorate the built-in icon?
@Sparx - is this just something you didn't get around to yet, or is there some deep reason why we shouldn't do it?
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1145
  • Karma: +30/-8
    • View Profile
Re: MDG Extending 'Package' with new icon
« Reply #1 on: June 16, 2022, 09:11:20 pm »
Hi Ian,

My understanding is that it should work but you need to also set the metatype. But although I extended the package, I have never tried using a different icon.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Extending 'Package' with new icon
« Reply #2 on: June 16, 2022, 09:54:54 pm »
Does anyone know why EA doesn't allow MDGs to create alternate project browser images for extensions to 'package' ? There's just a 1-liner in the documentation (V15.2:  'This does not apply to package elements").
Has anyone tried to get around this by defining a specialization of an element instead - for example as an extension of 'class' - and using this in place of a specialized package? Seems like most things will still work, except stuff like 'show package contents' in diagrams. Are there any big gotchas out there?
I seem to want this capability quite a lot, to show the modeller that not all packages are alike, and some should have certain kinds of elements, and others ones other kinds. Seems intuitive.
Is it possible to decorate the built-in icon?
@Sparx - is this just something you didn't get around to yet, or is there some deep reason why we shouldn't do it?
Hi Ian,
It won't surprise you to find "I've been here, done that!"!  We have a number of package stereotypes each with its own icon.  They are managed in the normal way (icon attribute on the stereotype).  However, the instantiation of the icon in the browser during EA use can be intermittent.  Most of the time it's fine, but occasionally it "disappears" to return with a reload of the package content.

Sparx refused to fix what (to me and others) appeared to be a defect.

There you have it.
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG Extending 'Package' with new icon
« Reply #3 on: August 30, 2022, 01:46:08 pm »
Hi Ian,

You may or may not be aware of this. v16 - Stereotyped Package Icons are incorrectly assigned to unstereotyped

Paolo
« Last Edit: August 30, 2022, 01:49:48 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!