在Eclipse中自定义search(file)函数 [英] Customize search(file) function in Eclipse

查看:59
本文介绍了在Eclipse中自定义search(file)函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

太奇怪了,每次我想在Java文件中搜索特定的关键字时,我的Eclipse都会浏览所有Java文件和所有库rar.结果,由于我的项目中有很多.rar文件,因此搜索运行时间非常长.

我知道这个问题以前从来没有发生在同一个Java项目中,只是因为我在类路径中做了一些更改.

解决方案

如果您执行
(来源:日食.org )

选择附件项目"有助于最大程度地减少搜索到的文件数量,将其限制为您的文件.

如评论中所述,可能需要两个额外的步骤来确保实际搜索的文件集很小:

  • 指定" *.java "(您可以在文件搜索"中执行此操作)
  • 还请确保未选择考虑派生资源".

It is so weird that every time I want to search for a particular keyword in java files, my eclipse will look through all the java files and all the library rar. As a result, the search running time is very long since there are a lot of .rar files in my project.

I aware that this problem never happen to the same java project before, just because I did some changes in class path.

解决方案

If you do a File search, you can specify the scope of your search.


(source: eclipse.org)

Choosing "enclosing project" can help minimizing the number of files searched, limiting it to your files.

As mentioned in the comments, two extra steps can be required to ensure the set of files actually searched remains small:

  • specify '*.java' (which you can do in a 'File Search'),
  • make sure also that "Consider derived resources" is not selected.

这篇关于在Eclipse中自定义search(file)函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆