Navigation Features

The following features help you to navigate through Desktop Studio code.

Navigation Using Code Map

The Code Map tool window in the Editor perspective displays the code structure of the script or the XML block being edited in the code editor that has the focus.

It lets you:

  • Navigate to the code from the code map by selecting the desired map entry. The code editor automatically scrolls to the first line of the corresponding code block.

  • Navigate from the code to the code map by right-clicking within the code editor and selecting Show in code map from the context menu. The code map tree automatically scrolls to the corresponding map entry and selects it.

Script Code Map

The tree displays all the functions coded in the script, including the callback functions:

  • Scenario

  • Step

  • Event handler

  • Function

  • Callback

XML Block Code Map

The tree displays XML nodes, depending on the XML block being edited:

Edited Block

XML Nodes Displayed

SCENARIO

Scenario, steps, step, handler

ACTIONS

ACTION

EVENTS

EVENT

CONTEXT

STRUCTUREDON

Other blocks

First-level child nodes

Navigation Using Bookmarks

Bookmarks are navigation marks that can be set anywhere in the code. Setting a bookmark on a line of code makes it easy to return to this line later.

Manage Bookmarks

To set a bookmark on a line, put the cursor anywhere in the line and click the button in the navigation toolbar. A bookmark is set and is displayed in the code editor margins. If a bookmark is already set on the line, it is removed when you click the icon.

You can also remove all bookmarks by opening the dropdown for the bookmark icon and clicking Clear All Bookmarks.

Navigate to a Bookmark

The Bookmarks tool window in the Editor perspective displays all the bookmarks in the current project. By double-clicking an entry, you can navigate directly to the selected line in the script file or XML block.

You can also navigate between bookmarks using the navigation toolbar:

  • To navigate to the next bookmark, select the option from the bookmark dropdown or press F2.

  • To navigate to the previous bookmark, select the option from the bookmark dropdown or press SHIFT + F2 .

Navigation Using To Do Items

To do items help you set reminders in the code.

Manage To Do Items

To set a to do item in a script or an XML block, simply type a comment line containing the word TODO. When saved, the corresponding line is shown like this:

To remove a to do item, simply remove the word “TODO” and save.

Navigate to a To Do Item

The To Do List tool window of the Editor perspective displays the to do items in the current project.

By double-clicking an entry, you can navigate directly to the corresponding line in the script file or XML block.

Navigation Using Navigation History

Desktop Studio stores all the navigation actions in a navigation history. This lets you navigate backwards and forwards within this history.

Navigation History

Desktop Studio stores a navigation point every time:

  • You navigate using the navigation methods described

  • You navigate from one document to another (see The Editor Perspective)

Navigate Backwards and Forwards

You can navigate within the history using the navigation toolbar:

  • To navigate backwards, click the button

  • To navigate forwards, click the button.

Navigation Using Goto Definition

Desktop Studio lets you navigate from a code editor to a statement definition.

The meaning of the term statement definition depends on the statement. A statement is:

  • The application/page/item definition, for an application/page/item name

  • The function implementation, for a function name.

To navigate from a code editor to a statement definition:

  • Right-click the statement and select Goto Definition from the context menu

  • Or move the caret to the desired statement and press F12

Depending on the respective statement, you automatically navigate:

  • To the application/page/item definition in the Explorer perspective if the statement is an application/page/item name

  • To the function implementation in the Editor perspective if the statement is a function name

Code Tree Tool Window

The Code Tree tool window in the Editor perspective displays the JavaScript parsing tree of the script currently being edited in the code editor that has the focus.

It is available for internal development purposes only.