You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a problem when developing a plug-in. I couldn't get the variable list in the function through the function, and the modified comments were invalid.
The text was updated successfully, but these errors were encountered:
I couldn't get the variable list
List argNodes = methodNode.collectArgNodes();
That method should work, I will check it, although to reproduce this I need some tests, so it might take some time
and the modified comments were invalid
Comments don't have any public API to be saved into project and applied in class code generation. So no easy way for now, only using additional pass (check jadx example plugin code). You need to save all your comments in map like Map<ClassNode, String> and in your comment pass add to class in visit method. To force code reload, you need to invoke ClassNode.reloadCode() also to refresh open tabs in gui you might need to run JadxGuiContext.reloadAllTabs()
Actually, using decompilation pass is always a preferred way to change code, so issue with variables also can be solved same way as an approach with comments. I think, I will prepare example for that.
I tested this method and can only get it. The passed in parameter list cannot get the local variables.
If you use AI to optimize the code during the decompilation process, there may be performance problems, because some codes themselves do not need too much AI optimization.
Describe your idea
https://github.com/dooker520/Jadx-hzhuAi-Plugin
I encountered a problem when developing a plug-in. I couldn't get the variable list in the function through the function, and the modified comments were invalid.
The text was updated successfully, but these errors were encountered: