Navigate Menu

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

Navigate Menu OptionAction
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 DocumentOpens the document last opened before the current one.
Go to SourceDisplays the source file containing the definition of the selected class (C++).
Go to DeclarationJumps to the declaration of the item under the cursor.
Go to Super ImplementationJava specific option inherited from Netbeans grayed in MPLAB X
Last Edit LocationScrolls the editor to the last place where editing occurred.
BackNavigates back
ForwardNavigates forward
Go to Line...Jumps to the specified line.
Toggle BookmarkSets a bookmark on a line of code.
Next BookmarkCycles forward through the bookmarks.
Previous BookmarkCycles backwards through the bookmarks.
Next ErrorScrolls the Source Editor to the line that contains the next build error.
Previous ErrorScrolls the Source Editor to the line that contains the previous build error.
Select in ProjectsOpens Projects window and selects current document within it.
Select in FilesOpens Files window and selects current document within it.
Select in ClassesOpens Classes window and selects current document within it.
Select in FavoritesOpens Favorites window and selects current document within it.


Keyboard:

Alt+Shift+O

Menu:
Navigate ▶ Go To File

Go to File…

TheNavigate ▶ 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 theLocation field at the bottom of the window.

See alsoHyperlink 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…

TheNavigate ▶ 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 alsoHyperlink 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

SeeNavigator 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…

TheNavigate ▶ 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 selectNavigate ▶ Go To Symbol… and be immediately presented with the list in the dialog box. See alsoHyperlink Navigation.

GoToSymbol.png

SeeNavigator 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

TheGo to Previous Document menu item displays the previously viewed document in the MPLAB XEditor. In the case of three files namedone.c,two.c, andthree.c opened in sequence, theGo to Previous Document option will first displaytwo.c (since the focus is currently onthree.c). Subsequent executions ofGo to Previous Document will toggle between displayingtwo.c andthree.c. The fileone.c would not be displayed.

TheGo to Previous Document menu item will not open a file that has been closed from the MPLAB X Editor. In the above example, if filetwo.c was closed beforeGo to Previous Document was executed, then the fileone.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

TheGo 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 fasterHyperlink 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

TheLast 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 whenLast Edit Location is used, it will be opened again in the active window. At least oneeditor window has to be open forLast Edit Location to be available. Closing and opening MPLAB X will clear theLast Edit Location history.


Keyboard:

Ctrl+G

Menu:
Navigate ▶ Go To Line…

Go to Line…

Go to Line… goes to the line number entered into theGo 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 XEditor.

GoToLine.png


Keyboard:

Ctrl+Shift+M

Menu:
Navigate ▶ Toggle Bookmark

Editor Toolbar:Editor_Toggle_Bookmark.png

Toggle Bookmark

TheToggle Bookmark command places a blue bookmarkEditor_Bookmark.png on the selected line of code to accommodate quick indexing in larger source files. The bookmarks appear in theglyph margin of theeditor 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, theerror 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

TheNext Bookmark andPrevious Bookmark menu items move the cursor to the next or previous bookmark and changes the focus of theeditor 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 XEditor or theProjects 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 theeditor window, theSelect in Projects menu item opens theProjects 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 theeditor window, theSelect in Files menu item opens theFiles 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 theEditor Window, theSelect 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

TheFavorites 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 theFavorites Window beforeSelect in Favorites can find them. IfSelect in Favorites is run on a file not in Favorites, that file may be added to theFavorites Window. Once that is done,Select in Favorites will highlight the file open in the editor within theFavorites Window.

SelectInFavorites.png