如何使 Eclipse 文件搜索不包括 svn 目录?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41934/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I make Eclipse file search not include svn directories?
提问by ryantm
When I do a file search on eclipse it includes the .svndirectories by default. I tried excluding them from the build path but they still appear on file search results.
当我在 eclipse 上进行文件搜索时,它.svn默认包含目录。我尝试将它们从构建路径中排除,但它们仍然出现在文件搜索结果中。
回答by Brad Whitaker
Spaceman is right. With Helios, choose Project -> Properties -> Resource -> Resource Filtersand then add an excludefilter for type "Folder" with name .svn.
太空人是对的。使用 Helios,选择Project -> Properties -> Resource -> Resource Filters并添加exclude名称为“文件夹”类型的过滤器.svn。
回答by Mark Ingram
If you install the subclipse plugin then it automatically excludes the .svndirectories (plus provides some other cool stuff in the IDE).
如果您安装 subclipse 插件,那么它会自动排除.svn目录(另外在 IDE 中提供了一些其他很酷的东西)。
If it does not work, simply restart Eclipse (sometimes it's needed on a fresh checkout)
如果它不起作用,只需重新启动 Eclipse(有时在新结帐时需要它)
回答by Mark Ingram
Following up on Mark Ingram's excellent answer, simply installing the plugin won't get you there -- You'll still need to Shareyour project in order for the automatic Search filtering to take hold. After you set up the SVN repository location from within the Subeclipse view you may Share your project by doing the following:
跟进 Mark Ingram 的出色回答,简单地安装插件不会让你到达那里——你仍然需要Share你的项目才能让自动搜索过滤生效。在 Subeclipse 视图中设置 SVN 存储库位置后,您可以通过执行以下操作来共享您的项目:
- From within Package Explorer, right-click the project name
- Select the
Teamcontext menu option and thenShare Project.... - Step trough the wizard to tie your project to its location in the svn repository
- Once you complete that and the workspace rebuilds you are all set to enjoy filtered search.
- 在包资源管理器中,右键单击项目名称
- 选择
Team上下文菜单选项,然后选择Share Project...。 - 逐步完成向导,将您的项目与其在 svn 存储库中的位置相关联
- 一旦您完成并重建工作区,您就可以享受过滤搜索了。
回答by spaceman
回答by serg10
If you are gonig down the plugin route, I tend to prefer subversiveover subclipse.
如果您正在使用插件路线,我倾向于更喜欢颠覆而不是 subclipse。
回答by ColinYounger
回答by V.R.Manivannan
Eclipse import would also contain file of type .java.svn-base, so its better to give as in below image
Eclipse 导入还将包含 .java.svn-base 类型的文件,因此最好如下图所示
回答by John Lamp
You can off course also select ALL the file name patterns to include in the file search dialog
当然,您也可以选择所有文件名模式以包含在文件搜索对话框中
回答by John Lamp
Click on the drop-down triangle in the top-right corner of the Navigator and choose "Filters..".
单击导航器右上角的下拉三角形,然后选择“过滤器...”。
By default Eclipse only offers you ".class" and ".".
默认情况下,Eclipse 只为您提供“ .class”和“.”。
If you choose ".*" you'll hide .svn files. Obviously all other .something files will also be hidden.
如果您选择“.*”,您将隐藏 .svn 文件。显然所有其他 .something 文件也将被隐藏。

