Navigate Menu

The Navigate Menu helps you navigate to particular places within the MPLAB X IDE® Project. When the cursor is in the editor window for a project open in MPLAB X, the enabled functions under the Navigate Menu are shown below. The keyboard shortcuts for these options are shown to the right of the menu selection.

Navigate Menu Option Action
Go to File... Finds and opens a specific file.
Go to Type... Finds and opens a specific class or interface.
Go to Symbol... Finds the symbol name as specified.
Go to Previous Document Opens the document last opened before the current one.
Go to Source Displays the source file containing the definition of the selected class (C++).
Go to Declaration Jumps to the declaration of the item under the cursor.
Go to Super Implementation Java specific option inherited from Netbeans grayed in MPLAB X
Last Edit Location Scrolls the editor to the last place where editing occurred.
Back Navigates back
Forward Navigates forward
Go to Line... Jumps to the specified line.
Toggle Bookmark Sets a bookmark on a line of code.
Next Bookmark Cycles forward through the bookmarks.
Previous Bookmark Cycles backwards through the bookmarks.
Next Error Scrolls the Source Editor to the line that contains the next build error.
Previous Error Scrolls the Source Editor to the line that contains the previous build error.
Select in Projects Opens Projects window and selects current document within it.
Select in Files Opens Files window and selects current document within it.
Select in Classes Opens Classes window and selects current document within it.
Select in Favorites Opens Favorites window and selects current document within it.


Keyboard:

Alt+Shift+O

Menu:
Navigate ▶ Go To File

Go to File…

The Navigate ▶ Go to File… menu item opens a window where you can search for a file name in the current project or all open projects. You may specify all or part of a file name and use the wildcards * (string of any characters) and ? (any individual character). All files that match the criteria will be displayed in a list from which they may be opened with a double click. The green fields represent hits in the active project. The file's path is displayed in the Location field at the bottom of the window.

See also Hyperlink Navigation for a quick way to open header files from a source file.

GoToFile.png


Keyboard:

Ctrl+O

Menu:
Navigate ▶ Go To Type…

Go to Type…

The Navigate ▶ Go To Type… menu item opens a dialog box where you may enter a user defined type name (typedefs, unions, structs, classes, enums, etc.). You may specify all or part of a type name and use the wildcards * (string of any characters) and ? (any individual character). A list of potential matches will be displayed where an item may be double clicked on to jump to the type definition in code. See also Hyperlink Navigation.

The case sensitivity checkbox may be enabled for case sensitive searches. The Location field contains the physical path to the file on the hard drive. The project name is displayed on the right, and files not in the project window have absolute paths displayed.

GoToType.png

See Navigator Icons for a definition of all the icons used in this window.


Keyboard:

Ctrl+Alt+Shift+O

Menu:
Navigate ▶ Go To Symbol…

Go To Symbol…

The Navigate ▶ Go To Symbol… menu item opens a dialog box where you may enter a symbol name. You may specify all or part of a symbol and use the wildcards * (string of any characters) and ? (any individual character). A list of potential matches will be displayed where an item may be double clicked on to jump to its definition in the code. The search finds any symbols, meaning functions, variables, configuration macros, and so on. Text within comments is not searched. Searching a function name returns an instance of the function declaration. Searching a configuration macro returns that macro definition in a respective header file. Searching a variable used in a function returns the variable declaration.

You may also highlight a symbol in code first, then select Navigate ▶ Go To Symbol… and be immediately presented with the list in the dialog box. See also Hyperlink Navigation.

GoToSymbol.png

See Navigator Icons for a definition of all the icons used in this window.


Keyboard:

Ctrl+` (backquote)

Menu:
Navigate ▶ Go To Previous Document

Go To Previous Document

The Go to Previous Document menu item displays the previously viewed document in the MPLAB X Editor. In the case of three files named one.c, two.c, and three.c opened in sequence, the Go to Previous Document option will first display two.c (since the focus is currently on three.c). Subsequent executions of Go to Previous Document will toggle between displaying two.c and three.c. The file one.c would not be displayed.

The Go to Previous Document menu item will not open a file that has been closed from the MPLAB X Editor. In the above example, if file two.c was closed before Go to Previous Document was executed, then the file one.c would then be displayed.

Go to Source

Displays the source file containing the definition of the selected class (C++).


Keyboard:

Ctrl+B

Menu:
Navigate ▶ Go To Declaration

Go to Declaration

The Go to Declaration menu item will be enabled when a symbol (variable, function, macro, etc.) is selected (highlighted or cursor is on it). This action will open the file containing the declaration of the selected symbol and place the cursor on the first line of the declaration. It may also be used to open header files by selecting the filename inside a #include directive.

This performs the same function as the much faster Hyperlink Navigation.

Go to Super Implementation

This is a Java specific operation inherited from Netbeans that is never enabled in MPLAB X.


Keyboard:

Alt+ OR

Menu:
Navigate ▶ Last Edit Location

Last Edit Location

The Last Edit Location option cycles through the previously edited source file locations in all open projects. The Alt+Left and Alt+Right keys cycle back and forward through the last edited locations. Last Edit Location is not active project dependent. If a source file that had changes is closed when Last Edit Location is used, it will be opened again in the active window. At least one editor window has to be open for Last Edit Location to be available. Closing and opening MPLAB X will clear the Last Edit Location history.


Keyboard:

Ctrl+G

Menu:
Navigate ▶ Go To Line…

Go to Line…

Go to Line… goes to the line number entered into the Go to Line… dialog. If the line entered is greater than the number of lines in the open file, the focus goes to the last line in the source file. Go to Line… works regardless of whether the source file line numbers are enabled in the MPLAB X Editor.

GoToLine.png


Keyboard:

Ctrl+Shift+M

Menu:
Navigate ▶ Toggle Bookmark

Editor Toolbar: Editor_Toggle_Bookmark.png

Toggle Bookmark

The Toggle Bookmark command places a blue bookmark Editor_Bookmark.png on the selected line of code to accommodate quick indexing in larger source files. The bookmarks appear in the glyph margin of the editor and the cursor may be cycled through the bookmarks with the Next/Previous bookmark options. Bookmark general appearance is shown below:

In addition to cycling through bookmarks by using the Next/Previous bookmark options, the error stripe contains gray bookmark tags which can be clicked to easily jump to bookmarks.

Bookmarks are maintained if MPLAB X and the associated source files are closed.

Bookmarks.png


Keyboard:

Ctrl+Shift+. OR ,

Menu:
Navigate ▶ Next Bookmark or
Navigate ▶ Previous Bookmark

Editor Toolbar: Editor_Next_Bookmark.png, Editor_Previous_Bookmark.png

Next Bookmark / Previous Bookmark

The Next Bookmark and Previous Bookmark menu items move the cursor to the next or previous bookmark and changes the focus of the editor window to show the bookmark.


Keyboard:

Ctrl+. OR ,

Menu:
Navigate ▶ Next Error or
Navigate ▶ Previous Error

Next Error / Previous Error

If the active project fails a compilation, then these two commands permit the user to browse through build errors. If the focus is on the Build Output Window then these commands browse the Build Output Window, but do not actually bring the cursor to the source of the error in the source code. If the focus is on the MPLAB X Editor or the Projects Window, then the cursor is moved to the offending line of code in the source when these options are selected.


Keyboard:

Ctrl+Shift+1

Menu:
Navigate ▶ Select In Projects

Select in Projects

When the focus is on a specific file in the editor window, the Select in Projects menu item opens the Projects Window and highlights in blue the filename selected within the logical project tree. The file must be included in a project for this to work as intended.

SelectInProjects.png


Keyboard:

Ctrl+Shift+2

Menu:
Navigate ▶ Select In Files

Select in Files

When the focus is on a specific file in the editor window, the Select in Files menu item opens the Files Window and highlights in blue the filename within the physical project directory.

SelectInFiles.png


Keyboard:

Ctrl+Shift+9

Menu:
Navigate ▶ Select In Classes

Select in Classes

When an identifier or header file name is selected in the Editor Window, the Select in Classes menu item will display the Classes window with the selected item highlighted. If the cursor is not in a location that can be associated with a valid class, there is no result from selecting this menu item.

SelectInClasses.png


Keyboard:

Ctrl+Shift+3

Menu:
Navigate ▶ Select In Classes

Select in Favorites

The Favorites Window enables users to access any file on a computer or network without having to create a project for the file. Files must first be added to the Favorites Window before Select in Favorites can find them. If Select in Favorites is run on a file not in Favorites, that file may be added to the Favorites Window. Once that is done, Select in Favorites will highlight the file open in the editor within the Favorites Window.

SelectInFavorites.png
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.