Book a Demo

Author Topic: Setting new icon / MDG file  (Read 6757 times)

floerio

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Setting new icon / MDG file
« on: March 10, 2009, 09:00:19 pm »
Hi!

We customize our EA version via a MDG file. E.g we add new stereotypes, add toolboxes etc.

So far everything works fine.

Now I am trying to change the icon of a stereotype that is displayed in the project tree. I am doing this as documented via the "_icon" attribute.

But nothing happens after the deployment of the file. The path is correct (double checked this). And in general the MDG file works as it should.

Has anyone experience with this?

And: Does someone knows how to the changes of the Icons in the toolbox correctly? Fololwing the EA manual, the EA changes the icons, but I have the effect that from 3 changed Icons it accepts only 2 and set the 3td to a icon of his own???? Any special traps here I have to be aware of?

Regards,
Oliver
« Last Edit: March 10, 2009, 09:02:02 pm by floerio »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Setting new icon / MDG file
« Reply #1 on: March 10, 2009, 09:35:27 pm »
Hi Oliver,

EA is sensitive to icon format. I don't remember which formats it accepts since it has been a long time. I think you should stick with older formats, and not use any format that internally compresses the bits.

Unfortunately EA fails silently when you use an icon it cannot accept. You get no feedback other than the 'default' icon.

[And yes, I've mentioned this (at length) to Sparx. It has been over a year since we worked through the ramifications, and they have not seen fit to address this one.]

David
No, you can't have it!

floerio

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: Setting new icon / MDG file
« Reply #2 on: March 10, 2009, 09:54:19 pm »
Hi David!

Thanks for your replay.

I use bmp as mentioned in the manual for the toolbox icons. And the correct size. Do you think for the icons in the tree there is another format than bmp?

And yes - its not nice of the EA to say nothing if the format or the size isn't wrong. Does not really speed up the process :-)

Cheers,
Oliver


floerio

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: Setting new icon / MDG file
« Reply #3 on: March 11, 2009, 03:59:21 am »
Ok, one issue has been tackled: The icons in the self-defined toolboxes:

1)Do not try it with two instances of the EA (one with the profile EAP and one for testing) where the profile EAP instance remains running after MDG creation. And only starting the test EAP instance. Always shut every EA instance. It seems that information about grafics is shared between instances...

ok, but that was also mentioned somewhere else here..

2) More important: I used GIMP to create the BMP. And my version created as default the BMP as 32bit with alpha Channel. but it seems to work only with 24b without alpha channel.

But still the problem with the (missing) icons in the project browser is not solved...  :(


Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Setting new icon / MDG file
« Reply #4 on: March 11, 2009, 04:07:46 am »
Quote
But still the problem with the (missing) icons in the project browser is not solved...

AFAIK EA does not support custom icons in the project browser at all.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Setting new icon / MDG file
« Reply #5 on: March 11, 2009, 07:24:05 am »
Definitely not.

I lobbied hard for this deficiency to be rectified - and suggested that custom icons also be provided for package contents - during the beta for EA 7.0. The answer was (explicitly) No.

Sigh...  :'(
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Setting new icon / MDG file
« Reply #6 on: March 11, 2009, 08:29:21 am »
Quote
AFAIK EA does not support custom icons in the project browser at all.
Quote
Definitely not.

I lobbied hard for this deficiency to be rectified - and suggested that custom icons also be provided for package contents - during the beta for EA 7.0. The answer was (explicitly) No.

Sigh...  :'(
In 7.5 it does.  You can see this in some of the built-in technologies.  (eg. BPMN)

I'm not sure if the help is accurate on this.  If you look for 'supported attribute' in the index there is a page 'Stereotype, In UML Profiles'.  This page says to use an attribute named '_icon'.  But I believe it should be named 'Icon'.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Setting new icon / MDG file
« Reply #7 on: March 11, 2009, 09:04:55 am »
Quote
...
In 7.5 it does.  You can see this in some of the built-in technologies.  (eg. BPMN)

I'm not sure if the help is accurate on this.  If you look for 'supported attribute' in the index there is a page 'Stereotype, In UML Profiles'.  This page says to use an attribute named '_icon'.  But I believe it should be named 'Icon'.
Thanks for the glimmer of hope Simon,

The EA help file for Build 841 - Compiled 2009-02-25 - gives the supported stereotype attributes pretty much as earlier builds. It looks like Roy and co. have not reached this page yet.

For reference, the _icon attribute (yes, with the leading underscore, and it is case sensitive) determines the toolbox icon only, at least in prior builds. This is probably the appropriate behavior, since the Project Browser and package contents should have separate settings that can be applied. Of course, having the same setting apply to all three is certainly better [IMHO, others may vary] than the current limitation.

I look forward to checking this out when the docs are updated.

David

Of course, I'd be delighted to get an email from any Sparxians who might want to let me know the new settings earlier...   ;)
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Setting new icon / MDG file
« Reply #8 on: March 11, 2009, 09:22:15 am »
The page I was referring to has the following line added when compared to 7.1 (confirmed in 841 help file)
AttributeMeaning
_iconContains the path to a bitmap file to be used as the Project Browser icon for all elements with the given stereotype. The bitmap must be 16x16 pixels. For a transparent background, use light grey - RGB(192,192,192).
Unless I am mistaken it should be 'Icon' instead.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Setting new icon / MDG file
« Reply #9 on: March 11, 2009, 09:53:47 am »
Simon is correct: the 'icon' attribute defines the project browser icon - the help file has been corrected. The toolbox icon is defined in the toolbox profile, since EA 7.0, and can be different to the project browser icon. For the package contents icon, I believe the plan was to use the project browser icon, but that hasn't been implemented yet, so it is still using the icon for the base metaclass.
« Last Edit: March 11, 2009, 10:35:13 am by KP »
The Sparx Team
[email protected]

floerio

  • EA User
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: Setting new icon / MDG file
« Reply #10 on: March 11, 2009, 06:14:41 pm »
Hi,

yes you where right: It was the erroneous "_" in the name. Now it works fine!  

So my two problems are solved ;-)

Thanks for your discussion!

Cheers,