Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Create Hidden Sub-Menus using the Profile Helpers

When you create items on a Toolbox page, some of them might be very similar and be based on the same type of Metaclass. For example, there are many different types of Action element and, in BPMN 2.0, you can create each type of Event element either stand-alone or edge-mounted on another element. Rather than populate a Toolbox page with every variation, you can create a 'base' Toolbox item and offer a choice of variant from a Sub-Menu, which is displayed when the base item is dragged onto the diagram but is otherwise hidden. This technique is very useful for 'disambiguating' Stereotypes that can be applied to multiple Metaclasses.

Define a hidden sub-menu

Step

Action

See also

1

If you have not already, create and display the diagram you will be using to define your toolbox, as described in steps 1 to 6 of the Create Toolbox Profiles using the Profile Helpers topic.

Create Toolbox Profiles using the Profile Helpers

 

2

Drag the Add a Toolbox Page item from the Profile Helpers toolbox page onto the diagram.  The Add Toolbox Page Dialog is displayed.

 

 

3

In the Name field, enter the name for sub-menu toolbox item; for example, MySubmenu

 

 

4

The Tool Tip field, can be left blank in this case.

 

 

5

Enable the Is Hidden check box.

The Images Only, Is Common and Is Collapsed check boxes should be left disabled.

 

 

6

After enabling the Is Hidden check box. The Icon field should become active.  You can optionally add a custom Icon image for the sub-menu toolbox item.

The icon image must be a 16x16 pixel bitmap file; for a transparent background use light grey - RGB(192,192,192).

To set the icon for the sub-menu toolbox item, click on the folder icon which is found to the right of the Icon field.  Locate the image file and click the Open button.

 

 

7

You can now add items such as elements and connectors to the sub-menu.  Click on the down arrow which is located on the right side of the Add button.  Select one of the following options:

Add Stereotype: adds a toolbox item for a stereotype which you have defined in a UML profile.  This  UML profile must have been defined in the current model, and will need to be included in the MDG technology along with the toolbox profile.  After selecting this option, the Select a Profile Element dialog is displayed. Use this to locate and select the stereotype you want to add.
Add Built in Type |:
Element: adds a toolbox item for a UML element type. After selecting this option the Create new Toolbox Item dialog is displayed.  In the Alias field, enter the label to appear on the toolbox item, then click OK.  The Select Metaclass dialog is then displayed.  Using this dialog, select the UML element type you want to add to your toolbox, then click OK.
Connector: adds a toolbox item for a UML connector type. After selecting this option the Create new Toolbox Item dialog is displayed.  In the Alias field, enter the label to appear on the toolbox item, then click OK.  The Select Metaclass dialog is then displayed.  Using this dialog, select the UML connector type you want to add to your toolbox, then click OK.
 
Add Hidden Toolbox: adds a Hidden Toolbox sub-menu item.  This option should not be used when creating the Hidden Toolbox sub-menu itself.
Add New Item: adds a toolbox item with an Alias only.  This option alone will not create a functional toolbox item.  A toolbox item added in this way must be later modified via the Toolbox Items list.

 

If you simply click on the Add button, and not the drop down arrow, this will provide the same functionality as the Add Stereotype option.

 

 

8

(Optional) After adding the toolbox item it will appear in the Toolbox Items list.  You can optionally add a custom Icon image for a toolbox item.

The icon image must be a 16x16 pixel bitmap file; for a transparent background use light grey - RGB(192,192,192).

To set the icon for a toolbox item, locate the item in the Toolbox Items list and click within the Toolbox Icon column. Click on the ellipsis (.) within this column.  The Select a Toolbox Icon dialog displays. Locate the image file and click the Open button.

 

 

9

Repeat steps 7 and 8 for each item you want to add to the Sub-Menu.  If you want to remove a toolbox item, select it from the Toolbox Items list and click on the Delete button.

Once all the appropriate Sub-Menu items have been added click on the OK button.  A Stereotype element will be added to your toolbox profile diagram.

 

 

10

Repeat steps 2 to 9 for each toolbox sub-menu you want to create.

 

 

11

The sub-menu(s) created above can now be included as an item in a toolbox page.

Create Toolbox Profiles using the Profile Helpers

 

Notes

After a Sub-Menu has been defined you can modify its properties again by right clicking the appropriate stereotype element on the toolbox profile diagram and selecting Edit with Profile Helper

Learn more