2.7. Going Back to the Previous Edit Location

Problem

While editing, you switched to another editor to make sure that you had the name of a variable right. But you have 15 editors open. How do you get back to the exact line of code you were editing?

Solution

Select Navigate Go to Last Edit Location (Ctrl-Q), which moves you back to the location where you last made a change in an editor. You’ll also see a button for this function in the toolbar when working with editors.

Discussion

Eclipse lets you easily move between edit locations, a valuable addition to any programmer’s toolset. If you can’t see these buttons in your current perspective, you might need to add them by selecting Window Customize Perspective Other Editor Navigation).

Get Eclipse Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.