Navigating code references and definitions
The Breadcrumb View, shown at the top of the editor, shows the current element or attribute location within an XML or XSLT file with respect to ancestor elements. In XSLT Breadcrumbs, an identifier is often shown as well as the element name. This may be for example the
name of an
xsl:variable or the
mode of an
xsl:template. The symbol names are the same as those shown in the Outline view.
Clicking on a Breadcrumb item will show a dropdown Outline view which you can then navigate through with the mouse, touch or cursor keys.
Press (⇧⌘.) (note the 'dot' character) to select the last Breadcrumb item and open with a dropdown outline. You can then use cursor keys to navigate the dropdown outline. Alternatively, press (⇧⌘;) (note the 'semi-colon' character) to select the last Breadcrumb item without a dropdown outline. Use the (←) and (→) keys to select a Breadcrumb item or the (↓) for the dropdown outline.
You can toggle the Breadcrumbs view on/off but if the Breadcrumbs view is disabled this will also disable XML, XSLT or XPath Warnings and Errors. The Code Checker depends on the symbol name provider that Breadcrumbs invokes.
The Outline View (see right-hand panel) is a panel shown at the bottom of the File Explorer. It renders the XML or XSLT document element hierarchy as a tree, symbol names in the tree include element identifiers such as the
mode for an
Symbols in the Outline View can be sorted by position, name or category. There's also a 'Filter on Type' mode that filters the Outline View while you type in part of a symbol name.
A symbol, such as a variable or function, is defined in one location in a stylesheet file, but used in other locations. The Peek and Goto commands let you either view inline or navigate to the definition of a selected symbol.
Invoke the Peek Definition command by pressing (⌥F12) on any symbol name such as a variable or function name. This command embeds a view of the defintion inline avoiding the context-switch arising from the Goto Definition command. The inline definition view permits quick edits of the defintion also. Press (Escape) to close the definition view.
Invoke the Goto Defintion command by pressing (F12) on any symbol name such as a variable or function name. This command navigates you to the location of the symbol definition (for example, the corresponding
xsl:variable instruction), opening the containing stylesheet file in the editor group if not already open.
Goto (Peek) References/Find All References
This feature is about navigating to references to symbols, in contrast to the previous section that covers navigating to symbol definitions. The Peek and Find All commands let you either view inline or navigate through all the references (including the definition) of a selected symbol.
Goto (Peek) References
Invoke the Goto (Peek) References command by pressing (⇧F12) on any symbol name such as a variable or function name. This command embeds a view of the resolved references inline, use the cursor keys to navigate between each reference listed. The inline view permits quick edits of the reference also. Press (Escape) to close the references view.
Find All References
Invoke the Find All References command by pressing (⌥⇧F12) on any symbol. A References Panel, shown in the application Side Bar, lists all references, grouped by their stylesheet module. Use the cursor keys to move through the references and press (Enter) to open the editor in the reference location.
After navigating to a reference or definition, you can quickly navigate to the location you were in using (Ctrl-)
Use the Goto Symbol in Editor command (Shift⌘O) for a filtered quick-pick list of symbols used in the current editor. The text you enter filters the list, the (↑) and (↓) keys navigate you through the symbol list, with the current symbol item highlighted in the editor. Press (Enter) to navigate to the symbol in the current editor or (⌘Enter) to open an adjacent editor and navigate to the symbol there.