boolean execute() {

		validateInfo();
		if (!isValid) {
			return false;
		}
		AbstractAddMemoryBlockCmd cmd = createAddBlockCommand();
		cmd.setArtificial(isArtificial);
		if (!tool.execute(cmd, program)) {
			message = cmd.getStatusMsg();
			return false;
		}
		return true;
	}
Model to manage adding a memory block.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/AddBlockModel.java