#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Mon, 24 Feb 2020 00:10:16 +0100
changeset 25291 7f1f60551465
parent 25290 6cc4b317c2ab
child 25292 baed06d0d302
#REFACTORING by exept class: ObjectMemory class changed: #refNameFor:in:
ObjectMemory.st
--- a/ObjectMemory.st	Sun Feb 23 16:46:23 2020 +0100
+++ b/ObjectMemory.st	Mon Feb 24 00:10:16 2020 +0100
@@ -2010,40 +2010,43 @@
     |names oClass|
 
     referent == Smalltalk ifTrue:[
-	referent keysAndValuesDo:[:key :val |
-	    |idx|
-
-	    (anObject == val) ifTrue:[
-		"/ for our convenience - if it's a nameSpace, cut off Smalltalk.
-		idx := key string indexOf:$:.
-		(idx ~~ 0
-		and:[idx < key string size
-		and:[(key string at:(idx+1)) == $:]]) ifTrue:[
-		    ^ key allBold "/ (key copyFrom:(idx+2)) allBold
-		].
-		^ 'Smalltalk:' , (key allBold).
-	    ]
-	].
+        referent keysAndValuesDo:[:key :val |
+            |idx|
+
+            (anObject == val) ifTrue:[
+                "/ for our convenience - if it's a nameSpace, cut off Smalltalk.
+                idx := key string indexOf:$:.
+                (idx ~~ 0
+                and:[idx < key string size
+                and:[(key string at:(idx+1)) == $:]]) ifTrue:[
+                    ^ key allBold "/ (key copyFrom:(idx+2)) allBold
+                ].
+                ^ 'Smalltalk:' , (key allBold).
+            ]
+        ].
     ] ifFalse:[
-	names := referent class allInstVarNames.
-	oClass := referent class.
-	oClass == anObject ifTrue:[
-	    ^ oClass name.
-	].
-	1 to:oClass instSize do:[:i |
-	    ((referent instVarAt:i) == anObject) ifTrue:[
-		^ '%1 [%2]' bindWith:referent class nameWithArticle with:(names at:i) allBold.
-	    ].
-	].
-	oClass isVariable ifTrue:[
-	    oClass isPointers ifTrue:[
-		1 to:referent basicSize do:[:i |
-		    ((referent basicAt:i) == anObject) ifTrue:[
-			^ '%1 [%2] (sz=%2)' bindWith:referent class nameWithArticle with:i printString allBold with:referent basicSize printString
-		    ]
-		]
-	    ]
-	].
+        names := referent class allInstVarNames.
+        oClass := referent class.
+        oClass == anObject ifTrue:[
+            ^ oClass name.
+        ].
+        1 to:oClass instSize do:[:i |
+            ((referent instVarAt:i) == anObject) ifTrue:[
+                ^ '%1 [%2]' bindWith:referent class nameWithArticle with:(names at:i) allBold.
+            ].
+        ].
+        oClass isVariable ifTrue:[
+            oClass isPointers ifTrue:[
+                1 to:referent basicSize do:[:i |
+                    ((referent basicAt:i) == anObject) ifTrue:[
+                        ^ '%1 [%2] (sz=%3)' 
+                            bindWith:referent class nameWithArticle 
+                            with:i printString allBold 
+                            with:referent basicSize
+                    ]
+                ]
+            ]
+        ].
     ].
     self proceedableError:'no reference'.
     ^ nil.