Navigation Menu in the MPLAB® X IDE IDE Editor
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 IDE, 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 | Oracle® Java specific option inherited from Netbeans grayed in MPLAB X IDE |
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 backward 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. |
Go to File...
Navigate ▶ 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 the "Hyperlink Navigation in the MPLAB X IDE Editor" page for a quick way to open header files from a source file.
Go to Type...
Navigate ▶ 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 the "Hyperlink Navigation in the MPLAB X IDE Editor" page.
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.
See the "Navigator Icons for the Navigation Menu in the MPLAB X IDE" for a definition of all the icons used in this window.
Go To Symbol...
Navigate ▶ 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 the "Hyperlink Navigation in the MPLAB X IDE Editor" page.
Go To Previous Document
Navigate ▶ Go To Previous Document
The Go to Previous Document menu item displays the previously viewed document in the MPLAB X IDE 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 IDE 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++).
Go to Declaration
Navigate ▶ 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.
Last Edit Location
Navigate ▶ Go To File
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 IDE will clear the Last Edit Location history.
Go to Line...
Navigate ▶ 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 IDE Editor.
Toggle Bookmark
Navigate ▶ Toggle Bookmark
The Toggle Bookmark command places a blue bookmark 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 IDE and the associated source files are closed.
Next Bookmark
Previous Bookmark
Navigate ▶ Next Bookmark or
Navigate ▶ 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.
Next Error
Previous Error
Navigate ▶ Next Error or
Navigate ▶ 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 IDE Editor or the Projects window, then the cursor is moved to the offending line of code in the source when these options are selected.
Select in Projects
Navigate ▶ 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.
Select in Files
Navigate ▶ 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.
Select in Classes
Navigate ▶ 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.
Select in Favorites
Navigate ▶ Select In Classes
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.
Go to Super Implementation
This is a Java specific operation inherited from Netbeans that is never enabled in MPLAB X IDE.