Skip to content

Commit 82cf9cc

Browse files
abstractundo
1 parent 487f1ba commit 82cf9cc

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.abstractundo;
2+
3+
import liquidjava.specification.ExternalRefinementsFor;
4+
import liquidjava.specification.StateRefinement;
5+
import liquidjava.specification.StateSet;
6+
7+
8+
9+
@StateSet({"aliveDone", "aliveNotDone", "notAlive"})
10+
@ExternalRefinementsFor("javax.swing.undo.AbstractUndoableEdit")
11+
public interface AbstractUndoRefinements {
12+
13+
@StateRefinement(to="aliveDone(this)")
14+
void AbstractUndoableEdit();
15+
16+
@StateRefinement(from="aliveNotDone(this)", to="aliveDone(this)")
17+
void redo();
18+
19+
@StateRefinement(from="aliveDone(this)", to="aliveNotDone(this)")
20+
void undo();
21+
22+
@StateRefinement(from="!notAlive(this)", to="notAlive(this)")
23+
void die();
24+
25+
26+
// anything
27+
// boolean canRedo();
28+
// boolean canUndo();
29+
30+
// boolean addEdit(UndoableEdit anEdit);
31+
// String getPresentationName();
32+
// String getRedoPresentationName();
33+
// String getUndoPresentationName();
34+
// boolean isSignificant();
35+
// boolean replaceEdit(UndoableEdit anEdit);
36+
// String toString();
37+
38+
39+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.abstractundo;
2+
3+
import javax.swing.undo.AbstractUndoableEdit;
4+
5+
public class TestAbstractUndo {
6+
7+
void test1(){
8+
AbstractUndoableEdit a = new AbstractUndoableEdit();
9+
a.redo();
10+
}
11+
12+
void test2(){
13+
AbstractUndoableEdit a = new AbstractUndoableEdit();
14+
a.undo();
15+
a.redo();
16+
a.undo();
17+
a.undo();
18+
}
19+
20+
void test3(){
21+
AbstractUndoableEdit a = new AbstractUndoableEdit();
22+
a.undo();
23+
a.redo();
24+
a.undo();
25+
a.die();
26+
a.redo();
27+
}
28+
}

0 commit comments

Comments
 (0)