I’m working in a file that’s thousands of lines of code. I’m implementing an algorithm at line 700-ish. I frequently have to navigate away from those lines to check out the other methods in the file.
Navigating back to where I’m actually coding is usually a pain. If I could set a waypoint at line 700 and map a shortcut to it that would be great. It would also be nice to be able to do this on a file level too.
Is there any way to do this in Eclipse? If not, should there be?
I don’t control the file so I can’t break it up into smaller files/classes.
There’s a Bookmark view in Eclipse that would probably work for this.
On any line of source (at least in the Java view), right click in the left hand tray. You’ll see a menu pop up and an option called
Bookmark. Select that and provide some kind of useful description that you’ll remember.Now, add the
Bookmarksview to your perspective.WindowShow ViewOther(at the bottom)BookmarksunderGeneral(or just enterBookmarksin the search box).You should now have the Bookmarks view in your perspective listing your bookmarks. Duble click on one of the bookmarks and it will take you right to it.
Hope that helps.