Java – use JetBrains ides to find text in the decompiled jar file

I like JetBrains IntelliJ (if you like). My project is built with gradle of my company namespace and some external Java libraries The thing is that it's hard to browse the slot class because I can't search the text Jar file or solution usage

Do you have any ideas? Are there any plug-ins or things? Is it possible?

Thank you.

Solution

There is no way to do this The only way to search for anything in library code is to attach sources The additional source code can be your own decompiled code, but the IDE will not do it for you (but I think someone can write a plug-in to decompile the whole library and attach the decompiled source code) So I think this may be the trick you need to do

Why not? I didn't write IDE, so I'm not sure why However, it is likely that the problem of finding text in jar files without additional sources is that the text representation depends on the decompiler There is no "best" way to reflect a given class Sometimes, decompilation is even impossible (for example, the bytecode of many goto / conditional jump instructions is not well converted to loop / conditional structures) In this case, the decompiler can do anything, throw an exception, put the original bytecode, just put the goto statement in the Java code, and at least show what the code is doing

The only way to search in decompiled code (assuming you can't download the code somewhere) will decompile automatically (for example, using fellflower decompile, IntelliJ idea also uses), and attach the decompiled source code

Although the above parameters are not applicable when finding the usage of the method / field, they are still not allowed. It is likely that the IDE analyzes the source code to find the usage, rather than analyzing the bytecode (compiling code)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>