如何使 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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:08:33  来源:igfitidea点击:

How can I make Eclipse file search not include svn directories?

eclipsesvn

提问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 中提供了一些其他很酷的东西)。

http://subclipse.tigris.org/

http://subclipse.tigris.org/

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 存储库位置后,您可以通过执行以下操作来共享您的项目:

  1. From within Package Explorer, right-click the project name
  2. Select the Teamcontext menu option and then Share Project....
  3. Step trough the wizard to tie your project to its location in the svn repository
  4. Once you complete that and the workspace rebuilds you are all set to enjoy filtered search.
  1. 在包资源管理器中,右键单击项目名称
  2. 选择Team上下文菜单选项,然后选择Share Project...
  3. 逐步完成向导,将您的项目与其在 svn 存储库中的位置相关联
  4. 一旦您完成并重建工作区,您就可以享受过滤搜索了。

回答by spaceman

Excluding the .svnfolders by making them derived stops then appearing in the search results, see here.

.svn通过使文件夹成为派生站点然后出现在搜索结果中来排除文件夹,请参见此处

You have to do it manually for each folder, if you have a lot of .svnfolders then it's not ideal.

您必须为每个文件夹手动执行此操作,如果您有很多.svn文件夹,则不太理想。

回答by serg10

If you are gonig down the plugin route, I tend to prefer subversiveover subclipse.

如果您正在使用插件路线,我倾向于更喜欢颠覆而不是 subclipse。

回答by ColinYounger

Ah - OK. I don't use SubVersion per se, but would thisbe of any use? It claims it can do what you want...

喔好吧。我不使用Subversion本身,而是将这个有什么用处?它声称它可以做你想做的......

回答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 类型的文件,因此最好如下图所示

[[1]: https://i.stack.imgur.com/szDxP.png][1]

[[1]: https://i.stack.imgur.com/szDxP.png][1]

回答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 文件也将被隐藏。