Book a Demo

Author Topic: Profiles - optical and usability issues  (Read 3699 times)

csoltenborn

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Profiles - optical and usability issues
« on: September 13, 2020, 06:46:24 pm »
Hi,

I have created a stereotype which extends uml::Requirement and adds some attributes, and I have created an according toolbox for my profile. Everything works fine so far, but a couple of things bother me when using my technology:

  • In the Property view, the section with my stereotype's attributes are titled "<<my stereotype>> (from My Profile)". Is there a way to customize that title? I have seen _tagGroups and such, but that creates subsections within my stereotype's attribute section...
  • In the toolbox, the icon of my stereotype is the stereotype icon. However, I would like to have the icon of the extended element (uml::Requirement). Any way to customize the icon despite providing an own icon file?
  • My toolbox page is only displayed when manually showing it. I know that the tools can be pinned, but that obviously does not scale if the number of extensions in the profile increases. Is there any way to e.g. associate tools with existing diagrams? In a perfect world, I would be able to configure EA to only show my tools, but hide the standard EA Requirements tools for Requirement diagrams without defining own diagram types...

Thanks
Christian

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Profiles - optical and usability issues
« Reply #1 on: September 13, 2020, 07:02:38 pm »
I can only comment on 3. Assigning toolboxes to diagrams is the basic use case. You do that be adding a toolbox property to the metaclass of the diagram and use the toolbox name as Initial value (broken design, but that's EA).

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Profiles - optical and usability issues
« Reply #2 on: September 13, 2020, 07:48:35 pm »
1. No, that the standard way of showing stereotype properties. This works like that for any technology.
2. I think you can also define an icon in the toolbox entry. Not sure why you would want that though. It seems logical to use the same icon for the toolbox and for the project browser. Anything else would seem confusing to me.
3. Either create a diagram type as qwerty suggested, or you can also "override" a standard toolbox with your own toolbox. The description on how to do that exactly is in the manual (I don't remember exactly)

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Profiles - optical and usability issues
« Reply #3 on: September 14, 2020, 07:27:18 pm »
Hello,


2. I think you can also define an icon in the toolbox entry. Not sure why you would want that though. It seems logical to use the same icon for the toolbox and for the project browser. Anything else would seem confusing to me.

You must be very confused by EA's built-in toolboxes then. They use different icons for the browser and the toolbox all over the shop.
It's obvious in activities, but it's the same with classes, interfaces, etc etc.

The stereotype icon <<>> should only ever be seen in the "Profile" toolbox. If it shows up in a toolbox from your technology, that's EA's way of telling you you've messed something up. Probably the icon file you're referring to couldn't be found or is in the wrong format. I believe EA prefers PNG for browser icons, and BMP for toolbox icons.

There are two icons associated with a stereotype: the browser icon, and the toolbox icon.

In a custom stereotype, if you specify an icon attribute in the «stereotype» class, that will be used in both the browser and the toolbox. If you don't specify an icon, the defaults will be used.

If you want a different icon in the toolbox, like EA encourages, it's a bit of a mess. Actually, it's a lot of a mess.

Firstly, you can add an icon attribute to the «stereotype» class of the toolbox, ie one that extends ToolboxPage. However, this applies to the whole toolbox page, not to an individual element or connector in it. So it really only works for "hidden" toolbox pages, which show just a single element/connector in the toolbox but then pop a menu in the diagram when the user would normally place the new element.

What you instead need to to is introduce a new «metaclass» class to the toolbox profile and name it ToolboxItemImage. You'll have to create it manually as I recall, it's not in the toolbox nor in the metaclass selection dialog. It should not have any attributes.

You then create one «stereotype» class for each element, stereotype or pattern where you want to specify the toolbox icon. This class must be named FQStereotypeName(FQMetatypeName). For a custom profile MyProfile with a stereotype mystereotype which extends a UML activity, this would be "MyProfile::mystereotype(UML::Activity)". It's the same as the name of the attribute in the toolbox page class. (So for patterns you specify not the profile name but the technology ID as the first part of the name.)

This «stereotype» class should have only an icon attribute, which specifies the path to the toolbox icon.
All these extra elements go into the same toolbox profile, but have no connectors to any of the elements in there. Depending on how you work, you might put them in a separate diagram but they do need to be part of the same "published" toolbox profile.

For completeness, if you are working with "hidden" toolbox pages, it's a little messier still.
For those, the icon attribute should go in the toolbox page «stereotype» classes as I mentioned. This means that those classes must extend ToolboxItemImage in addition to extending ToolboxPage.

The messiest case is where you want a toolbox-specific icon for a "hidden" toolbox (which becomes the popup menu) and you also want toolbox-specific icons for the menu items. In this case, you must add the icon attribute to the toolbox page class and have it extend ToolboxItemImage, and you must also add a separate icon-only «stereotype» class for each menu item, also extending ToolboxItemImage.

If you are working with "hidden" toolboxes they should contain toolbox icons instead of browser icons (where those differ), because that's how EA does it.

So that's how to add custom toolbox icons. If you want to use custom browser stereotypes, but default toolbox stereotypes, the problem is that the toolbox will use your browser icon, and the toolbox images for the built-in stereotypes are not published anywhere.

One way of getting around this would be to capture the images you want from EA using whatever image-capture program you prefer, and then include them in the toolboxes as I've described. But this might well violate the license agreement.

Phew! You read all that? :)

HTH,


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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Profiles - optical and usability issues
« Reply #4 on: September 14, 2020, 07:38:09 pm »
The format I use for toolbox/project browser icons is a .bmp of 16x16 pixels.

The "magic transparent color" is R=192 G=192 B=192

Geert