private void renameOverlaySpace(ActionContext c) {
		if (!checkExclusiveAccess()) {
			return;
		}
		if (!program.canLock()) {
			setStatusText("Program is busy, try again later");
			return;
		}
		MemoryBlock block = getSelectedBlock();
		if (block == null || !block.isOverlay()) {
			return;
		}
		OverlayAddressSpace overlaySpace = (OverlayAddressSpace) block.getStart().getAddressSpace();
		String oldName = overlaySpace.getName();

		String newName = OptionDialog.showInputSingleLineDialog(getComponent(),
			"Rename Overlay Space", "New Name:", oldName);
		if (newName == null || oldName.equals(newName)) {
			return;
		}

		try {
			program.withTransaction("Rename Overlay Space: " + oldName, () -> {
				program.renameOverlaySpace(oldName, newName);
			});
		}
		catch (UsrException e) {
			Msg.showError(this, getComponent(), "Rename Overlay Error", e.getMessage());
		}
	}
Class to Handle Mouse events on Memory Map Table component
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/MemoryMapProvider.java