Feat/app scoped gui plugins - #2945
Conversation
|
Worth mentioning: Got some help from Kimi Code but it does not have an official/established Co-author trailer. Did however review the code. |
|
@mostafaNazari702 thanks, looks good 👍
|
I may be able to make those changes myself and push a commit. Are those the only changes or do you have more stuff that you did not list in your comment? |
|
@mostafaNazari702 I already start working on this. |
|
I pushed my changes, still some places looks like workaround. @mostafaNazari702 meanwhile you can review and check my changes 🙂 |
Co-authored-by: Kimi Code <kimi@moonshot.ai>
Had a look at your changes and overall approach makes sense to me but i found a few things while going through it and pushed fixes:
Added tests for the lifecycle bits too, i highly recommend keeping them but you decide! |
|
@mostafaNazari702 thanks for fixes, PR looks ready for merge now 🎉 |
Wait, how about your TODOs? |
That will be another big change 🤣 |
Since this PR did not get merged yet i guess a short convo might be okay. Are you open to actively improving the decompiler itself? When was the last time you worked on improving things like decompilation accuracy? When decompiling an app, you also often encounter various warnings and errors. While some of these may be false positives, have you considered spending some time researching how open-source compilers and decompilers implement their algorithms? Understanding the techniques they use could potentially help identify ways to improve JADX GUI’s decompilation accuracy and reduce the number of warnings and errors. |
Yes. But at this point it super hard, so work on improvements are very slow.
It is fine to some extent, because it is impossible to resolve all issues (decompilation is unsolvable in general case).
I checked several decompilers, didn't notice much difference at core architecture, only implementation details. |
Can you please add me on Discord? I need to discuss this more with you, this is my username: jizz_y |
You can open a new issue for discussion. |
Why is it “super hard”? And when you say that “work on improvements is very slow,” do you mean that development work by YOU on the decompiler itself is slow, or are you referring more to reviewing PRs and issues related to the decompiler? |
Not sure, I am working on this project since 2012 and there are still tons of issues 🤣 I'm always trying to implement some core decompiler improvements, but most of them not finished because it is hard to create a "general enough" algorithms to resolve one more case and don't break others. |
Also now I can suggest asking any AI: |
❗ Please review the guidelines for contributing.
Done.
Description
Initiate GUI plugins on jadx-gui start
Fixes #2913
Right now GUI plugins only start once a project is loaded and they get unloaded again as soon as you close it so a plugin cant do anything on the start page or survive switching between APKs. Added a
JadxGuiPlugininterface plugins can opt into: they getinitGui(JadxGuiContext)once when the window opens andunload()when jadx-gui exits and they are skipped by the decompiler's plugin manager so they never get a second project-scoped lifecycle.The GUI plugins context also moves from
JadxWrappertoMainWindow´ and now keeps application and project registrations apart so closing a project only clears the project ones. Existing plugins are not affected and they keep usinggetGuiContext()` exactly as before.