mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 12:00:04 +02:00
use SwingUpdateManager for refresh
- this keeps GhidraScriptTableModel accesss on the swing thread and prevents unnecessary disk accesses on multiple bundle enable/disable
This commit is contained in:
parent
d8ec1784ec
commit
321331c1c6
2 changed files with 58 additions and 53 deletions
|
@ -101,6 +101,7 @@ public class GhidraScriptComponentProvider extends ComponentProviderAdapter {
|
|||
private final BundleHost bundleHost;
|
||||
private final RefreshingBundleHostListener refreshingBundleHostListener =
|
||||
new RefreshingBundleHostListener();
|
||||
final private SwingUpdateManager refreshUpdateManager = new SwingUpdateManager(this::doRefresh);
|
||||
|
||||
GhidraScriptComponentProvider(GhidraScriptMgrPlugin plugin, BundleHost bundleHost) {
|
||||
super(plugin.getTool(), "Script Manager", plugin.getName());
|
||||
|
@ -712,6 +713,10 @@ public class GhidraScriptComponentProvider extends ComponentProviderAdapter {
|
|||
}
|
||||
|
||||
void refresh() {
|
||||
refreshUpdateManager.update();
|
||||
}
|
||||
|
||||
void doRefresh() {
|
||||
hasBeenRefreshed = true;
|
||||
|
||||
TreePath preRefreshSelectionPath = scriptCategoryTree.getSelectionPath();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue