Chapter 2 Resource Editor Reference Guide


Tasks category

A task is a list of commands to be executed after generation. Commands must be referenced within the different tasks defined for generation, a command entry that is not referenced in a task entry cannot be executed.

The mechanism of command execution is the following: when a task is selected in the Tasks page of the Generation dialog box, the commands included in the task are retrieved and the template associated with the command is evaluated and executed.

Tasks appear in the Tasks page of the Generation dialog box and are executed in a well-defined order. This order can easily be modified using the Move a value up or Move a value down arrows from the Tasks page.

You must first create the command before creating the task that contains the command. In the following example, the task named Compile refers to a command named Javac (written in the Name column). The code of the Javac command is located in the Commands category.


Steps To define a task for generation:

  1. Right-click the Generation\Tasks category and select New.

    The new entry appears with a default name.
  2. Type a name in the Name box.
  3. Type a comment in the Comment box.
  4. From the Commands groupbox, click the Add commands tool and select the command(s) you want to include into the current task.

    The name of the command(s) appear in the Name column.
  5. [optional] Double-click the arrow at the beginning of the line to display the code of the command.
  6. Click Apply.

Example

Open the Java object language from Language→Edit Current Object Language, create and define a command entry named DoCommand in the Generation\Commands category:


Create a task entry named Execute in the Generation\Tasks category, click the Add Commands tool, and select DoCommand:


The new task is available in the Commands page of the Generation dialog box. The comment of the task is displayed by default. If no comment has been provided, then the name of the task is displayed.


 


Copyright (C) 2005. Sybase Inc. All rights reserved.