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 !!!!!!!!!!!!!!!!!!!
David
Hendrik Maryns - 27 Jun 2006 16:35 GMT
david wolf schreef:
> Hi,
>
[quoted text clipped - 5 lines]
> to mark the location, i.e. line 2000, then I can come back after
> looking at the top of the file?
There are arrow buttons in the menu bar. The arrow with a star brings
you to the last edit location, the others to the last view. Consider
asking Eclipse questions on the Eclipse newsgroups:
http://www.eclipse.org/newsgroups/
HTH, H.
- --
Hendrik Maryns
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Alex Whitney - 27 Jun 2006 16:47 GMT
> Hi,
>
[quoted text clipped - 9 lines]
>
> David
I usually just use the method list on the right side of the screen to
navigate. If you click on a method it will take you to it.
You could always purposely generate an error at the line you want
"bookmarked". That way when you want to go back to the line, you just
click on the red rectangle on the right and it will take you to the
line with the error. Or you can create a TODO: tag and it will make a
blue rectangle.
rhino_moderate@yahoo.ca - 27 Jun 2006 16:51 GMT
> Hi,
>
[quoted text clipped - 7 lines]
>
> 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.
--
Rhino
david wolf - 27 Jun 2006 18:04 GMT
> To find the full story, look up "bookmark" in the Eclipse Help system.
>
[quoted text clipped - 26 lines]
> --
> Rhino
Thanks for all of you !!!!
But I think, is there a easier way to do this? Say some shortcut key?
Use bookmark by mouse require me to do bookmark first then, scroll to
see the book mark. It takes time.
Use outline (at the right side of the screen) need mouse click and
scroll also, it also takes time.
In Linux, we can use two keys ma to set bookmark a, use 'a to back to
the bookmark. all done using keyboard. Is there a similiar way in
eclipse?
rhino_moderate@yahoo.ca - 27 Jun 2006 22:27 GMT
> > To find the full story, look up "bookmark" in the Eclipse Help system.
> >
[quoted text clipped - 40 lines]
> the bookmark. all done using keyboard. Is there a similiar way in
> eclipse?
I thought the bookmark approach I described was pretty easy - and I
only confirmed it existed when I went to answer your question!
Normally, I just scroll up and down or click on the method names in the
outline; that was already quick enough for me!
I'm guessing that you're young, maybe still in school or just out.
Well, I was more impatient when I was that age too :-) I don't suppose
anything I say will actually convince you that you can afford to take
the few seconds it takes to use the outliner, the Outline view or the
Bookmarks view. So, if you really really have to have a technique that
is even faster, why not ask on the eclipse.platform newsgroup on the
Eclipse news server? Someone there may know an even shorter shortcut
that will make you happy.
Sigh.....
Sorry, I don't mean to sound like an Old Geezer....
--
Rhino
Hendrik Maryns - 28 Jun 2006 13:13 GMT
david wolf schreef:
>> To find the full story, look up "bookmark" in the Eclipse Help system.
>>
[quoted text clipped - 40 lines]
> the bookmark. all done using keyboard. Is there a similiar way in
> eclipse?
With ‘in Linux’, I suppose you mean in Emacs. Whatever.
You can define your own key bindings in Eclipse too. Go to Window->
Preferences -> General -> Keys / Keys (Experimental). There is even a
pre-defined Emacs scheme, although it does not contain a shortcut for
Add Bookmark. Anyway, under Keys, you can define it yourself, Alt+D
would be a suitable possibility.
H.
- --
Hendrik Maryns
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html