private static ComponentProvider getComponentProviderForContext(ActionContext context) {
		ComponentProvider provider = context.getComponentProvider();
		if (provider != null) {
			return provider;
		}

		// Some context providers do not specify the provider when creating a contexts	
		DockingWindowManager dwm = DockingWindowManager.getActiveInstance();
		if (dwm == null) {
			return null; // this can happen sometimes in test environments
		}
		return dwm.getActiveComponentProvider();
	}
Called by the framework during startup to register actions that are shared throughout the 
tool.  See {@link SharedActionRegistry}.
@param tool the tool
@param toolActions the class to which the actions should be added
@param owner the shared action owner
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java