@Override
	public boolean applyTo(Program program) {
		try {
			Memory memory = program.getMemory();
			MemoryBlock block = createMemoryBlock(memory);
			block.setComment(comment);
			block.setRead(read);
			block.setWrite(write);
			block.setExecute(execute);
			block.setVolatile(isVolatile);
			block.setArtificial(isArtificial);
			block.setSourceName(source);
			renameFragment(program, block.getStart());
			return true;
		}
		catch (IllegalArgumentException e) {
			message = e.getMessage();
		}
		catch (AddressOverflowException e) {
			message = e.getMessage();
		}
		catch (MemoryConflictException e) {
			message = e.getMessage();
		}
		catch (IllegalStateException e) {
			message = e.getMessage();
		}
		catch (Throwable t) {
			message = "Create block failed";
			Msg.showError(this, null, "Create Block Failed", t.getMessage(), t);
		}
		throw new RollbackException(message);
	}
Prior to command execution the block's artificial attribute state may be specified
and will be applied to the new memory block.
@param a block artificial attribute state
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/memory/AbstractAddMemoryBlockCmd.java