protected override void Undo(
			BlockCommandContext context,
			Block block)
        {
            // Revert the block type.
            block.SetBlockType(previousBlockType);
        }
        protected override void Do(
			BlockCommandContext context,
			Block block)
        {
            // We need to keep track of the previous block type so we can change
            // it back with Undo.
            previousBlockType = block.BlockType;

            // Set the block type.
            block.SetBlockType(BlockType);

            // Save the position from this command.
            if (UpdateTextPosition.HasFlag(DoTypes.Do))
            {
                context.Position = new BlockPosition(BlockKey, 0);
            }
        }