-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
packages/Babylonian-UI.package/BPDebugger.class/instance/addExample.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
examples | ||
addExample | ||
|
||
| argumentSpecimen receiverSpecimen method | | ||
receiverSpecimen := BPSpecimenReference new | ||
specimen: self receiverInspector object; | ||
yourself. | ||
argumentSpecimen := self contextVariablesInspector object arguments | ||
collect: [:argumentObject | | ||
BPSpecimenReference new | ||
specimen: argumentObject; | ||
yourself]. | ||
method := self selectedContext home method. | ||
self halt. | ||
(method bpNewExampleFrom: BPMethodExample) | ||
receiverConstructor: receiverSpecimen; | ||
argumentScripts: argumentSpecimen; | ||
yourself. |
28 changes: 28 additions & 0 deletions
28
packages/Babylonian-UI.package/BPDebugger.class/instance/customButtonSpecs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
initialize | ||
customButtonSpecs | ||
"Answer an array of elements of the form wording, selector, help-message, that characterize the custom button row of a debugger." | ||
|
||
| list | | ||
list := #(('Proceed' proceed 'Close the debugger and proceed.' interruptedProcessShouldResume) | ||
('Restart' restart 'Reset this context to its start.') | ||
('Into' stepInto 'step Into message sends' interruptedProcessIsReady) | ||
('Over' stepOver 'step Over message sends' interruptedProcessIsReady) | ||
('Through' stepThrough 'step into a block' interruptedProcessIsReady) | ||
('Full Stack' showFullStack 'show full stack') | ||
('Where' showWhere 'select current pc range') | ||
('Tally It' tally 'evaluate current selection and measure the time') | ||
('Add Example' addExample 'Add current receiver and parameters as a Babylonian Example')). | ||
(Preferences restartAlsoProceeds and: [self interruptedProcessShouldResume]) ifTrue: | ||
[list := list collect: [:each | | ||
each second == #restart | ||
ifTrue: [each copy | ||
at: 1 put: 'Proceed Here'; | ||
at: 3 put: 'Proceed from the beginning of this context.'; | ||
yourself] | ||
ifFalse: [each second == #proceed | ||
ifTrue: [each copy | ||
at: 1 put: 'Proceed Top'; | ||
at: 3 put: 'Proceed from the current top context.'; | ||
yourself] | ||
ifFalse: [each]]]]. | ||
^ list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters