Merge remote-tracking branch 'origin/GP-1-dragonmacher-dialog-action-context-fix-v2--SQUASHED'

This commit is contained in:
Ryan Kurtz
2026-03-27 10:01:46 -04:00
47 changed files with 376 additions and 327 deletions

View File

@@ -538,20 +538,26 @@ public abstract class AbstractGhidraHeadedDebuggerTest
}
protected static void assertDisabled(ActionContextProvider provider, DockingActionIf action) {
ActionContext context = provider.getActionContext(null);
ActionContext context = createActionContext(provider);
assertFalse(action.isEnabledForContext(context));
}
protected static void assertEnabled(ActionContextProvider provider, DockingActionIf action) {
ActionContext context = provider.getActionContext(null);
ActionContext context = createActionContext(provider);
assertTrue(action.isEnabledForContext(context));
}
protected static void performEnabledAction(ActionContextProvider provider,
DockingActionIf action, boolean wait) {
ActionContext context = waitForValue(() -> {
ActionContext ctx =
provider == null ? new DefaultActionContext() : provider.getActionContext(null);
ActionContext ctx = null;
if (provider == null) {
ctx = new DefaultActionContext();
}
ctx.setContextProvider(provider);
if (!action.isEnabledForContext(ctx)) {
return null;
}