Source Navigation

DrJava has many simple features to help you edit and navigate source files.

Find/Replace. DrJava has a Find and Replace utility, which is conveniently displayed as one of the tabs at the bottom of the window, rather than as a dialog blocking part of the window. The tab is first displayed when you Find/Replace from the Edit Menu (or using the keyboard shortcut, Ctrl+F), and it can be closed by clicking on the "X" button in the upper right corner of the tab (or by hitting the Escape key). To search for a term, type it in the Find text field and click "Find Next" (or press Enter). To replace the term with another, type the new term in the Replace text field, find an occurrence using "Find Next", and then click "Replace". The "Replace/Find Next" and "Replace All" buttons help to speed up this process. There are also three checkboxes to customize each search: "Match Case", "Search Backwards", and "Search All Documents". Unchecking the first box will return case-insensitive results, checking the second box will reverse the direction of searching, and checking the third box will tell DrJava to search through all of the open documents in sequence. Note that if "Search All Documents" is enabled, the search will not wrap to the beginning of the current document until all other documents have first been searched.

Goto Line. Selecting "Goto Line" from the Edit Menu (or hitting Ctrl+G) will display a dialog allowing you to scroll to a particular line number.

Fast Switching. With Fast Switching, you can easily switch between recently active documents. Simple hold down Control, and press the Back Quote key to navigate through the filenames of recently active documents. Release the Control key to switch to the document with that filename.

Line Numbering. DrJava displays the cursor's current line number and column number on the right side of the status bar at the bottom of the window. The line number is shown on the left and starts at 1, and the column number is shown on the right and starts at 0.

All line numbers can also be displayed in the left margin of the Definitions Pane, using the "Show All Line Numbers" option in the "Display Options" section of the Preferences window. The line number font can be changed in the "Fonts" section. (See Configuring DrJava.)