From 9cbf04cf19c33252b0a28934bab90c88ceed2e08 Mon Sep 17 00:00:00 2001 From: StevenCostiou Date: Mon, 24 Aug 2020 16:19:19 +0200 Subject: [PATCH] Making all debugger ad-hoc clients to use Oups throug OupsDebugRequests --- .../ClyDebugBrokenCritiqueCommand.class.st | 10 +++--- .../ClyClassSideScope.class.st | 2 +- src/Renraku/ReExceptionProperty.class.st | 18 +++++------ src/Rubric/RubSmalltalkEditor.class.st | 28 +++++++++-------- .../SpCodeDebugItCommand.class.st | 31 +++++++++---------- 5 files changed, 42 insertions(+), 47 deletions(-) diff --git a/src/Calypso-SystemPlugins-Critic-Browser/ClyDebugBrokenCritiqueCommand.class.st b/src/Calypso-SystemPlugins-Critic-Browser/ClyDebugBrokenCritiqueCommand.class.st index eb885c90691..e781bc6bd93 100644 --- a/src/Calypso-SystemPlugins-Critic-Browser/ClyDebugBrokenCritiqueCommand.class.st +++ b/src/Calypso-SystemPlugins-Critic-Browser/ClyDebugBrokenCritiqueCommand.class.st @@ -40,11 +40,9 @@ ClyDebugBrokenCritiqueCommand >> defaultMenuItemName [ ] { #category : #execution } -ClyDebugBrokenCritiqueCommand >> execute [ +ClyDebugBrokenCritiqueCommand >> execute [ - UIManager default - debugProcess: Processor activeProcess - context: critique stack - label: critique message - fullView: true + (OupsDebugRequest newForContext: critique stack) + label: critique message; + submit ] diff --git a/src/Calypso-SystemQueries/ClyClassSideScope.class.st b/src/Calypso-SystemQueries/ClyClassSideScope.class.st index fe5445bb317..fa0d4b8fa67 100644 --- a/src/Calypso-SystemQueries/ClyClassSideScope.class.st +++ b/src/Calypso-SystemQueries/ClyClassSideScope.class.st @@ -22,5 +22,5 @@ ClyClassSideScope >> methodsDo: aBlock [ self classesDo: [ :eachClass | self metaLevelsOf: eachClass do: [ :concreteMetaLevelClass | - concreteMetaLevelClass visibleMethods do: aBlock ] ] + concreteMetaLevelClass methods do: aBlock ] ] ] diff --git a/src/Renraku/ReExceptionProperty.class.st b/src/Renraku/ReExceptionProperty.class.st index 6c71650a338..984724c1ec0 100644 --- a/src/Renraku/ReExceptionProperty.class.st +++ b/src/Renraku/ReExceptionProperty.class.st @@ -26,16 +26,14 @@ ReExceptionProperty class >> for: anEntity with: anException [ { #category : #actions } ReExceptionProperty >> actions [ - ^ {RePropertyAction new - icon: (self iconNamed: #smallDebug); - description: 'Debug the exception'; - action: [ :prop | - UIManager default - debugProcess: Processor activeProcess - context: prop stack - label: prop message - fullView: true ]; - yourself} + ^ { (RePropertyAction new + icon: (self iconNamed: #smallDebug); + description: 'Debug the exception'; + action: [ :prop | + (OupsDebugRequest newForContext: prop stack) + label: prop message; + submit ]; + yourself) } ] { #category : #accessing } diff --git a/src/Rubric/RubSmalltalkEditor.class.st b/src/Rubric/RubSmalltalkEditor.class.st index 4b754d5fd4a..8d89bd02548 100644 --- a/src/Rubric/RubSmalltalkEditor.class.st +++ b/src/Rubric/RubSmalltalkEditor.class.st @@ -451,19 +451,21 @@ RubSmalltalkEditor >> debug: aStream [ { #category : #'do-its' } RubSmalltalkEditor >> debug: aCompiledMethod receiver: anObject in: evalContext [ - | guineaPig context debugSession | - guineaPig := [ aCompiledMethod - valueWithReceiver: anObject - arguments: (evalContext ifNil: [ #() ] ifNotNil: [ {evalContext} ]) ] - newProcess. - context := guineaPig suspendedContext. - - debugSession := guineaPig newDebugSessionNamed: 'debug it' startedAt: context. - debugSession stepIntoUntil: [:currentContext | - currentContext method == aCompiledMethod ]. - - Smalltalk tools debugger openOn: debugSession withFullView: true. - + + | process suspendedContext | + process := [ + aCompiledMethod + valueWithReceiver: anObject + arguments: + (evalContext + ifNil: [ #( ) ] + ifNotNil: [ { evalContext } ]) ] newProcess. + suspendedContext := process suspendedContext. + (OupsDebugRequest newForContext: suspendedContext) + process: process; + compiledMethod: aCompiledMethod; + label: 'debug it'; + submit ] { #category : #'do-its' } diff --git a/src/Spec2-Code-Commands/SpCodeDebugItCommand.class.st b/src/Spec2-Code-Commands/SpCodeDebugItCommand.class.st index fc55a1f9a4b..8ede923e90c 100644 --- a/src/Spec2-Code-Commands/SpCodeDebugItCommand.class.st +++ b/src/Spec2-Code-Commands/SpCodeDebugItCommand.class.st @@ -62,24 +62,21 @@ SpCodeDebugItCommand >> debug: aStream [ { #category : #private } SpCodeDebugItCommand >> debug: aCompiledMethod receiver: anObject in: evalContext [ - | guineaPig suspendedContext debugSession | - guineaPig := [ - aCompiledMethod - valueWithReceiver: anObject - arguments: (evalContext ifNil: [ #() ] ifNotNil: [ { evalContext } ]) ] - newProcess. - suspendedContext := guineaPig suspendedContext. - - debugSession := guineaPig newDebugSessionNamed: 'debug it' startedAt: suspendedContext. - debugSession stepIntoUntil: [ :currentContext | - currentContext method == aCompiledMethod ]. - - Smalltalk tools debugger openOn: debugSession withFullView: true. - "(StDebugger on: debugSession) - application: context application; - openWithFullView" - + | process suspendedContext | + process := [ + aCompiledMethod + valueWithReceiver: anObject + arguments: + (evalContext + ifNil: [ #( ) ] + ifNotNil: [ { evalContext } ]) ] newProcess. + suspendedContext := process suspendedContext. + (OupsDebugRequest newForContext: suspendedContext) + process: process; + compiledMethod: aCompiledMethod; + label: 'debug it'; + submit ] { #category : #execution }