mmizutani
mmizutani

Reputation: 337

How to navigate through a lot of files in Eclipse without opening them

In some popular code editors and IDEs such as Sublime Text and Xcode, we can swiftly navigate through lots of code files by a single click without opening them. This is an advantage when we look into many parts of the code base scattered across the projects but nevertheless want to avoid opening too many tabs, which affects performance on slow machines. Does anyone know such a "navigating-without-opening" functionality in Eclipse?

I understand that Eclipse does provide a lot of useful shortcut keys to switch between opened tabs and classes in the project, but what I am looking for is the functionality whereby I can switch between files without opening them in a new tab by a single click (and preferably open specific files by double clicks when we want to keep them opened in new tabs).

EDIT: I am not searching specific classes or methods. Rather, I would like to peek project files one by one to grasp the structures of the application which contains hundreds of files. In Sublime Text and Xcode, unlike in Eclipse, when one clicks file names in the project explorer only once, the files get opened in a "temporary tab" which automatically closes when we single-click another file. For example, in the following screenshots, when I single-click ToDoListPane.java in Sublime Text or CNBackgroundView.h in Xcode, the files are opened in new temporary tabs, but once another file such as HelloWorldSpring.java or CNAppDelegate.m is clicked once, then the contents in the temporary tabs are switched to those of HelloWorldSpring.java or CNAppDelegate.m without additional tabs being created.

enter image description here enter image description here

Upvotes: 1

Views: 989

Answers (1)

Aaron Digulla
Aaron Digulla

Reputation: 328850

Use Ctrl+Shift+R to search files by name (pattern).

If you know a string that is inside of the files you seek, you can use Search -> File Search (there is a button in the toolbar for that).

Related:

[EDIT] For exploring unknown code, try the "Java Browsing Perspective", it's optimized for this use case.

As for "slow performance", I have often more than 99+ files open without a big impact on performance.

As a quick way to close tabs, you have several options:

  1. Click anywhere in the tab with the middle mouse button to close it.
  2. Use Ctrl+W to close the current tab
  3. Use the tab's context menu to close it, close all tabs or close all other tabs.

Upvotes: 2

Related Questions