private ActionContext getContext(WindowNode windowNode) {
		if (windowNode == null) {
			return null;
		}

		ActionContext context = null;
		ComponentPlaceholder placeholder = windowNode.getLastFocusedProviderInWindow();
		if (placeholder != null) {
			ComponentProvider provider = placeholder.getProvider();
			if (provider != null) {
				context = provider.getActionContext(null);
			}
		}
		if (context == null) {
			context = new DefaultActionContext();
		}
		return context;
	}
Class to manage all the global actions that show up on the main tool menubar or toolbar
Ghidra/Framework/Docking/src/main/java/docking/GlobalMenuAndToolBarManager.java