Upload
paultaele
View
145
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
Task Notes for Paul Taele
Week 5: Thursday
Data Structure forDebugging Sketches
Record Class
Record:Data structure for debugging sketches.
Sketch:Holds the before-sketch.
MethodCall:Holds the name of the method call.
Extracting “Bad” Stroke undo() Case
Step #1:Deserialize sketch XML file.
SketchXML file
Extracting “Bad” Stroke undo() Case
Step #2:Extract recursive strokes from the sketch object. Sketch
XML file
SketchObject
Extracting “Bad” Stroke undo() Case
Step #3:Recursively get all strokes in sketch.
RecursiveStrokes
SketchXML file
SketchObject
Extracting “Bad” Stroke undo() Case
Step #4:Extract the stroke with newest time stamp.
Last Stroke
RecursiveStrokes
SketchXML file
SketchObject
Proposed Undo/ClearMethod Edits
Enter
Exit
Magic
Undo/Clear: Current Implementation
Current Implementation: Does “magic” to undo and clear a sketch.
Enter
Exit
Magic
Proposed Changes
CacheSketch
Addition #1:Cache the sketch before undo/clear.
Enter
Exit
Magic
Proposed Changes
CacheSketch
Add toRecord
Addition #2:Store the sketch and label of method call into a record.
Enter
Exit
Magic
Proposed Changes
CacheSketch
Add toRecord
Locally Save
Record
Addition #3:Locally save record to disk.
Saving Debugging Sketch
Start
StartMecha
nix
Start
StartMecha
nix
Timestamp1
Start -> Undo
StartMecha
nixUndo
Timestamp1
Start -> Undo
StartMecha
nixUndo
Timestamp1
Timestamp2-
Undo.xml
Start -> Undo -> Clear
StartMecha
nixUndo
Timestamp1
Timestamp2-
Undo.xml
Clear
Start -> Undo -> Clear
StartMecha
nixUndo
Timestamp1
Timestamp2-
Undo.xml
Clear
Timestamp3-
Clear.xml
Start -> Undo -> Clear -> Undo
StartMecha
nixUndo
Timestamp1
Timestamp2-
Undo.xml
Clear
Timestamp3-
Clear.xml
Clear
Start -> Undo -> Clear -> Undo
StartMecha
nixUndo
Timestamp1
Timestamp2-
Undo.xml
Clear
Timestamp3-
Clear.xml
Timestamp4-
Undo.xml
Undo