Chapter 6 Managing Objects


Previewing the code of an object

You can preview the code of an object in order to see its generated code by clicking the Preview tab in the object property sheet.

It is a quick and easy way to apply modifications to your code and update the model.

You can use the following tools and keyboard shortcuts from the Preview toolbar. Some tools may be grayed-out depending on the object property sheet you open:

Tool Description Keyboard shortcut

Open Editor Contextual Menu Shift + F11

Edit With contextual menu. This allows you to select an editor for the script ctrl + E

Refresh F5

Select generation targets. This tool is available when at least one extended model definition flagged for generation is linked to the model and when it contains GeneratedFiles entries for the current object. When available, it displays the list of targets for the current object. If you add a generation target, the corresponding tab is added to the Preview tab. If you deselect a generation target, the corresponding tab disappears from the Preview tab ctrl + F6

Show generation options. If you select the Show Generation Options tool when available, the Generation Options dialog box is displayed. You can change generation options from this dialog box and see the impact on the code ctrl + W

Ignore generation options. If you click the Ignore Generation Options tool when available, the preview ignores generation options selected by using the Show generation options tool but uses a predefined set of options ctrl + D

Script bookmarks

In the Preview tab, you can add and remove bookmarks at specific points in the code and then navigate forwards or backwards from bookmark to bookmark:

Keyboard shortcut Description
ctrl + F2 Adds a new bookmark. A blue bookmark box is displayed. If you repeat this action from the same position, the bookmark is deleted and the blue marker disappears
F2 Jumps to bookmark
shift + F2 Jumps to previous bookmark

Note that bookmarks are not printable and are lost if you use the Refresh, or Show Generation tools.

For more information on how the Preview tab is used in the different modules, see their respective user's guide.

Steps To preview the code of an object:

  1. Double-click an object in the diagram to display its property sheet.
  2. Click the Preview tab to preview the code.
  3. Click OK.

 


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