Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code navigation in Eclipse

I find it difficult to navigate through code for a big project involving many classes, XML files, SQL files etc.

I know Shift-Ctrl-R to open resources, but thats where my little knowledge ends. How can I easily navigate through a hell of Java and non-Java files in Eclipse with just keyboard. Most of you gurus already will have a list of favorite code navigation shortcuts/tips, I suppose.

Please share.

Thanks!

like image 933
Nishan Avatar asked Mar 14 '11 12:03

Nishan


People also ask

How do I navigate code in Eclipse?

Other Shortcuts The shorcuts below are available in standard Eclipse, so you should also definitely get to know them :) Ctrl+L allows you to navigate to a given line in your current editor. Ctrl+Q goes to the place where the last edition was made. Ctrl+F6 navigates through the opened editors.

How do I navigate to a class in Eclipse?

We can access it in two ways: Using the keyboard shortcut, which is Ctrl + Shift + R on a PC or Cmd + Shift + R on a Mac. Opening the menu under Navigate > Open Resource.

What is Eclipse Navigator?

The Navigator view shows all your Eclipse projects, both projects associated with AccuRev and others. You access each project's files and directories (folders) using a familiar tree control.


1 Answers

Try these shortcuts:

Ctrl + Shift + R for opening any resources

Ctrl + E for switching between open windows

Ctrl + Shift + T for opening loaded classes

Ctrl + T for opening type hierarchy

Ctrl + O for viewing all the methods in a class / interface. Pressing this again shows you all the superclass methods too.

Ctrl + F11 to run a previously run class.

Alt + Shift + K and then J for running a class as Java Application.

Holding Ctrl when clicking on a method / class / interface opens it.

Also check out the Java Browsing perspective.

like image 152
adarshr Avatar answered Oct 04 '22 17:10

adarshr