Finding references to code elements

The Find References action in the editor locates occurrences of selected language elements. When you select an element in the code, other instances are displayed in the Search results view and highlighted in the editor. A reference is defined as any matching symbol not in a comment or string. Keywords and built-in functions do not appear as references. The matches are determined by the context of the symbol. Internal routines match to their calls. Stems match to other stems. Simple symbols match to other simple symbols. Constant symbols match to other constant symbols. For compound symbols, the tail is broken into separate pieces, delimited by its periods, and matched to other constant or simple symbols. The derivation and scope of a symbol is not considered.

  1. In the file, highlight the code element for which you want to locate other occurrences and right-click.
  2. Select Find References or click Ctrl+Shift+G (Windows) or ⌘+Shift+G (macOS). The Search view displays the found occurrences in the file.
  3. To locate the occurrence in the file, double-click in the code element Search view.
Limitations:
  • The line number displayed next to each Search view result is one less than its corresponding line number in the source file. The text editor line numbers start at one, while the Search view line numbers start at zero.
  • If the parser encounters an unrecoverable error, it might not return all references. No nodes from the point of failure to the end of the file are added to the parse tree, and therefore they are not added to the results view.
  • Search results in Show as List format show the number of matches and not the content of the matches.
  • The END keyword defined as a variable does not appear as a reference.
  • Files that are opened from the Git Repositories view and are not contained in an Eclipse project show references incorrectly. Additionally, if you click the references in the Search view, they are not opened in the editor.