Test fixes: put dialog creation on the swing thread; put layout change

call into a task
This commit is contained in:
dragonmacher
2021-08-25 16:37:26 -04:00
committed by Ryan Kurtz
parent 9593f16585
commit 89f9c9cce2
2 changed files with 8 additions and 11 deletions

View File

@@ -31,6 +31,7 @@ import ghidra.framework.plugintool.Plugin;
import ghidra.framework.plugintool.PluginTool;
import ghidra.framework.remote.User;
import ghidra.util.Msg;
import ghidra.util.Swing;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.*;
import resources.ResourceManager;
@@ -107,6 +108,7 @@ public class VersionControlCheckOutAction extends VersionControlAction {
private class CheckOutTask extends Task {
private Collection<DomainFile> files;
private boolean exclusive = true;
private CheckoutDialog checkout;
CheckOutTask(Collection<DomainFile> files) {
super("Check Out", true, true, true);
@@ -144,7 +146,9 @@ public class VersionControlCheckOutAction extends VersionControlAction {
// note: a 'null' user means that we are using a local repository
User user = getUser();
if (user != null && user.hasWritePermission()) {
CheckoutDialog checkout = new CheckoutDialog();
checkout = Swing.runNow(() -> new CheckoutDialog());
if (checkout.showDialog(tool) != CheckoutDialog.OK) {
return false;
}