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

		DockingAction closeAction = new ActionBuilder(CLOSE_ACTION_NAME, owner)
				.sharedKeyBinding()
				.keyBinding(ESC_KEYSTROKE)
				.withContext(DialogActionContext.class)
				.enabledWhen(c -> c.getDialogComponentProvider() != null)
				.onAction(c -> {
					DialogComponentProvider dcp = c.getDialogComponentProvider();
					dcp.escapeCallback();
				})
				.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/DialogComponentProvider.java