Chapter 4 Managing Profiles


Adding a metaclass to a profile

Depending on the type of resource file you are working on, the list of pre-existing metaclasses can change in the Profile category.

The procedure for adding a metaclass requires selecting items among a wide range of existing PowerDesigner metaclasses. In the Selection dialog box, you can use the Modify Metaclass Filter tool to display all, concrete or abstract conceptual metaclasses in the selection list.

For more information on the PowerDesigner metamodel, see the "PowerDesigner Public Metamodel" chapter.

Code naming convention

All concrete metaclasses having a name and a code display a code naming convention list. The code naming convention allows you to select a name to code conversion script for all instances of the selected metaclass. The process automatically converts names into codes with the selected naming convention, provided the Enable name/code conversion check box is selected in the naming conventions tab.

You can select among the following conversion scripts:

Code naming convention
Description
firstLowerWord First word in lowercase, then other first letters of other words in uppercase
FirstUpperChar First character of all words in uppercase
lower_case All words in lowercase and separated by an underscore
UPPER_CASE All words in uppercase and separated by an underscore

When you select a code naming convention, the conversion script is displayed as a parameter in the conversion script page of the Model Options dialog box whenever you change the target of the current model or when you create a new model.

For more information on conversion scripts and naming conventions, see the ".convert_name & .convert_code macros" section in the "Managing Models" chapter in the General Features Guide .

Enable selection in file generation

When you add a metaclass in a profile, you can select the Enable Selection in File Generation check box in order to have the corresponding metaclass instances appear in the Selection tab of the extended generation dialog box. If a parent metaclass is selected for file generation, children metaclasses also appear in the Selection tab.

Steps To add a metaclass to a profile:

  1. Right-click the Profile category and select Add Metaclasses in the contextual menu.

    The Metaclass Selection dialog box is displayed.
  2. Click the appropriate tab to display the tab containing the metaclass you want to select.

    You can use the filter tool to display the metaclass you want to add to the profile.
  3. Select one or several metaclasses.
  4. Click OK.

    The categories corresponding to the selected metaclasses appear under the Profile category. The name and parent of the metaclass cannot be modified.
  5. (optional) Select or clear the Enable Selection in File Generation check box.
  6. (optional) Type a comment in the Comment box.

    Note   Add parent metaclass
    If the parent metaclass does not appear under Profile, when you click the Properties tool beside the Parent metaclass, a message is displayed to let you automatically insert the metaclass folder under Profile


 


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