Code Navigation (IDE Tutorial)

From RAD Studio
Jump to: navigation, search

Go Up to The Code Editor Index (IDE Tutorial)


To easily navigate in the Code Editor, use one of the following methods.

Method Hopping

You can navigate between methods using a series of editor hotkeys. You can also limit hopping to the methods of the current class by setting class lock.

For example, if class lock is enabled and you are in a method of TComponent, hopping is only available within the methods of TComponent. The keyboard shortcuts for Method Hopping are as follows.


Keyboard shortcut Effect

CTRL+Q followed by L

toggle class lock

CTRL+ALT+UP_ARROW

move to the top of the current method

CTRL+ALT+DOWN_ARROW

move to the next method

CTRL+ALT+HOME

move to the first method in the file

CTRL+ALT+END

move to the last method in the file

CTRL+ALT+MOUSE WHEEL

scroll through methods


Table 2-1. Method Hopping keyboard shortcuts

Bookmarks

Bookmarks provide a convenient way to navigate through long files. You can mark a location in your code with a Bookmark and jump to that location from anywhere in the file.

You can use up to ten Bookmarks, numbered 0 through 9, within a file. To toggle a Bookmark at the current line, press CTRL+SHIFT+digit.

When you set a Bookmark, a book icon Bookmark.png is displayed in the left gutter of the Code Editor, as in the following illustration.


TutorialIDEFig2-19.png

Figure 2-19. Setting Bookmarks in the source code

Note: These bookmarks refer to the Toggle Bookmarks, to see a different type of bookmarks visit Stack Bookmarks.

Finding Classes

Use the Search > Find Class command to see a list of available classes that you can select. If you double-click a class, the IDE automatically navigates to its declaration.

Finding Units

If you are using the Delphi language, you can use the Refactor > Find Unit command to locate and add units to your code file. As you type the class name, the list of units that match it is updated. See Find Unit for more information.

Next

Formatting Source Code