Hyperlink Navigation is a powerful feature of the MPLAB® X Editor for getting around source files and projects. Its primary capabilities include:
- Find the definition of a variable, function, or macro, whether it is in the current soruce file or somewhere else in the project.
- Open files directly from #include directives.
Step-by-Step
To use hyperlink navigation, hold down the Ctrl key on a PC or (?) key on a Mac. Then hover the mouse pointer over an identifier (variable name, function name, macro label) or the filename of a #include directive. The text below the mouse pointer should turn into a blue hyperlink. Clicking on the hyperlink will perform one of several possible actions depending on what the link represents:
- If the link is a filename (header file) in a #include directive, the header file will be opened. This works both for your own header files in your project as well as system header files provided with the compiler and its libraries.
- If the link is a variable name, function name, or macro label and they are defined somewhere in the project's source code, you will be taken to the file where they are defined and the cursor will be placed on the first line of the definition.
- If the link is a function name which is defined in a library (object code only, no source code available), you will be taken to the file where its function prototype is declared and the cursor will be placed on the first line of the declaration.
1.1
Example: Opening a header file
Hold down the Ctrl key and hover the mouse pointer over the file name in an #include directive.
The file name should turn into a clickable hyperlink. Click on the link.
1.2
Example: Finding a function's definition (source available)
Hold down the Ctrl key and hover the mouse pointer over a function name.
The function name should turn into a clickable hyperlink. Click on the link.
1.3
Example: Finding a function's declaration (no source available)
Hold down the Ctrl key and hover the mouse pointer over a function name.
The function name should turn into a clickable hyperlink. Click on the link.
If the function is declared in a different file, it will be opened automatically. The editor will display the function prototype which is highlighted in light blue, placing the cursor at the beginning of the line.
This is generally what will happen when using a precompiled library where the function prototype is available in a header file while the function definition is in an object file format so its source cannot be displayed.
1.4
Example: Finding a variable's declaration
Hold down the Ctrl key and hover the mouse pointer over a variable name.
The variable name should turn into a clickable hyperlink. Click on the link.