public ActionContext createActionContext(DockingActionIf action) {
		ComponentProvider provider = getActiveComponentProvider();
		ActionContext context = provider == null ? null : provider.getActionContext(null);
		if (context != null && action.isValidContext(context)) {
			return context;
		}

		// Some actions work on a non-active, default component provider. See if this action
		// supports that.
		if (action.supportsDefaultContext()) {
			context = getDefaultContext(action.getContextClass());
			if (context != null) {
				return context;
			}
		}
		return new DefaultActionContext(provider, null);
	}
Creates the {@link ActionContext} appropriate for the given action. This will normally be the
context from the currently focused {@link ComponentProvider}. If that context is not valid
for the given action and the action supports using the default tool context, then the default
tool context will be returned. Otherwise, returns a generic ActionContext.

@param action the action for which to get an {@link ActionContext}
@return the {@link ActionContext} appropriate for the given action or null
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java