Chapter 4 Extending your Models with Profiles


Creating a template

Templates can be created in the Shared category when they apply to all metaclasses. They can also be created at the metaclass level or for a given stereotype or criterion.

Note   Binding a template to a stereotype
Previously, you would bind the use of a particular template to a stereotype using the template name <<stereotype>> syntax. Now, you create the template beneath the stereotype in the profile.

Browse tool (F12)

You can use the Browse tool to find all templates of the same name. To do so, open a template, position the cursor on a template name in-between % characters, and click Browse (or F12). This opens a Result window that displays all templates prefixed by their metaclass name. You can double-click a template in the result window to locate its definition in the resource editor.

Steps To create a template:

  1. Right-click a metaclass, a stereotype, or a criterion and select New→Template to create a template.
  2. Enter a name in the Name box. We recommend that you do not use spaces in the name.
  3. [optional] Enter a comment to explain the use of the template.
  4. Enter the template body using GTL in the central box.

 


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