GeezerVison is showing github.com — Refactor TextEditor instance/context parallel arrays · Issue #74 · scijava/script-editor
Refactor TextEditor instance/context parallel arrays #74
Description
There are static ArrayLists of TextEditor instances.. and a parallel contexts ArrayList (should be List if anything). These lists are only added to. When an editor is closed it is not disposed but stays in its list.
The editor should just be disposed when it closes unless we only want one open at a time, in which case we should just keep one instance that shows/hides as needed.
Activity
changed the title
[-]TextEditor instance/context parallel arrays need to not be a thing[/-] [+]Refactor TextEditor instance/context parallel arrays [/+] on Nov 24, 2025ctrueden commented on Nov 24, 2025
I fear we will find many such problems, which is why I suggested we should perhaps vibe code something new. Might be faster and cleaner than trying to fix what's currently here incrementally...
hinerm commented on Nov 24, 2025
My concern with a total rebuild is the time it would take and pain of rediscovering issues that worked before. A lot of things seem to work acceptably. Even the instances thing isn't causing problems, it's just not an ideal design.
Alternatively we could also do a vibe refactoring/code analysis to find the smelliest sub-systems, instead of starting from scratch.
acardona commented on Dec 2, 2025
Hi Mark,
Thanks for spotting this bug – I did notice that memory wasn't being released, which lead to many restarts of Fiji to avoid this after running large jobs that return handles to huge images with full caches.
A "vibe" refactoring sounds like a horrible idea, in my opinion. Instead, if you haven't yet, I'll look into the ArrayList with dangling interpreter instances.
acardona commented on Dec 2, 2025
acardona commented on Dec 2, 2025
Or not – I am confusing the tab with the whole script editor window. In that case has to be removed upon closing the TextEditor window.
Reacted by Mark Hiner-Weir
Metadata
Metadata
Development
No branches or pull requestsIssue actions