Model-based system and method for undoing actions in an application
First Claim
1. A method for undoing actions in an application comprising:
- launching an undo management process configured to operate with the application;
building an object model for objects invoked by the application, wherein the object model comprises an object tree data structure having nodes containing metadata of an object;
taking a first snapshot of the object model;
freezing the object model;
receiving a first action from the application comprising an edit to be applied to the object at a leaf node of the object tree data structure;
unfreezing a first portion of the object tree data structure along a path of object nodes from the leaf node being modified by the edit up to its root node;
applying the edit to the object at the leaf node of the object tree data structure;
re-freezing the first portion of the object tree data structure to obtain a re-frozen object model;
taking a second snapshot of the re-frozen object model;
storing a difference between the first snapshot and the second snapshot into a first memory buffer as difference data representing the first action;
receiving a second action from the application comprising an undo command configured to undo the first action comprising the edit to the object;
retrieving the difference data representing the first action from the first memory buffer;
storing the difference data into a second memory buffer; and
undoing the first action comprising the edit to the object by restoring the object model back to its state when the first snapshot was taken.
1 Assignment
0 Petitions
Accused Products
Abstract
An improved model-based approach for undoing actions in an application that was not previously configured with an undo feature is disclosed. Object models are constructed for each object invoked by the application. Snapshots of the object model are captured after every action to preserve the object model state at different points in time. The object model includes an object tree data structure having multiple nodes comprising data and metadata for the object. The object model is frozen and editing of the object is only permitted via an undo management engine. In response to edits from the application, the undo management engine responds by unfreezing the path of object nodes from leaf node to root node in the object tree data structure. Edits are applied to the object model at the leaf node. The object model can then be re-frozen to maintain the state of the object after each action.
-
Citations
22 Claims
-
1. A method for undoing actions in an application comprising:
-
launching an undo management process configured to operate with the application; building an object model for objects invoked by the application, wherein the object model comprises an object tree data structure having nodes containing metadata of an object; taking a first snapshot of the object model; freezing the object model; receiving a first action from the application comprising an edit to be applied to the object at a leaf node of the object tree data structure; unfreezing a first portion of the object tree data structure along a path of object nodes from the leaf node being modified by the edit up to its root node; applying the edit to the object at the leaf node of the object tree data structure; re-freezing the first portion of the object tree data structure to obtain a re-frozen object model; taking a second snapshot of the re-frozen object model; storing a difference between the first snapshot and the second snapshot into a first memory buffer as difference data representing the first action; receiving a second action from the application comprising an undo command configured to undo the first action comprising the edit to the object; retrieving the difference data representing the first action from the first memory buffer; storing the difference data into a second memory buffer; and undoing the first action comprising the edit to the object by restoring the object model back to its state when the first snapshot was taken. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for undoing actions in an application comprising:
-
a processor; a system memory in communication with the processor via a communication link, the system memory configured to store computer code, which when executed by the processor, causes the processor to perform operations comprising; launching an undo management process configured to operate with the application; building an object model for objects invoked by the application, wherein the object model comprises an object tree data structure having nodes containing metadata of an object; taking a first snapshot of the object model; freezing the object model; receiving a first action from the application comprising an edit to be applied to the object at a leaf node of the object tree data structure; unfreezing a first portion of the object tree data structure along a path of object nodes from the leaf node being modified by the edit up to its root node; applying the edit to the object at the leaf node of the object tree data structure; re-freezing the first portion of the object tree data structure to obtain a re-frozen object model; taking a second snapshot of the re-frozen object model; storing a difference between the first snapshot and the second snapshot into a first memory buffer as difference data representing the first action; receiving a second action from the application comprising an undo command configured to undo the first action comprising the edit to the object; retrieving the difference data representing the first action from the first memory buffer; storing the difference data into a second memory buffer; and undoing the first action comprising the edit to the object by restoring the object model back to its state when the first snapshot was taken. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A non-transitory computer readable storage medium tangibly embodying computer code, which when executed by a computer system, causes the computer system to perform operations for undoing actions in an application, the operations comprising:
-
building an object model for objects invoked by the application, wherein the object model comprises an object tree data structure having nodes containing metadata of an object; taking a first snapshot of the object model; freezing the object model; receiving a first action from the application comprising an edit to be applied to the object at a leaf node of the object tree data structure; unfreezing a first portion of the object tree data structure along a path of object nodes from the leaf node being modified by the edit up to its root node; applying the edit to the object at the leaf node of the object tree data structure; re-freezing the first portion of the object tree data structure to obtain a re-frozen object model; taking a second snapshot of the re-frozen object model; storing a difference between the first snapshot and the second snapshot into a first memory buffer as difference data representing the first action; receiving a second action from the application comprising an undo command configured to undo the first action comprising the edit to the object; retrieving the difference data representing the first action from the first memory buffer; storing the difference data into a second memory buffer; and undoing the first action comprising the edit to the object by restoring the object model back to its state when the first snapshot was taken. - View Dependent Claims (17, 18, 19, 20, 21, 22)
-
Specification