When working with large code bases, finding your way around can sometime get quite challenging. In such cases, Eclipse makes a developer’s life a lot easier with its shortcuts and quick navigation features. Below is a compilation of a few shortcuts that I have found really useful.

Quick Navigation in the Workspace

While working with a large projects one of the challenges we face is to quickly find resources in the workspace. A very useful resource is https://studentshare.net/statistics or shortcut to find any kind of Java resource is Ctrl+Shift+T. It opens a dialog box to search for the needed resource and wildcards can be used in cases where you are not sure about the name of the class. Similarly Ctrl+Shift+R can be used to find any type of resource (even non Java) present in the workspace like jsp’s, xml’s etc.

Find a resource (Ctrl+Shift+R)

During refactoring or debugging we need to know what all methods call a given method. In such cases Ctrl+Alt+H comes in really handy and shows all the callers of this method. It lists all other methods that would be affected when changing the selected method. Also in the call-hierarchy view one can see all the called methods from this method. (Just remember to switch back to default otherwise you might get confused the next time you use it.)

If you want to quickly see the class hierarchy to understand the inheritance structure, or find methods which one can override, or which have been overriden in sub classes, use Ctrl+T.

If you like to have multiple files open in the editor, Ctrl+E list all of those for you. Moreover, having so many files open can make you lose track about the location where you made the last change. Just press Ctrl+Q to get to the last edited location.

Quick Navigation within a file

When dealing with large files use Ctrl+L to jump to a particular line in the file. Although an outline view is available in Eclipse but I normally don’t use it to save me some screen space. Instead, I prefer Ctrl+O which shows a complete list of all the methods and fields present in the class. Press Ctrl+O again to show/hide the inherited methods for that class.

Show all members in a class (Ctrl+O)

Non-Navigation Features

Apart from the above there are non-navigation shortcuts which are really helpful too. One such feature is the auto-complete (Ctrl + Space). Just press Ctrl + Space after typing the first few characters of the resource and Eclipse provides you with all the options starting with those characters.

Although, I am not a big fan of the breadcrumbs feature (Alt+Shift+B), it does tell your current location with respect to a method, class and package you are working in.

Breadcrumbs feature

Another really helpful shortcut while refactoring is ALT+SHIFT+T. It finds and modifies all the appearances of a particular resource in the workspace. In particular, my favorite is ALT+SHIFT+R which renames all the occurrences of the particular resource. Once you are done making your changes quickly organize  all your imports using Ctrl+Shift+O.

Refactor using Alt+Shift+R

Take Aways

**All in all, when working with large code bases, quickly navigating to the needed resources is the key. Eclipse provides many helpful shortcuts and makes a developer more productive. The complete list of shortcuts provided by eclipse can be found by using **Ctrl+Shift+L.

https://studentshare.net/statistics