问题描述
我一直在广泛使用 + +来查找和打开Eclipse项目中的文件。但有时我知道我的文件所在的目录(或其中的一部分),但我不知道他们的名字。
I have been using extensively + + to find and open files in my Eclipse project. But sometimes I know the directory where my files are (or part of it) but I don't know exactly their names.
进行搜索时,似乎只需要考虑文件的名称,而不是它们的路径。我希望能够通过路径优化搜索。
When doing search, it seems it only takes into consideration the name of the files, and not their paths. I'd like to be able to refine the search by path.
例如,如果我有一个包含3个文件的文件夹X,我希望输入X会显示3个文件,所以我可以选择它们。或者它实际上让我自己选择X文件夹!
For instance, if I have a folder X with 3 files in it, I'd like that typing X would bring up the 3 files, so I could choose them. Or that it'd actually let me select the X folder itself!
有没有办法在Eclipse中执行此操作?
Is there a way to do this in Eclipse?
推荐答案
- 使用 + + 带来打开打开资源对话框
- 键入
* X /
列出文件夹X 。 Ex搜索:
* myDir / myFile
。
重要:前面的星号(*
- Use + + to bring up the 'Open Resource' dialog
- Type
*X/
to list all files in the folderX
. Ex search:*myDir/myFile
.
Important: the preceding asterisk (*
) is required to make the search apply to folders and paths too.
这篇关于在“打开资源”对话框中键入时,有没有办法按目录而不是文件名查找文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!