private boolean checkExclusiveAccess() {
		if (program.hasExclusiveAccess()) {
			return true;
		}
		String msg = "Close the file and undo your checkout,\n" +
			"then do a checkout with the exclusive lock.";

		DomainFile df = program.getDomainFile();
		if (df.modifiedSinceCheckout() || df.isChanged()) {
			msg = "Check in this file, then do a checkout with the\n" + "exclusive lock.";
		}

		Msg.showInfo(getClass(), MemoryMapProvider.this.getComponent(),
			"Exclusive Checkout Required", "An exclusive checkout is required in order to\n" +
				"manipulate memory blocks or change the image base.\n" + msg);
		return false;
	}
Provider for the memory map Component.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/MemoryMapProvider.java