简体   繁体   English

在Intellij IDEA中按名称查找包裹

[英]Find a package by name in Intellij IDEA

I know the name of java package and I want to find it in project. 我知道java包的名称,我想在项目中找到它。 How to do it fast in Intellij IDEA ? 如何在Intellij IDEA快速Intellij IDEA Is there any keyboard shortcut? 有键盘快捷键吗?

Open Project View tool window, switch to the Packages view mode, click on the gear icon, enable Flattern Packages option, disable Show Modules option. 打开“ Project View工具窗口,切换到“ 包”视图模式,单击齿轮图标,启用“ 平面包”选项,禁用“ 显示模块”选项。

Start typing the package name to activate the speed search . 开始键入包名称以激活速度搜索


Another option is to use Navigate | 另一种选择是使用Navigate | Class , type your.package.* , select some class, press Alt + Home for the navigation bar popup, use arrows to select the package, press F4 (may not work if navigation bar is not floating, but enabled in the View menu instead). ,输入你的your.package.* ,选择一些类,按Alt + Home进入导航栏弹出,使用箭头选择包,按F4 (如果导航栏没有浮动,可能无效,但在视图菜单中启用)。

There is one more easy way, though specifically, it wont only search packages. 有一种更简单的方法,但具体来说,它不会只搜索包。

What you can do is a global search: 你可以做的是全球搜索:

Ctrl + Shift + F Ctrl + Shift + F.

一定要关注项目选项卡,然后敲击键盘,看看发生了什么,也许可以帮助你:)

Another easier way is to use the "Search Everywhere" option 1. Double click Shift button. 另一种更简单的方法是使用“搜索所有位置”选项1.双击“Shift”按钮。 2. Enter the package name. 2.输入包名称。

Though the result will not be on the top of the list, its easy to locate. 虽然结果不会在列表的顶部,但它很容易找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM