public static void createSharedActions(Tool tool, ToolActions toolActions, String owner) {

		// An action to close the provider on Escape if the provider is the last in the window. This 
		// allows users to close transient providers (like search results) easily. 
		DockingAction closeAction = new ActionBuilder("Close Window for Last Provider", owner)
				.sharedKeyBinding()
				.keyBinding("ESCAPE")
				.enabledWhen(c -> {
					ComponentProvider provider = getComponentProviderForContext(c);
					if (provider == null) {
						return false;
					}
					Tool t = provider.getTool();
					DockingWindowManager dwm = t.getWindowManager();
					if (!dwm.isLastProviderInDetachedWindow(provider)) {
						return false; // not the only provider
					}
					return containsFocusOwner(provider);
				})
				.onAction(c -> {
					ComponentProvider provider = getComponentProviderForContext(c);
					provider.closeComponent();
				})
				.build();
		toolActions.addGlobalAction(closeAction);
	}
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