Hyperlink Navigation

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.

HeaderFile1.png
Click image to enlarge.

The file referenced in the #include directive should open immediately in the editor.

HeaderFile2.png
Click image to enlarge.

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.

FunctionDefinition1.png
Click image to enlarge.

If the function is defined in a different file, it will be opened automatically. The editor will display the definition of the function and place the cursor at the beginning of the function's header, which is highlighted in light blue.

FunctionDefinition2.png
Click image to enlarge.

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.

FunctionDeclaration1.png
Click image to enlarge.

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.

FunctionDeclaration2.png
Click image to enlarge.

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.

VariableDeclaration1.png
Click image to enlarge.

If the variable is declared in a different file, it will be opened automatically. The editor will display the variable declaration which is highlighted in light blue, placing the cursor at the beginning of the line.

VariableDeclaration2.png
Click image to enlarge.

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.