Previewing the Code of an OOM

You can preview the code of a model or package in order to see the generated code, by clicking the Preview tab. The displayed code changes according to the object language you have selected in your model.

For example, if you have created EJB or servlet components in Java, the Preview tab displays the EJB or Web deployment descriptor files. If you have selected an XML family language, the Preview tab displays the Schema file that corresponds to the XML file to be generated.

You can use the following tools and keyboard shortcuts from the Preview toolbar:

Tool

Description

Keyboard shortcut



Open Editor Contextual menu

Shift + F11



Refresh

F5



Show Generation Options

ctrl + W



Select Generation Targets

ctrl + F6

Showing Generation Options

If you click the Show Generation Options tool, the Generation Options dialog box is displayed. You can change generation options from this dialog box.

Select Generation Targets

When available, this tool displays the list of target extended model definitions selected for generation. 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. This tool is disabled if no target extended model definition is attached to the model.

For more information on the generation targets, see Working with Generation Targets.

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 Options tools.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com