Example: Adding a Generation Command and Task

In this example, we will add a generation command and associated task to the Java object language

  1. Create a new OOM for Java, and then select Language > Edit Current Object Language.
  2. Expand the Generation category, and then right-click the Commands category and select New.
  3. Name the command DoCommand and enter an appropriate template:


  4. Right-click the Tasks category and select New. Name the task Execute, click the Add Commands tool, select DoCommand from the list, and then click OK to add it to the new task:


  5. Click OK to save your changes and return to the model. Then select Language > Generate Java code to open the Generation dialog, and click the Tasks tab. The new task is listed on the tab under its comment (or its name, if no comment has been provided):