public static void performAction(DockingActionIf action, ComponentProvider provider,
			boolean wait) {

		ActionContext context = runSwing(() -> {
			ActionContext actionContext = new DefaultActionContext();
			if (provider == null) {
				return actionContext;
			}

			ActionContext newContext = provider.getActionContext(null);
			if (newContext == null) {
				return actionContext;
			}

			actionContext = newContext;
			actionContext.setSourceObject(provider.getComponent());

			return actionContext;
		});

		doPerformAction(action, context, wait);
	}
Performs the specified action with context within the Swing Thread.  If the action results
in a modal dialog, waitForCompletion must be false.

@param action action to be performed
@param provider the component provider from which to get action context; if null,
       then an empty context will used
@param wait if true wait for action to complete before returning,
		otherwise schedule action to be performed and return immediately.
Ghidra/Framework/Docking/src/main/java/docking/test/AbstractDockingTest.java