Creating a command

 

Creating a command

We are now going to create a command to generate the diagram template in our “DiagramTemplateComponent” J MDA component.

 

Steps:

1.      Select the “DiagramTemplateComponent” J MDA component.

2.      Click on the  icon in the explorer palette. The "Command to execute templates" window then appears.

3.      In the “Name” field, enter “generateDiagrams”.

4.      In the “Label” field, enter “Generate diagrams”.

5.      Click on the  icon to open the window used to select the diagram template to execute. In this window, select the “Static diagram template” template from the dropdown list, check the “Recursive launch” tickbox.

6.      In the “Operation definition” zone, enter “generateDiagrams” in the “Name” field.

7.      In the “Operation definition” zone, select “Behavior profiles.MyTemplates” in the “Profile” field.

8.      In the “Metaclass(es) to which the command applies” field, select “Package” (located in the “Objecteering UML/Metamodel” package)

9.      Click on “OK” to confirm.

 

Figure 70. Creating a command

 

For more information on creating commands, please see “Creating commands”.

 

The result of these operations is shown below (Figure 71).

 

Figure 71. The new command appears in the J MDA component's “Commands” folder