Skip to end of metadata
Go to start of metadata

Code Navigation

Servoy features several options for navigating and searching for code resources. These include the default IDE navigation and search buttons on the toolbar, as well as Script Editor-specific toolbar and context menu items. This section addresses the navigational features found in Script Editor. For a discussion on general search and navigational features, see Navigating Servoy Developer.

Navigating within a JavaScript File

The following tools allow users to easily find and jump to items within an open JavaScript file.

  • Toggle Mark Occurrences (1)
  • Next and Previous Annotation (2)
  • Quick Outline
  • Quick Diff 

  1. Toggle Mark Occurrences highlights every instance of a selected item within the open editor window. To use this function, click on the item to highlight, then click on the Toggle Mark Occurrences button.

    Tip

    To jump to each occurrence, customize the Next/Previous Annotation drop-down, discussed below.

  2. Next Annotation (CTRL+.) and Previous Annotation (CTRL-SHIFT-.) allows users to navigate to items with annotations (cautions, error warnings, etc.) in the open editor window, allowing users to jump from one annotation to the next. To customize the type of annotations to include in the navigation, use the dropdown menu next to either annotation icon (see image below).

    Note:

    Items selected in the drop-down will apply to both next and previous annotation (even though each button has its own drop-down)

    Tip:

    The vertical ruler and outline bar gives a visual guide to locations of annotations via icons that can be customized in Preferences.

  3. Quick Outline (CTRL-O) overlays a small window listing the active JavaScript document outline. You can then double-click on an outline item to jump to that item within the script.
  4. Quick Diff is a feature on the vertical ruler that highlights differences in code relative to a reference source (usually used in team development, see Team Development chapter). Hovering over a Quick Diff marker in the ruler overlays a window showing code differences.

Navigating from the Script Editor

The following navigational tools are accessible via the Script Editor context menu to locate resources outside of the open JavaScript file:

  • Open Declaration (F3, fn F3) shows a selected item in Form Editor.
  • Open Call Hierarchy (CTRL+SHIFT+H, option+cmd+h, ctrl+option+h) shows where a selected function is called in a results window at the bottom pane.
  • Show In (CTRL+OPTION+W, option+cmd+w) highlights relevant item in the selected view: Solution Explorer, Navigator, Script Explorer, Outline, and Properties. The keyboard shortcut reveals the context menu listing these view options.
  • No labels