#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Tue, 02 Jul 2019 21:20:00 +0200
changeset 18862 d4cb286f8c75
parent 18861 4b9cfb623550
child 18863 8ca8ff8081a1
#REFACTORING by cg class: DebugView added: #contextInfo: changed: #controlLoopCatchingErrors #updateButtonsAndMenuItemsForContext: #updateContextInfoFor:
DebugView.st
--- a/DebugView.st	Sat Jun 29 19:05:29 2019 +0200
+++ b/DebugView.st	Tue Jul 02 21:20:00 2019 +0200
@@ -2293,6 +2293,14 @@
 
 !DebugView methodsFor:'accessing'!
 
+contextInfo:aString
+    "shown in the middle context info (typically: interrupt: ...)"
+    
+    contextInfoLabel label:aString.
+
+    "Created: / 02-07-2019 / 21:18:14 / Claus Gittinger"
+!
+
 contextInspector
     ^ contextInspector
 !
@@ -7665,7 +7673,7 @@
     m notNil ifTrue:[
         self updateMenuItems.
 
-        (inspecting or:[AbortOperationRequest isHandledIn:aContext]) ifTrue:[
+        (aContext notNil and:[(inspecting or:[AbortOperationRequest isHandledIn:aContext])]) ifTrue:[
             abortButton enable.
             m enable:#doAbort.
         ] ifFalse:[
@@ -7712,6 +7720,7 @@
 
     "Created: / 06-07-2011 / 12:24:53 / cg"
     "Modified: / 30-11-2017 / 12:16:44 / cg"
+    "Modified: / 02-07-2019 / 16:46:46 / Claus Gittinger"
 !
 
 updateContext
@@ -9323,7 +9332,6 @@
                 ex proceed.
             ].
             (HaltInterrupt accepts:signal) ifTrue:[
-Transcript showCR:'HaltInterrupt'.
                 Transcript showCR:'Halt/Break in debugger ignored'.
                 self topView raiseDeiconified.
                 ex proceed.
@@ -9511,7 +9519,7 @@
     "Created: / 24-11-1995 / 20:33:45 / cg"
     "Modified: / 26-09-2012 / 15:03:39 / cg"
     "Modified: / 15-05-2018 / 20:38:41 / stefan"
-    "Modified: / 27-05-2019 / 20:51:19 / Claus Gittinger"
+    "Modified: / 02-07-2019 / 18:46:16 / Claus Gittinger"
 ! !
 
 !DebugView methodsFor:'queries'!
@@ -10106,46 +10114,49 @@
 
     |whatChanged changedObject receiver|
 
-    aContext selector == #'update:with:from:' ifTrue:[
-        receiver := aContext receiver.
-        whatChanged := aContext argAt:1.
-        changedObject := aContext argAt:3.
-
-        changedObject isBehavior ifTrue:[
-            contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject name allBold).
-            ^ self
-        ].
-
-        receiver class allInstanceVariableNames keysAndValuesDo:[:i :nm |
-            |val|
-
-            self class withDebuggingFlagSetDo:[    
-                val := receiver instVarAt:i.
-            ].
-            val == changedObject ifTrue:[
-                contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',nm allBold).
+    aContext notNil ifTrue:[
+        aContext selector == #'update:with:from:' ifTrue:[
+            receiver := aContext receiver.
+            whatChanged := aContext argAt:1.
+            changedObject := aContext argAt:3.
+
+            changedObject isBehavior ifTrue:[
+                self contextInfo:('update (',whatChanged printString allBold,') triggered by ',changedObject name allBold).
                 ^ self
-            ]
-        ].
-
-        (receiver isProtoObject not and:[receiver isKindOf:ApplicationModel]) ifTrue:[
-            receiver builder notNil ifTrue:[
-                (receiver builder bindings ? #()) keysAndValuesDo:[:eachAspect :eachValue |
-                    eachValue == changedObject ifTrue:[
-                        contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by aspect ',eachAspect allBold).
-                        ^ self
+            ].
+
+            receiver class allInstanceVariableNames keysAndValuesDo:[:i :nm |
+                |val|
+
+                self class withDebuggingFlagSetDo:[    
+                    val := receiver instVarAt:i.
+                ].
+                val == changedObject ifTrue:[
+                    self contextInfo:('update (',whatChanged printString allBold,') triggered by ',nm allBold).
+                    ^ self
+                ]
+            ].
+
+            (receiver isProtoObject not and:[receiver isKindOf:ApplicationModel]) ifTrue:[
+                receiver builder notNil ifTrue:[
+                    (receiver builder bindings ? #()) keysAndValuesDo:[:eachAspect :eachValue |
+                        eachValue == changedObject ifTrue:[
+                            self contextInfo:('update (',whatChanged printString allBold,') triggered by aspect ',eachAspect allBold).
+                            ^ self
+                        ]
                     ]
                 ]
-            ]
-        ].
-
-        "do not use classNameWithArticle - it is missing in ProtoObject!!"
-        contextInfoLabel label:('update (',whatChanged printString allBold,') triggered by ',changedObject class nameWithArticle allBold).
-        ^ self.
-    ].
-    contextInfoLabel label:nil.
+            ].
+
+            "do not use classNameWithArticle - it is missing in ProtoObject!!"
+            self contextInfo:('update (',whatChanged printString allBold,') triggered by ',changedObject class nameWithArticle allBold).
+            ^ self.
+        ].
+    ].
+    self contextInfo:nil.
 
     "Modified: / 01-02-2018 / 10:08:37 / stefan"
+    "Modified: / 02-07-2019 / 21:18:37 / Claus Gittinger"
 !
 
 updateForContext:lineNr