Book a Demo

Author Topic: Icon attribute for stereotype in a profile  (Read 16771 times)

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Icon attribute for stereotype in a profile
« on: November 06, 2009, 12:31:31 am »
Hi All

Page 1483 of the current version of the EA User Guide states for the icon attribute of a stereotype element in a profile:

Contains 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).

I have created such an icon for my profile and set the icon attribute accordingly.

When I import and use the profile, the icon appears just fine in the Toolbox, but not in the Project Browser (which displays the icon of the metaclass instead)

I used the profile toolbox and created the element from the profile toolbox.

Am I missing something?
Models are great!
Correct models are even greater!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #1 on: November 06, 2009, 10:40:18 am »
Phil,

It sounds like you are loading your profile into the Resources window. Project browser icons only work if the profile is part of an external MDG technology. By "external" I mean one that is deployed externally to EA on either the file system or a URL and loaded at start-up.  

So what you need to do is run the Technology Wizard (Tools > Generate MDG Technology File) to create a technology that has your profile in it, go to Settings > MDG Technologies and make sure that the folder your new technology is in is included (click Advanced, Add and Add Path), remove the profile from the Resource tree, and restart EA.

Hope that helps

br;kp
The Sparx Team
[email protected]

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #2 on: November 06, 2009, 08:14:35 pm »
Thanks KP, I have made the profile part of a MDG using the MDG Wizard and MTS technology, I can confirm there is no profile in the resources. Same result I am afraid. I am using the latest build 7.5.850

For my profile project I have created a profile for the stereotype and a profile for the MDG toolbox, all following the well documented pages in the User Guide.
Models are great!
Correct models are even greater!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #3 on: November 09, 2009, 10:13:16 am »
Have you named the attribute "icon" with a lower case 'i'? It's possible it's case-sensitive, and my working examples all have "Icon" with an upper case "I".

If that's the problem, it's a bug that needs fixing. If it's not the problem, I would need to see the technology XML file to figure out the problem. Can you e-mail support please with either the technology file or bug report please? Thanks.
The Sparx Team
[email protected]

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #4 on: September 16, 2010, 08:53:45 am »
same issue here.

new icon only appears in the toolbox not in the project browser.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #5 on: September 16, 2010, 09:01:32 am »
After further investigation, it appears that the icon only appears in the project browser tree if you have defined the _metatype attribute for your stereotype. Search for "_metatype" in the help for more info...
The Sparx Team
[email protected]

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #6 on: September 16, 2010, 05:59:53 pm »
Works but the icon is only displayed if the .eap file is closed and reopened
or the properties of the element with the custom icon is opened and closed. ( the element is added via code )

i tried refresh and update on the element but nothing happens.
if the element is dragged from the toolbox the icon is displayed correctly.
Is there any way to refresh the project browser oder whatever is needed to show the icon correctly?

Stao

beginner

  • Guest
Re: Icon attribute for stereotype in a profile
« Reply #7 on: September 21, 2010, 05:26:31 am »
I have a similar issue with glossary (and something else I currently can't recall). When you add glossary elements (via the EAUI Import or two different (!) maintenance dialogues), they are not available immediately but only after you close/reopen EA. The "solution" suggested by Sparx is to call glossary.update before retrieving a glossary element.

This completely nuts. Why isn't EAUI calling update after the user changes?

But only one of the million quirks we users have to live with. I have seen similar "solutions" in other products. Probably it's always (no, honestly, in most times...) the user which is wrong.

b.
« Last Edit: September 21, 2010, 05:28:15 am by beginner »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #8 on: September 21, 2010, 09:03:57 am »
I came across custom stereotype icons not being displayed immediately in the tree recently.  It is an issue, although a relatively minor one.

Beginner, has it occurred to you that you are hijacking other people's threads with negativity that is unrelated to their question?

The problem you have cited is that your automation object has been initialized from the data in the repository when it was created.  After that EA expects EA to take responsibility for it as there are essentially no limits to the instances of those objects that automation clients may have created.

beginner

  • Guest
Re: Icon attribute for stereotype in a profile
« Reply #9 on: September 21, 2010, 09:19:22 pm »
Simon,
I was just linking to stao's reply which seems to be a related "EA does not handle its data correctly for close/open is necessary". So it's not really a hijack. I think that many of the open bugs link to each other. This is the only place we have for a trace. So to answer your question: not in particular. Maybe you can give me a count for hijacks as you seem to have done so.

<oracle>
Further, it looks like you ask me to stop posting negative things about EA. In that case I would also once again stop posting positive things. Looking at my stars it anyway seems I'm not too helpful. But I account that the wisdom of the aged which has never been seen positive by young grasshoppers.

The star of EA is rising still and you will definitely stay in the list of global players. But one day there will be a different, better (in which respect ever) product. And you know what happens to sparks.

You might add this part to the hijack counter.
</oracle>

b.

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: Icon attribute for stereotype in a profile
« Reply #10 on: September 22, 2010, 08:54:58 am »
I don't think he ever said he had a problem with negativity, he was talking about negativity unrelated to the problem at hand (aka negativity for negativities sake).

As far as I can tell we've NEVER made a move to censor people's opnions of the product as long as I've been around. If you want to vent, then that's your right, what Simon is saying is that it belongs in its own post.
« Last Edit: September 22, 2010, 09:04:46 am by mfraser »
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

beginner

  • Guest
Re: Icon attribute for stereotype in a profile
« Reply #11 on: September 22, 2010, 04:33:19 pm »
Michael,
I think I understood that. I have never been trying to poor to much salt in open wounds and my "there's something else which is negative" was always somehow related to another issue in the post. In future I will try to not post anything related negatively to a reply in the post, but only - if so - to the original post.

But I have to repeat myself: correct the open issues and I'll shut up immediately.

b.
« Last Edit: September 22, 2010, 04:37:58 pm by beginner »