david said:
Hi,
I want to know how to navigate back in eclipse editor of JAVA
development. Can some one give me a help ?
For example, I am working on line 2000 of my code. I want to take a
look at the very top of the file, and then come back to this line. How
to mark the location, i.e. line 2000, then I can come back after
looking at the top of the file?
Thanks !!!!!!!!!!!!!!!!!!!
To find the full story, look up "bookmark" in the Eclipse Help system.
Basically, you can set bookmarks wherever you like in your source code
in much the same way you set breakpoints for your debugger: position
your cursor over the line number in the left margin, right click to get
a context menu, then choose Add Bookmark.... You will be able to choose
your own name for the bookmark so you can write something meaningful to
you. As soon as you click OK, your bookmark is set. You will see a
green rectangle in the left margin, assuming you are using the default
colors in the Eclipse settings.
You can set as many bookmarks as you like, including one on line 2000
and another on line 1, then just click the green rectangles in the left
margin to get from one to another. But if you have a lot of bookmarks
and have trouble telling which is which, there is a Bookmarks View that
you can display by clicking on Window/Show View/Other.../Bookmarks (in
the Basic section). The Bookmarks View shows all of your bookmarks and
lets you click on the one you want, which should be easy if you created
a meaningful remark when you created the bookmark.
You can delete a bookmark as easily as you created it: position the
cursor over the line number (left margin) of the line containing the
bookmark; right click to get the context menu, and choose Remove
Bookmark.
Bookmarks are kept when you save the source file so you don't need to
re-create them when you re-open the file.