从 Eclipse 搜索中排除文件夹 [英] Exclude folders from Eclipse search

查看:62
本文介绍了从 Eclipse 搜索中排除文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 Eclipse 中从搜索中排除某些文件夹(及其所有子文件夹)?

Is there a way to exclude certain folders (and all their subfolders) from searching within Eclipse?

推荐答案

以下是对我有用的方法(我正在使用 Helios - 也许在最初提出这个问题时这种方式不可用?)

Here is what works for me (I'm using Helios - maybe this way was not available when this question was originally asked?)

  • 转到项目 -> 属性 -> 资源过滤器.
  • 点击添加.
  • 选择过滤器类型:排除所有
  • 选择适用于:文件夹;检查所有子项(递归).
  • 在属性中,选择NameMatches.svn(例如).
  • Go to Project -> Properties -> Resource Filters.
  • Click Add.
  • Choose Filter type: Exclude all
  • Choose Applies to: Folders; check All children (recursive).
  • In the Attributes, choose Name, Matches, .svn (for example).

(实际上,我使用 .* 一次性过滤掉 .svn、.hg 等.)

(Actually, I'm using .* to filter out .svn, .hg etc. in one go.)

确认项目属性对话框后,这些目录将不再出现在搜索中.事实上,Eclipse 非常友好,可以自动更新现有搜索结果窗口并删除所有现在被过滤掉的匹配项.

After okay'ing the project properties dialog, these directories won't come up in search any more. In fact, Eclipse is so kind as to automatically update existing search results windows and remove all matches which are now filtered out.

这篇关于从 Eclipse 搜索中排除文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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