diff --git a/packages/Babylonian-UI.package/BPDebugger.class/instance/addExample.st b/packages/Babylonian-UI.package/BPDebugger.class/instance/addExample.st new file mode 100644 index 00000000..f6d8c106 --- /dev/null +++ b/packages/Babylonian-UI.package/BPDebugger.class/instance/addExample.st @@ -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. \ No newline at end of file diff --git a/packages/Babylonian-UI.package/BPDebugger.class/instance/customButtonSpecs.st b/packages/Babylonian-UI.package/BPDebugger.class/instance/customButtonSpecs.st new file mode 100644 index 00000000..1b3f95bf --- /dev/null +++ b/packages/Babylonian-UI.package/BPDebugger.class/instance/customButtonSpecs.st @@ -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 \ No newline at end of file diff --git a/packages/Babylonian-UI.package/BPDebugger.class/methodProperties.json b/packages/Babylonian-UI.package/BPDebugger.class/methodProperties.json index a98b4b91..d551798b 100644 --- a/packages/Babylonian-UI.package/BPDebugger.class/methodProperties.json +++ b/packages/Babylonian-UI.package/BPDebugger.class/methodProperties.json @@ -3,4 +3,6 @@ }, "instance" : { "aboutToStyle:" : "ct 8/20/2021 06:20", - "buildCodePaneWith:" : "ct 6/19/2021 21:46" } } + "addExample" : "joabe 7/6/2023 20:19", + "buildCodePaneWith:" : "ct 6/19/2021 21:46", + "customButtonSpecs" : "joabe 7/6/2023 19:42" } }