• No results found

Toad and Your Code

In document Toad for Oracle Guide to Using Toad (Page 122-125)

Project Manager Overview

Chapter 3: Toad and Your Code

Toad is the premier Oracle tool for working with SQL and PL/SQL. This chapter is for the more seasoned Oracle user and for the Toad user ready to learn more.

Note: Please review Chapters 1 and 2 for information that will benefit even some seasoned Toad users.

This chapter is a subset of the online help topics, arranged in a logical sequence for learning and implementation. When you are ready to learn more about a topic, consult online help.

Navigate Toad's Editor

The left pane of the Editor contains the Navigator, which lists statements, objects or package contents contained in the Editor.

To access or hide the Navigator

» Right-click the Editor and selectDesktop | Navigator.

The list is displayed in a hierarchy, with each element broken out separately.

If you want to hide some of these elements, you can right-click the hierarchy and select Navigator Options.

The reload object options give you an easy way to synch your PL/SQL source with objects also existing on the database.

You can reload objects in one of several ways. To reload an object from the Navigator

1. In the Navigator, select the object you want to reload. 2. Right-click and select Reload Object.

To reload all objects from the Navigator

1. In theNavigator, select the object you want to reload. 2. Right-click and select Reload All Objects.

To reload from the Toolbar

1. Place your cursor in the object in the Editor that you want to reload. 2. Click on the toolbar.

Using the Navigator Panel To display the entire statement

» Hover the pointer over an item in the Navigator. Information about it is displayed as a tooltip.

To jump to the statement

» Click on the statement in the Navigator and the cursor jumps to that point in the Editor. To refresh the navigator panel

» Do one of the following:

l Save the current file

l Click theRefresh button. To sort statements

» SelectSortto sort the tree alphabetically.

In the Editor, you can configure the Navigator panel to only display declarations that you want to see. In addition, you can change the look of the panel to suit the way you work. See "The left pane of the Editor contains the Navigator, which lists statements, objects or package contents contained in the Editor. " (page 122) for more information about the navigator panel.

To access the Configure Navigator Panel

» From the Navigation Panel, right-click and selectNavigator Options. On the General tab:

l Initial Node Expansion - In this area you can choose how the hierarchy is expanded when

first opened. You can choose to expand to one level, all levels, or no levels.

l Lower-case text - With this option selected, declarations display in lowercase. If it is

not selected, they display in uppercase. Lowercase takes up less screen space.

Default: Selected

l Sort - When this option is selected, declarations are sorted alphabetically within the

hierarchy. Unselected, declarations display in the same order they are declared in the code.Default: Cleared

l Font - Click theFontbutton to select the font you want to use in the Navigator tree.

On the Statements tab:

l In the Statements area, you can select the items you want to display in the navigator. By

default, all statement types are included. These include packages, package bodies, functions, SQL*Plus, anonymous blocks, and so on. In addition, you can rearrange the order in which they are displayed in the tree structure.

l To rearrange the tree structure:

o Click the item you want to move.

o Click the Up or Down button to move it up or down in the display. On the PL/SWL Components tab:

l In the PL/SQL Components area, you can select the PL/SQL items you want to display in

the navigator. By default, all types are included. These include constants, exceptions, subtypes, cursors, ref cursors, local subprograms and so on. In addition, you can rearrange the order in which they are displayed in the tree structure.

o Click the item you want to move.

o Click the Up or Down button to move it up or down in the display. Beside the tree structure area are several other options you can use to configure your Navigator Panel.

Include parameter direction Declarations displays differently if the parameter is an input or output parameter. If this is selected, labels on the tree will take up a bit more room.

The default is selected.

Include Datatype When this option is selected, the datatype is displayed beside the declaration.

Use bookmarks to help you manage files. They mark a position within the Editor so that you can easily jump back to that line. You can set up to ten separate bookmarks within one Editor. Note:All keystrokes assume you have not altered the default Editor keys.

To set a bookmark

» Right-click and selectToggle Bookmark | Bookmark#(CTRL+SHIFT+# where # is a number between 0 and 9).

The bookmark number displays in the Editor gutter. To clear all bookmarks

To clear one bookmark

» Right-click and selectToggle Bookmark | Bookmark#(CTRL+SHIFT+# where # is a previously defined bookmark between 0 and 9).

To jump back to a bookmark

» Right-click and selectGo to Bookmark(CTRL+# where # is a previously defined bookmark between 0 and 9).

Note:The # must be called from the number row on the keyboard. Using the Number pad will not call the bookmark.

There are several ways to move between tabs in the Editor. To move between tabs:

» Do one of the following:

l Click the tab you want to open.

l PressALT+PageUporALT+PageDownto cycle through them.

l If you have opened them using theCTRL+Clickfunctionality within the

Editor, click the navigation buttons in the Editor toolbar and select either scroll forward and back through them in the order they were opened, or select from a drop-down order.

In document Toad for Oracle Guide to Using Toad (Page 122-125)