intellij how to find / search for a folder / directory / package name

后端 未结 7 1804
北荒
北荒 2021-02-02 06:10

I wish to search just directory (folder) names and packages within the modules of my current project.

How can I do this?

CTRL+Shift+N<

7条回答
  •  北海茫月
    2021-02-02 06:28

    It seems IntelliJ doesn't directly support this. Here are the best alternatives I've thought of so far:

    I suggest these steps if there is nothing in the folder yet (Windows):

    • Windows:
      • Right click on the project root, and choose "show in explorer"
      • In the search box on the top right, search for the folder you want (e.g. META-INF)
      • Right click, "open folder location"
    • Linux/Unix/Cygwin:
      • Copy the path instead, (in the right-click menu),
      • cd to the directory using a console or cygwin,
      • use the 'find' utility. E.g. type find . -iname 'SomeFolderName*'

    If there is already something in the folder, I suggest you do this:

    • Ctrl-Shift-F to search for files
    • Enter the directory name inside a wildcard pattern (eg. */META-INF/*)
    • open the first file that occurs in that folder
    • Click on the circular target icon to "scroll from source" (at the top of the project panel).

提交回复
热议问题