Code navigation in Eclipse

Nishan picture Nishan · Mar 14, 2011 · Viewed 15.7k times · Source

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!

Answer

adarshr picture adarshr · Mar 14, 2011

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.