Classes for the creation of undoable operations which can be added to an operations history to be undone and redone.

Package Specification

An undoable operation is unit of work that can be executed, undone, and redone. It can be added to an operation history so that clients can provide undo and redo of operations in the history. Operations may be assigned one or more undo contexts which can be used to filter the available operations in a history. Clients may choose to provide undo and redo support for all operations in a history or only a certain context in that history. In this way, support for global undo or a localized/filtered undo can be provided. Operation histories may be configured with an operation approver so that applications can enforce any desired undo model, such as strict linear (LIFO) undo. This package provides the definition and a basic implementation for operations, contexts, histories, and approvers.