bharal
bharal

Reputation: 16194

Eclipse - is it possible to jump to a particular package?

Say i'm looking at some file, and i'd like to see if there are similar files in a different package. I don't really know what the different files might be called - they were coded by different people, so could well be named differently.

I do know they're probably in a package of roughly the same name - for example, if i'm looking at a file in the com.sandwiches.ham.artisan package, and i think there should be a similar (although, in this case, sadly unrelated) file in the com.sandwiches.avocado.artisan package, what is the fastest way to jump to said package and check it out?

I'm fed up of scrolling through reams of artisan sanwiches, its making me hungry.

Upvotes: 1

Views: 213

Answers (3)

Perception
Perception

Reputation: 80623

Well, no matter what, you are going to have to do some typing. There is a Go-to navigation item for packages, its just not bound to any quick keys. To bind it to a key combination of your choice, do the following:

Eclipse->Preferences, and type in Keys as your filter.

Eclipse Preferences - Key Bindings

Search for the Go To Package command, click on the Binding entry field, and type whatever keys you want to use for the keybindings (in my screenshot I have it set to Command-Shift-0). Then click OK to save and close the preferences dialog.

After that, typing your chosen key bindings will bring up a package explorer that lets you type in whatever package you want and navigate to it.

enter image description here

Upvotes: 4

melli-182
melli-182

Reputation: 1234

Ctrl + Shift + R its a good shortcut to find files in every package in your proyects, i use it everytime... hope it help...

Upvotes: -1

Toni Toni Chopper
Toni Toni Chopper

Reputation: 1851

From the Breadcrumb (press Alt+Shift+B to open it) it is quite quick to navigate your way through the sandwich menu ehm I meant packages structure...

Upvotes: 1

Related Questions