DebugView.st
changeset 16801 dd3b6d987482
parent 16800 95c770ac8fd6
child 16803 e4ac430c7cd9
child 16811 770081e56e09
--- a/DebugView.st	Sat Aug 13 14:49:39 2016 +0200
+++ b/DebugView.st	Mon Aug 15 12:50:49 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -1530,7 +1528,7 @@
     "return an interesting context to be shown in an error notifier.
      We move up the calling chain, skipping intermediate Signal
      and Exception contexts, to present the context in which the error
-     actually occured.
+     actually occurred.
      Just for your convenience :-)"
 
     |someContexts con idx|
@@ -1540,9 +1538,9 @@
     con := aContext.
     idx := 1.
     [(idx <= someContexts size) and:[con notNil]] whileTrue:[
-	someContexts at:idx put:con.
-	con := con sender.
-	idx := idx + 1.
+        someContexts at:idx put:con.
+        con := con sender.
+        idx := idx + 1.
     ].
     "/ search...
     idx := self interestingContextIndexIn:someContexts.
@@ -1555,7 +1553,7 @@
     "return an interesting context's index, or nil.
      This is the context initially shown (selected) in the walkback.
      We move up the calling chain, skipping all intermediate Signal
-     and Exception contexts, to present the context in which the error actually occured.
+     and Exception contexts, to present the context in which the error actually occurred.
      Just for your (my) convenience :-)"
 
     |con found offset sel prev rcvr nMax idx methodHome method|
@@ -2533,7 +2531,7 @@
     |selection con1 con2 h|
 
     initialSelectionOrNil notNil ifTrue:[
-	^ initialSelectionOrNil
+        ^ initialSelectionOrNil
     ].
 
     "
@@ -2542,7 +2540,7 @@
      - if we came here by a step (i.e. bigStep), its the top context
        (for ifs and whiles) or the sender (for regular sends).
      - otherwise, we came here by some signal raise, and we are interested
-       in the context where the raise actually occured.
+       in the context where the raise actually occurred.
     "
     con1 := (contextArray at:1 ifAbsent:nil).
     con2 := (contextArray at:2 ifAbsent:nil).
@@ -2550,55 +2548,55 @@
 
     "/ came here via a step?
     exitAction == #step ifTrue:[
-	selection := 1.
-	steppedContext notNil ifTrue:[
-
-	    "
-	     if we came here by a big-step, show the method where we are
-	    "
-	    con1 == steppedContext ifTrue:[
-		selection := 1
-	    ] ifFalse:[
-		con2 == steppedContext ifTrue:[
-		    selection := 2
-		]
-	    ].
-	    "
-	     for bigStep, we could also be in a block below the actual method ...
-	    "
-	    ((h := con1 home) notNil
-	     and:[h == steppedContext]) ifTrue:[
-		selection := 1
-	    ] ifFalse:[
-		(con2 notNil
-		and:[(h := con2 home) notNil
-		and:[h == steppedContext]]) ifTrue:[
-		    selection := 2
-		]
-	    ].
-	    h := nil.
-	]
+        selection := 1.
+        steppedContext notNil ifTrue:[
+
+            "
+             if we came here by a big-step, show the method where we are
+            "
+            con1 == steppedContext ifTrue:[
+                selection := 1
+            ] ifFalse:[
+                con2 == steppedContext ifTrue:[
+                    selection := 2
+                ]
+            ].
+            "
+             for bigStep, we could also be in a block below the actual method ...
+            "
+            ((h := con1 home) notNil
+             and:[h == steppedContext]) ifTrue:[
+                selection := 1
+            ] ifFalse:[
+                (con2 notNil
+                and:[(h := con2 home) notNil
+                and:[h == steppedContext]]) ifTrue:[
+                    selection := 2
+                ]
+            ].
+            h := nil.
+        ]
     ] ifFalse:[
-	steppedContext isNil ifTrue:[
-	    "
-	     preselect a more interesting context, (where halt/raise was ...)
-	    "
-	    "/ selection := self class interestingContextIndexFrom:aContext.
-	    selection := self class interestingContextIndexIn:contextArray.
+        steppedContext isNil ifTrue:[
+            "
+             preselect a more interesting context, (where halt/raise was ...)
+            "
+            "/ selection := self class interestingContextIndexFrom:aContext.
+            selection := self class interestingContextIndexIn:contextArray.
 "/ Transcript show:'x '; showCR:selection.
-	    selection := selection min:(contextArray size).
-	] ifFalse:[
-	    "
-	     if we came here by a big-step, show the method where we are
-	    "
-	    con1 == steppedContext ifTrue:[
-		selection := 1
-	    ] ifFalse:[
-		con2 == steppedContext ifTrue:[
-		    selection := 2.
-		]
-	    ]
-	]
+            selection := selection min:(contextArray size).
+        ] ifFalse:[
+            "
+             if we came here by a big-step, show the method where we are
+            "
+            con1 == steppedContext ifTrue:[
+                selection := 1
+            ] ifFalse:[
+                con2 == steppedContext ifTrue:[
+                    selection := 2.
+                ]
+            ]
+        ]
     ].
     ^ selection
 
@@ -9479,7 +9477,7 @@
 
 printConditionOn:aStream
     ignoredSendingClassAndSelectors notEmptyOrNil ifTrue:[
-        aStream nextPutAll:(' if called from %1 » %2'
+        aStream nextPutAll:(' if called from %1 » %2'
                                 bindWith:ignoredSendingClassAndSelectors first first
                                 with:ignoredSendingClassAndSelectors first second).
         ^ self.