Finding Definitions and References


Find Definition and Find References are available through the Mathematica code popup. They both use an efficient indexing system to search through your files. The index is updated as files are modified or changed.

Find Definition

This allows you to find the definitions of Mathematica functions and messages in your code. Select the name of a function (or message) that appears in your code, pull down the menu, and choose Find Definition. This will search for the definition in all Mathematica .m files in your workspace. If definitions are found in more than one project, it will choose the one in the project from which you carried out the search.

When you have gone to the definition of a function, you can return to where you were by using the back button, Edit Back, found on the editor toolbar.

If you hold the Ctrl key down as you move the cursor over a function name, it appears as a hyperlink (on a Macintosh use the Command key). If you then click you will be taken to the definition. An example of a function name appearing as a hyperlink is shown below.

Find References

This allows you to find all uses of a function in your code. Select the name of a function (or message) that appears in your code, pull down the menu, and choose Find References. This will search for uses of the function in all Mathematica .m files in your workspace. A typical search result window is shown below.