开发者

How to search all open files in Eclipse?

Simple question: how do I search all the files currently open in Eclipse? Note: I don't wanna sear开发者_Python百科ch all the files I have in that workspace, just the ones open in tabs. Is there an easy way to do this?


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.


CTRL+E on Windows or Linux, and Command+E on OSX.


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.


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.

http://marketplace.eclipse.org/content/instasearch


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.


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.


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.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜