答案:不能。
IntelliJ IDEA Find in Path works with source and resource files only. It doesn’t search in the binary .class files. What you see when you navigate to a .class file is the decompiled version of the class. Decompilation is performed on the fly, IDE doesn’t decompile and index all the .class files automatically, therefore there is no index available and no way to perform fast search. Such feature, while technically possible, would require decompiling and indexing all the dependencies which could take a lot of time and system resources, especially in the projects with a lot of dependencies.
Usually there are sources available for the libraries you depend on. For Gradle/Maven projects IntelliJ IDEA can download and configure such sources automatically, so find in path will work inside the libraries with the attached sources for the majority of the users/projects.
In case the library has no sources, you can perform offline decompilation of the entire library using the command line batch decompiler and attach the directory with the decompiled sources to the library.
IntelliJ IDEA的Find in Path功能仅适用于源代码和资源文件,不支持在.class二进制文件中搜索。文章解释了为何此功能无法快速搜索.class文件,并提供了在依赖库无源码时的解决方案。
1万+

被折叠的 条评论
为什么被折叠?



