Simple question: how do I search all the files currently open in Eclipse? Note: I don't wanna search all the files I have in that workspace, just the ones open in tabs. Is there an easy way to do this?
7 Answers
Closest way is selecting several resources in Navigator or Package Explorer view, then press Ctrl+H and choose 'Selected Resources' radio button. It will limit search only to selected files.

- 63,078
- 28
- 122
- 148
-
7But assume if 20 files are opened then user has to select manually all these files by pressing Cpntrol and Shift keys!!. – Chandrayya G K Jan 01 '14 at 07:48
-
Notepad++ has this feature. It even let you open All files in the search result in one go. – Knu8 Dec 23 '16 at 10:07
CTRL+E on Windows or Linux, and Command+E on OSX.

- 510
- 5
- 12
-
8That's searching the file *names* but I want to search the *contents*. Still handy though, thanks. – daveslab Sep 19 '11 at 13:53
There's no way to do that at the moment.
The easiest solution would be to select your files manually (holding CTRL + click on file) and to specify "selected resources" as your search scope.

- 10,356
- 2
- 17
- 16
This may come too late for the original poster, but just in case somebody else needs to find out an answer, I had the same problem and found my solution by installing a plug-in named Instasearch. You can get it by going to Help/Eclipse Marketplace and searching for Instasearch.
You can find more about this plug-in in the following address.

- 155
- 1
- 3
- 16
-
1Does that plugin actually let you search only the open files? I didn't see that mentioned on the page you link to. – Tom Anderson May 19 '12 at 19:19
-
@Tom, unfortunately it doesn't, sorry my mistake. I'm new to Eclipse and have been missing the ability to search in all open files since the beginning. Silly assumption on my side that nobody else noticed such a plugin, should have double-checked the question before answering, I didn't notice at first that it searches in all the files from the same package, open or closed. – Ramon Royo May 19 '12 at 20:19
-
@Ramon Royo +1 I think it doesn't answer the question. Still i was searching for this one. – Ajeeb.K.P Dec 08 '14 at 07:12
-
Looks like this plugin project is dead in 2018, not compatible with current Eclipse. :( – MGM May 25 '20 at 10:12
Spring produces a stand-alone Eclipse plugin (no dependencies on Spring) called Quick Search
http://marketplace.eclipse.org/content/quick-search-eclipse
For efficiency, it searches your open files first. So while it isn't purely restricting to opened files as you requested, you can still get a similar effect in practice by just clicking the first results that come up.

- 10,736
- 5
- 44
- 57
-
3This would be perfect if they just added an option to allow you to do that. *sigh* – daveslab Apr 28 '16 at 18:00
The currently opened files simply aren't considered special in eclipse - you have far more advanced methods of organizing your files: projects and working sets.
Working sets allow you to define sets of files, which can be used as constraints for many operations. You have to define them explicitly, but then they don't change just because you've closed a file.

- 342,105
- 78
- 482
- 720
-
8Thanks, Michael. I hear your point about the incredible functionality available in Eclipse, but this is one of those instances where simplicity of use should trump functionality. I agree that Eclipse has far more advanced capabilities built in than what I'm asking for, but that's precisely my point. It's so much simpler to implement a "Find in Open Files" than it is to implement the Working Sets concept. I guess for the time being, it'll have to do. Thanks again. – daveslab Dec 21 '09 at 16:35
-
But simplicity of implementation shouldn't be a criteria for inclusion. I think the use case for find-in-open-files is too weak to warrant inclusion, although the UI impact would be rather small. – JesperE Dec 22 '09 at 07:07
-
5The current open files, for me, is often a great criteria to limit a search/replace. Maybe different type of development call for different working practices? I develop websites in PHP and find this an invaluable feature of other IDEs. It's one of those feature that once you start using you can't imaging doing without! – Owen Dec 18 '10 at 15:16
There is no find-in-open-files command in Eclipse, no.
I think that the main reason find-in-open-files is not implemented in Eclipse is probably because the set of open files is for many users rather insignificant. (In fact, I don't know (or care) which files I have open. (I even have Eclipse set to automatically close editors/files when they become too many). If I want to navigate to a file, I open it. Limiting a search to the files I currently have open would be completely pointless for me.)

- 63,317
- 21
- 138
- 197
-
I'ts a question of habit. (You may not tell anyone "your habit is pointless" ;) ) If you working on a big project, opened 30-90 files, it is a reasonable problem "uh, where I wrote this 20 minutes ago?". As you can see from the previous comments, this feature is implemented in Notepad++, so there must be many people out there who really need this. – MGM May 25 '20 at 10:02