本文介绍了使用Eclipse搜索文件夹名称“在文件中搜索”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Eclipse Mars 2.0中使用搜索路径来查找文件名称中的字符串模式,还可以在文件夹的名称中找到字符串模式?



我在一个git repo中有一个名为个人财务的文件夹,我主要使用Eclipse来处理。当我在文件中搜索财务时,唯一显示的搜索结果是文件本身。 Eclipse中是否有一种同时搜索文件名和文件夹名称的方法?



也看进入此并阅读所有评论。






这可能对您不感兴趣,但看看:



在此您可以通过名称模式找到在资源管理器视图中过滤资源的插件的详细信息。但现在只限于过滤 项目 。通过和


How can I use 'search in path' for Eclipse Mars 2.0 to find a string pattern in either the name of a file and also find a string pattern in the name of a folder?

I have a folder named 'Personal Finance' in a git repo that I primarily use Eclipse to work with. When I search in file for 'Finance' the only search results that show up are in files themselves. Is there a way in Eclipse to search file names and folder names simultaneously?

解决方案

Do not use Search dialog(+) for this. It searches inside the file content.

Use open resource dialog(++).In the input pattern text box enter

For example:

  1. *handler/

    This will list all files which has handler string in their names and present under the folders which has handler string in their names.

  2. *handler/*nature

    This will list all files which has nature string in their names and present under the folders which has handler string in their names.

See this post for more details When typing in Open Resource dialog, is there a way to find files by directory instead of just the file name? also look into this bug and read all comments.


This may not interest to you but have a look on it:

In this blog you can find the details of a plugin which filters resource in package explorer view by name patterns. But now its limited to filter only projects. Go through this bug and this bug

这篇关于使用Eclipse搜索文件夹名称“在文件中搜索”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 23:51