<s>
Undo	B-Application
is	O
an	O
interaction	O
technique	O
which	O
is	O
implemented	O
in	O
many	O
computer	O
programs	O
.	O
</s>
<s>
In	O
some	O
more	O
advanced	O
programs	O
,	O
such	O
as	O
graphic	B-Application
processing	I-Application
,	O
undo	B-Application
will	O
negate	O
the	O
last	O
command	B-Device
done	O
to	O
the	O
file	O
being	O
edited	O
.	O
</s>
<s>
With	O
the	O
possibility	O
of	O
undo	B-Application
,	O
users	O
can	O
explore	O
and	O
work	O
without	O
fear	O
of	O
making	O
mistakes	O
,	O
because	O
they	O
can	O
easily	O
be	O
undone	O
.	O
</s>
<s>
The	O
expectations	O
for	O
undo	B-Application
are	O
easy	O
to	O
understand	O
:	O
to	O
have	O
a	O
predictable	O
functionality	O
,	O
and	O
to	O
include	O
all	O
"	O
undoable	B-Application
"	O
commands	O
.	O
</s>
<s>
Usually	O
undo	B-Application
is	O
available	O
until	O
the	O
user	O
undoes	B-Application
all	O
executed	O
operations	O
.	O
</s>
<s>
But	O
there	O
are	O
some	O
actions	O
which	O
are	O
not	O
stored	O
in	O
the	O
undo	B-Application
list	O
,	O
and	O
thus	O
they	O
cannot	O
be	O
undone	O
.	O
</s>
<s>
For	O
example	O
,	O
save	O
file	O
is	O
not	O
undoable	B-Application
,	O
but	O
is	O
queued	O
in	O
the	O
list	O
to	O
show	O
that	O
it	O
was	O
executed	O
.	O
</s>
<s>
Another	O
action	O
which	O
is	O
usually	O
not	O
stored	O
,	O
and	O
thus	O
not	O
undoable	B-Application
,	O
is	O
scrolling	O
or	O
selection	O
.	O
</s>
<s>
The	O
opposite	O
of	O
undo	B-Application
is	O
redo	B-Application
.	O
</s>
<s>
The	O
redo	B-Application
command	B-Device
reverses	O
the	O
undo	B-Application
or	O
advances	O
the	O
buffer	O
to	O
a	O
more	O
recent	O
state	O
.	O
</s>
<s>
The	O
common	O
components	O
of	O
undo	B-Application
functionality	O
are	O
the	O
commands	O
which	O
were	O
executed	O
of	O
the	O
user	O
,	O
the	O
history	O
buffer(s )	O
which	O
stores	O
the	O
completed	O
actions	O
,	O
the	O
undo/redo	O
manager	O
for	O
controlling	O
the	O
history	O
buffer	O
,	O
and	O
the	O
user	O
interface	O
for	O
interacting	O
with	O
the	O
user	O
.	O
</s>
<s>
In	O
most	O
Microsoft	B-Application
Windows	I-Application
applications	O
,	O
the	O
keyboard	O
shortcut	O
for	O
the	O
undo	B-Application
command	I-Application
is	O
Ctrl+Z	O
or	O
Alt+Backspace	O
,	O
and	O
the	O
shortcut	O
for	O
redo	B-Application
is	O
Ctrl+Y	B-Device
or	O
Ctrl+Shift+Z	O
.	O
</s>
<s>
In	O
most	O
Apple	B-Device
Macintosh	I-Device
applications	O
,	O
the	O
shortcut	O
for	O
the	O
undo	B-Application
command	I-Application
is	O
Command-Z	B-Application
,	O
and	O
the	O
shortcut	O
for	O
redo	B-Application
is	O
Command-Shift-Z	B-Application
.	O
</s>
<s>
On	O
all	O
platforms	O
,	O
the	O
undo/redo	O
functions	O
can	O
also	O
be	O
accessed	O
via	O
the	O
Edit	O
menu	O
.	O
</s>
<s>
The	O
ability	O
to	O
undo	B-Application
an	O
operation	O
on	O
a	O
computer	O
was	O
independently	O
invented	O
multiple	O
times	O
,	O
in	O
response	O
to	O
how	O
people	O
used	O
computers	O
.	O
</s>
<s>
The	O
File	O
Retrieval	O
and	O
Editing	O
System	O
,	O
developed	O
starting	O
in	O
1968	O
at	O
Brown	O
University	O
,	O
is	O
reported	O
to	O
be	O
the	O
first	O
computer-based	O
system	O
to	O
have	O
had	O
an	O
"	O
undo	B-Application
"	O
feature	O
.	O
</s>
<s>
Warren	O
Teitelman	O
developed	O
a	O
Programmer	O
's	O
Assistant	O
as	O
part	O
of	O
BBN-LISP	O
with	O
an	O
Undo	B-Application
function	O
,	O
by	O
1971	O
.	O
</s>
<s>
The	O
Xerox	O
PARC	O
Bravo	B-Application
text	O
editor	O
had	O
an	O
Undo	B-Application
command	I-Application
in	O
1974	O
.	O
</s>
<s>
A	O
1976	O
research	O
report	O
by	O
Lance	O
A	O
.	O
Miller	O
and	O
John	O
C	O
.	O
Thomas	O
of	O
IBM	O
,	O
Behavioral	O
Issues	O
in	O
the	O
Use	O
of	O
Interactive	O
Systems	O
,	O
noted	O
that	O
"	O
it	O
would	O
be	O
quite	O
useful	O
to	O
permit	O
users	O
to	O
'	O
take	O
back	O
 '	O
at	O
least	O
the	O
immediately	O
preceding	O
command	B-Device
(	O
by	O
issuing	O
some	O
special	O
'	O
undo	B-Application
 '	O
command	B-Device
)	O
.	O
"	O
</s>
<s>
The	O
programmers	O
at	O
the	O
Xerox	O
PARC	O
research	O
center	O
assigned	O
the	O
keyboard	O
shortcut	O
Ctrl-Z	O
to	O
the	O
undo	B-Application
command	I-Application
,	O
which	O
became	O
a	O
crucial	O
feature	O
of	O
text	O
editors	O
and	O
word	O
processors	O
in	O
the	O
personal	B-Device
computer	I-Device
era	O
.	O
</s>
<s>
There	O
,	O
he	O
and	O
Bill	O
Atkinson	O
advocated	O
for	O
the	O
presence	O
of	O
an	O
undo	B-Application
command	I-Application
as	O
a	O
standard	O
fixture	O
on	O
the	O
Apple	B-Device
Lisa	I-Device
.	O
</s>
<s>
Atkinson	O
was	O
able	O
to	O
convince	O
the	O
individual	O
developers	O
of	O
the	O
Lisa	B-Device
's	O
application	O
software	O
to	O
include	O
a	O
single	O
level	O
of	O
undo	B-Application
and	O
redo	B-Application
,	O
but	O
was	O
unsuccessful	O
in	O
lobbying	O
for	O
multiple	O
levels	O
.	O
</s>
<s>
When	O
Apple	O
introduced	O
the	O
Lisa	B-Device
's	O
successor	O
,	O
the	O
Macintosh	B-Device
,	O
it	O
stipulated	O
that	O
all	O
standard	O
applications	O
should	O
include	O
an	O
“	O
Undo	B-Application
”	O
as	O
the	O
first	O
command	B-Device
in	O
the	O
“	O
Edit	O
”	O
menu	O
,	O
which	O
has	O
remained	O
the	O
standard	O
on	O
macOS	B-Application
and	O
Windows	O
to	O
this	O
day	O
.	O
</s>
<s>
Multi-level	O
undo	B-Application
commands	I-Application
were	O
introduced	O
in	O
the	O
1980s	O
,	O
allowing	O
the	O
users	O
to	O
take	O
back	O
a	O
series	O
of	O
actions	O
,	O
not	O
just	O
the	O
most	O
recent	O
one	O
.	O
</s>
<s>
EMACS	B-Application
and	O
other	O
timeshared	O
screen	O
editors	O
had	O
it	O
before	O
personal	B-Device
computer	I-Device
software	O
.	O
</s>
<s>
CygnusEd	B-Device
was	O
the	O
first	O
Amiga	O
text	O
editor	O
with	O
an	O
unlimited	O
undo/redo	O
feature	O
.	O
</s>
<s>
AtariWriter	B-Protocol
,	O
a	O
word-processing	O
application	O
introduced	O
in	O
1982	O
,	O
featured	O
undo	B-Application
.	O
</s>
<s>
NewWord	O
,	O
another	O
word-processing	O
program	O
released	O
by	O
NewStar	O
in	O
1984	O
,	O
had	O
an	O
unerase	O
command	B-Device
.	O
</s>
<s>
IBM	O
's	O
VisiWord	O
also	O
had	O
an	O
undelete	O
command	B-Device
.	O
</s>
<s>
Undo	B-Application
models	O
can	O
be	O
categorized	O
as	O
linear	O
or	O
non-linear	O
.	O
</s>
<s>
The	O
non-linear	O
undo	B-Application
model	O
can	O
be	O
sub-classified	O
in	O
script	O
model	O
,	O
us&r	O
model	O
,	O
triadic	O
model	O
,	O
and	O
selective	O
undo	B-Application
.	O
</s>
<s>
This	O
means	O
that	O
a	O
command	B-Device
"	O
is	O
always	O
undone	O
in	O
the	O
state	O
that	O
was	O
reached	O
after	O
the	O
original	O
execution.	O
"	O
</s>
<s>
weakened	O
stable	O
execution	O
:	O
This	O
means	O
that	O
if	O
undo	B-Application
is	O
executed	O
all	O
commands	O
which	O
depend	O
on	O
the	O
undone	O
command	B-Device
are	O
undone	O
dependent	O
on	O
the	O
command	B-Device
.	O
</s>
<s>
commutative	O
:	O
That	O
means	O
that	O
the	O
reached	O
state	O
after	O
undo	B-Application
and	O
redo	B-Application
two	O
different	O
commands	O
is	O
the	O
same	O
when	O
they	O
are	O
executed	O
in	O
the	O
converse	O
order	O
.	O
</s>
<s>
minimalistic	O
undo	B-Application
property	O
:	O
It	O
describes	O
that	O
"	O
undo	B-Application
operation	O
of	O
command	B-Device
C	O
undoes	B-Application
only	O
command	B-Device
C	O
and	O
all	O
commands	O
younger	O
than	O
C	O
which	O
are	O
dependent	O
on	O
C.	O
"	O
</s>
<s>
Linear	O
undo	B-Application
is	O
implemented	O
with	O
a	O
stack	B-Application
(	O
last	O
in	O
first	O
out	O
(	O
LIFO	B-Application
)	O
data	O
structure	O
)	O
that	O
stores	O
a	O
history	O
of	O
all	O
executed	O
commands	O
.	O
</s>
<s>
When	O
a	O
new	O
command	B-Device
is	O
executed	O
it	O
is	O
added	O
to	O
the	O
top	O
of	O
stack	B-Application
.	O
</s>
<s>
Therefore	O
,	O
only	O
the	O
last	O
executed	O
command	B-Device
can	O
be	O
undone	O
and	O
removed	O
from	O
the	O
history	O
.	O
</s>
<s>
Undo	B-Application
can	O
be	O
repeated	O
as	O
long	O
as	O
the	O
history	O
is	O
not	O
empty	O
.	O
</s>
<s>
The	O
restricted	O
linear	O
model	O
is	O
an	O
augmentation	O
of	O
the	O
linear	O
undo	B-Application
model	O
.	O
</s>
<s>
It	O
satisfies	O
the	O
above	O
described	O
stable	O
execution	O
property	O
for	O
linear	O
undo	B-Application
,	O
because	O
this	O
model	O
does	O
not	O
keep	O
the	O
property	O
if	O
a	O
command	B-Device
is	O
done	O
while	O
the	O
history	O
list	O
includes	O
other	O
commands	O
.	O
</s>
<s>
The	O
restricted	O
linear	O
model	O
clears	O
the	O
history	O
list	O
before	O
a	O
new	O
command	B-Device
is	O
added	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
size	O
of	O
the	O
history	O
list	O
can	O
be	O
restricted	O
or	O
when	O
a	O
defined	O
size	O
is	O
reached	O
,	O
the	O
first	O
executed	O
command	B-Device
is	O
deleted	O
from	O
the	O
list	O
.	O
</s>
<s>
The	O
main	O
difference	O
between	O
linear	O
undo	B-Application
and	O
non-linear	O
undo	B-Application
is	O
the	O
possibility	O
of	O
the	O
user	O
to	O
undo	B-Application
the	O
executed	O
commands	O
in	O
an	O
arbitrary	O
order	O
.	O
</s>
<s>
They	O
have	O
the	O
chance	O
to	O
undo	B-Application
not	O
the	O
most	O
recently	O
command	B-Device
but	O
rather	O
choose	O
a	O
command	B-Device
from	O
the	O
list	O
.	O
</s>
<s>
The	O
history	O
list	O
of	O
the	O
executed	O
commands	O
are	O
interpreted	O
"	O
as	O
a	O
script	O
,	O
the	O
effect	O
of	O
an	O
undo	B-Application
is	O
defined	O
to	O
be	O
the	O
same	O
as	O
if	O
the	O
undone	O
action	O
had	O
never	O
occurred	O
in	O
the	O
first	O
place.	O
"	O
</s>
<s>
As	O
the	O
result	O
of	O
undo	B-Application
the	O
state	O
has	O
to	O
be	O
the	O
way	O
as	O
if	O
the	O
undone	O
command	B-Device
was	O
never	O
executed	O
.	O
</s>
<s>
A	O
disadvantage	O
of	O
this	O
model	O
is	O
that	O
the	O
user	O
has	O
to	O
know	O
the	O
connection	O
between	O
undone	O
command	B-Device
and	O
the	O
current	O
state	O
to	O
avoid	O
side	O
effects	O
.	O
</s>
<s>
The	O
special	O
feature	O
of	O
this	O
model	O
is	O
that	O
it	O
has	O
the	O
option	O
of	O
skipping	O
a	O
command	B-Device
.	O
</s>
<s>
This	O
means	O
that	O
redoing	O
a	O
command	B-Device
can	O
be	O
skipped	O
.	O
</s>
<s>
The	O
command	B-Device
which	O
is	O
skipped	O
is	O
marked	O
as	O
skipped	O
but	O
not	O
deleted	O
.	O
</s>
<s>
Even	O
though	O
the	O
set	O
of	O
commands	O
is	O
simple	O
and	O
easy	O
to	O
understand	O
,	O
the	O
complex	O
structure	O
with	O
skipping	O
and	O
linking	O
branches	O
is	O
hard	O
to	O
comprehend	O
and	O
to	O
remember	O
,	O
when	O
the	O
user	O
wants	O
to	O
undo	B-Application
more	O
than	O
one	O
step	O
.	O
</s>
<s>
This	O
non-linear	O
undo	B-Application
model	O
has	O
besides	O
undo	B-Application
and	O
redo	B-Application
the	O
possibility	O
to	O
rotate	O
.	O
</s>
<s>
It	O
has	O
the	O
same	O
data	O
structure	O
as	O
the	O
above-mentioned	O
models	O
with	O
a	O
history	O
list	O
and	O
a	O
separated	O
redo	B-Application
list	O
which	O
includes	O
the	O
redo	B-Application
operations	O
.	O
</s>
<s>
The	O
rotate	O
operation	O
sets	O
the	O
last	O
command	B-Device
of	O
the	O
redo	B-Application
list	O
in	O
front	O
of	O
it	O
.	O
</s>
<s>
On	O
one	O
hand	O
this	O
means	O
that	O
the	O
next	O
command	B-Device
to	O
be	O
redone	O
can	O
be	O
selected	O
by	O
placing	O
it	O
in	O
front	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
rotation	O
can	O
be	O
used	O
"	O
to	O
select	O
the	O
place	O
in	O
the	O
redo	B-Application
list	O
where	O
the	O
next	O
undo	B-Application
operation	O
will	O
put	O
the	O
command	B-Device
"	O
.	O
</s>
<s>
The	O
list	O
of	O
redo	B-Application
is	O
therefore	O
unordered	O
.	O
</s>
<s>
"	O
To	O
undo	B-Application
an	O
isolated	O
command	B-Device
,	O
the	O
user	O
has	O
to	O
undo	B-Application
a	O
number	O
of	O
steps	O
,	O
rotate	O
the	O
redo	B-Application
list	O
,	O
and	O
then	O
redo	B-Application
a	O
number	O
of	O
steps	O
"	O
.	O
</s>
<s>
For	O
redo	B-Application
the	O
list	O
has	O
to	O
be	O
rotated	O
until	O
the	O
wanted	O
command	B-Device
is	O
above	O
.	O
</s>
<s>
say	O
that	O
selective	O
undo	B-Application
is	O
a	O
feature	O
which	O
a	O
model	O
can	O
offer	O
but	O
for	O
selective	O
undo	B-Application
there	O
is	O
no	O
clear	O
definition	O
.	O
</s>
<s>
The	O
authors	O
selected	O
functions	O
which	O
a	O
model	O
should	O
have	O
when	O
it	O
supports	O
selective	O
undo	B-Application
.	O
</s>
<s>
It	O
should	O
be	O
possible	O
to	O
"	O
undo	B-Application
any	O
executed	O
action	O
in	O
the	O
history	O
buffer	O
.	O
</s>
<s>
Just	O
like	O
that	O
redo	B-Application
has	O
to	O
be	O
possible	O
to	O
any	O
undone	O
command	B-Device
.	O
</s>
<s>
The	O
third	O
function	O
for	O
selective	O
undo	B-Application
is	O
that	O
"	O
no	O
command	B-Device
can	O
be	O
automatically	O
discarded	O
from	O
history	O
buffer	O
without	O
direct	O
user	O
’s	O
request.	O
"	O
</s>
<s>
For	O
selective	O
undo	B-Application
applies	O
that	O
undo	B-Application
and	O
redo	B-Application
is	O
executable	O
outside	O
of	O
any	O
context	O
.	O
</s>
<s>
The	O
second	O
issue	O
that	O
modified	O
commands	O
can	O
be	O
undone	O
and	O
so	O
it	O
has	O
to	O
be	O
solved	O
which	O
state	O
after	O
undo	B-Application
will	O
be	O
presented	O
.	O
</s>
<s>
The	O
third	O
issue	O
is	O
discarding	O
command	B-Device
problems	O
.	O
</s>
<s>
Selective	O
undo	B-Application
has	O
no	O
pointer	O
in	O
the	O
lists	O
,	O
so	O
this	O
means	O
that	O
no	O
command	B-Device
should	O
be	O
discarded	O
of	O
the	O
stack	B-Application
.	O
</s>
<s>
Direct	O
selective	O
undo	B-Application
is	O
an	O
extension	O
of	O
restricted	O
linear	O
undo	B-Application
with	O
a	O
history	O
tree	O
.	O
</s>
<s>
The	O
operation	O
creates	O
a	O
copy	O
of	O
the	O
selected	O
command	B-Device
,	O
executes	O
this	O
and	O
add	O
it	O
to	O
the	O
history	O
list	O
.	O
</s>
<s>
There	O
two	O
non-linear	O
operations	O
selective	O
undo	B-Application
and	O
selective	O
redo	B-Application
are	O
defined	O
,	O
so	O
it	O
is	O
more	O
symmetric	O
.	O
</s>
<s>
When	O
multiple	O
users	O
can	O
edit	O
the	O
same	O
document	O
simultaneously	O
,	O
a	O
multi-user	O
undo	B-Application
is	O
needed	O
.	O
</s>
<s>
Global	O
multi-user	O
undo	B-Application
reverts	O
the	O
latest	O
action	O
made	O
to	O
the	O
document	O
,	O
regardless	O
of	O
who	O
performed	O
the	O
edit	O
.	O
</s>
<s>
Local	O
multi-user	O
undo	B-Application
only	O
reverts	O
actions	O
done	O
by	O
the	O
local	O
user	O
,	O
which	O
requires	O
a	O
non-linear	O
undo	B-Application
implementation	O
.	O
</s>
<s>
Where	O
undo	B-Application
can	O
be	O
used	O
to	O
backtrack	O
through	O
multiple	O
edits	O
,	O
the	O
redo	B-Application
command	B-Device
goes	O
forward	O
through	O
the	O
action	O
history	O
.	O
</s>
<s>
Making	O
a	O
new	O
edit	O
usually	O
clears	O
the	O
redo	B-Application
list	O
.	O
</s>
<s>
If	O
a	O
branching	O
redo	B-Application
model	O
is	O
used	O
,	O
the	O
new	O
edit	O
branches	O
the	O
action	O
history	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
default	O
undo/redo	O
stack	B-Application
size	O
in	O
Adobe	B-Operating_System
Photoshop	I-Operating_System
is	O
20	O
but	O
can	O
be	O
changed	O
by	O
the	O
user	O
.	O
</s>
<s>
As	O
another	O
example	O
,	O
earlier	O
versions	O
of	O
Microsoft	B-Application
Paint	I-Application
only	O
allowed	O
up	O
to	O
three	O
edits	O
to	O
be	O
undone	O
;	O
the	O
version	O
introduced	O
in	O
Windows	O
7	O
increased	O
this	O
limit	O
to	O
50	O
.	O
</s>
<s>
Simplistic	O
,	O
single-edit	O
undo	B-Application
features	O
sometimes	O
do	O
away	O
with	O
"	O
redo	B-Application
"	O
by	O
treating	O
the	O
undo	B-Application
command	I-Application
itself	O
as	O
an	O
action	O
that	O
can	O
be	O
undone	O
.	O
</s>
<s>
This	O
is	O
known	O
as	O
the	O
flip	O
undo	B-Application
model	O
,	O
because	O
the	O
user	O
can	O
flip	O
between	O
two	O
program	O
states	O
using	O
the	O
undo	B-Application
command	I-Application
.	O
</s>
<s>
This	O
was	O
the	O
standard	O
model	O
prior	O
to	O
the	O
widespread	O
adoption	O
of	O
multiple-level	O
undo	B-Application
in	O
the	O
early	O
1990s	O
.	O
</s>
<s>
Undo	B-Application
can	O
be	O
implemented	O
through	O
different	O
patterns	O
.	O
</s>
<s>
The	O
most	O
common	O
patterns	O
are	O
command	B-Language
pattern	I-Language
and	O
memento	B-Language
pattern	I-Language
.	O
</s>
<s>
The	B-Language
command	I-Language
pattern	I-Language
is	O
a	O
software	O
design	O
pattern	O
which	O
encapsulates	O
information	O
from	O
the	O
operation	O
into	O
command	B-Device
objects	O
.	O
</s>
<s>
The	O
abstract	O
command	B-Device
class	O
implements	O
an	O
abstract	O
execute	O
operation	O
,	O
so	O
every	O
command	B-Device
object	O
has	O
an	O
execute	O
operation	O
.	O
</s>
<s>
For	O
undo	B-Application
there	O
also	O
have	O
to	O
be	O
unexecuted	O
operation	O
,	O
which	O
undoes	B-Application
the	O
effect	O
of	O
the	O
executed	O
command	B-Device
,	O
which	O
are	O
stored	O
in	O
a	O
history	O
list	O
.	O
</s>
<s>
Undo	B-Application
and	O
redo	B-Application
are	O
implemented	O
so	O
that	O
the	O
list	O
is	O
run	O
through	O
forwards	O
and	O
backwards	O
when	O
the	O
execute	O
or	O
unexecute	O
command	B-Device
is	O
called	O
.	O
</s>
<s>
For	O
single	O
undo	B-Application
only	O
the	O
executed	O
command	B-Device
is	O
stored	O
.	O
</s>
<s>
In	O
contrast	O
to	O
the	O
multi	O
level	O
undo	B-Application
where	O
not	O
only	O
the	O
history	O
list	O
with	O
the	O
commands	O
is	O
saved	O
but	O
also	O
the	O
number	O
of	O
undo	B-Application
levels	O
can	O
be	O
determined	O
of	O
the	O
maximum	O
length	O
of	O
the	O
list	O
.	O
</s>
<s>
With	O
memento	B-Language
pattern	I-Language
the	O
internal	O
state	O
of	O
an	O
object	O
is	O
stored	O
.	O
</s>
<s>
This	O
returns	O
a	O
memento	O
,	O
initialized	O
with	O
information	O
of	O
the	O
current	O
state	O
,	O
when	O
undo	B-Application
is	O
executed	O
,	O
so	O
that	O
the	O
state	O
can	O
be	O
checked	O
.	O
</s>
<s>
In	O
memento	B-Language
pattern	I-Language
the	O
undo	B-Application
mechanism	O
is	O
called	O
caretaker	O
.	O
</s>
<s>
For	O
undo	B-Application
the	O
caretaker	O
requests	O
a	O
memento	O
of	O
the	O
originator	O
and	O
then	O
applying	O
the	O
undo	B-Application
.	O
</s>
<s>
The	O
most	O
part	O
of	O
undo	B-Application
mechanism	O
can	O
implemented	O
without	O
dependency	O
to	O
specific	O
applications	O
or	O
command	B-Device
classes	O
.	O
</s>
<s>
This	O
includes	O
"	O
the	O
management	O
of	O
history	O
list	O
,	O
the	O
history	O
scroller	O
,	O
menu	O
entries	O
for	O
undo	B-Application
and	O
redo	B-Application
and	O
update	O
of	O
the	O
menu	O
entries	O
depending	O
on	O
the	O
name	O
of	O
the	O
next	O
available	O
command.	O
"	O
</s>
<s>
Every	O
command	B-Device
class	O
has	O
a	O
do	O
method	O
which	O
is	O
called	O
when	O
a	O
command	B-Device
is	O
executed	O
.	O
</s>
<s>
The	O
undo-method	O
implements	O
the	O
reverse	O
operation	O
of	O
the	O
do-method	O
.	O
</s>
<s>
full	O
checkpoint	O
:	O
That	O
means	O
that	O
the	O
complete	O
state	O
is	O
saved	O
after	O
a	O
command	B-Device
is	O
executed	O
.	O
</s>
<s>
The	O
changed	O
application	O
state	O
is	O
saved	O
and	O
with	O
undo	B-Application
the	O
part	O
of	O
the	O
state	O
is	O
set	O
back	O
to	O
the	O
forward	O
value	O
.	O
</s>
<s>
For	O
selective	O
undo	B-Application
there	O
is	O
not	O
enough	O
information	O
for	O
saving	O
the	O
state	O
.	O
</s>
