Is your feature request related to a problem? Please describe.
I stumbled upon a NoClassDefFoundError as follows:
1.) add script MyFirstScript.java to a script directory and bind it to say, shift+1
2.) rename the class (outside the script manager plugin) to MySecondScript and the file to MySecondScript.java
After changing my scripts I tend to clear my compiled files (dev/ghidra_scripts/bin/) to force a recompilation
3.) refresh script list in the plugin and rebind MySecondScript .java to shift+1
4.) old binding persists and is difficult to remove. NoClassDefFoundError is thrown
Describe the solution you'd like
ScriptManagerPlugin should forget about scripts no longer in the directories, or provide a clean way to manage its memory.
Describe alternatives you've considered
I was able to manually remove it by editing _code_browser.tcd, replacing all instances of MyFirstScript with MySecondScript
The more sane version is creating a temporary MyFirstScript, then deleting it from the manager to allow the plugin to do housekeeping.
We have recently completely rewritten the scripting management framework. You should no longer need to delete your old scripts, as the framework is much better at script lifecycle management.
That being said, your above issue may still be present. Will you verify that you problem still exists in the master branch?
I've tested on 9.2 and encountered no problems (except some of my scripts breaking due to API changes, which is my problem to fix). Hitting refresh to recompile scripts felt really great, I've got to say :D
did we just make sad-dev.. happy?? :-)
Most helpful comment
did we just make sad-dev.. happy?? :-)