A new version of Tools was added to project The Inbox: http://source.squeak.org/inbox/Tools-ct.858.mcz
==================== Summary ====================
Name: Tools-ct.858 Author: ct Time: 2 August 2019, 7:23:35.594625 pm UUID: 3ece1c71-070b-0e48-a0aa-1e259555dbee Ancestors: Tools-ct.857
Inspector: Try to keep field selection when changing object
Instead of unselecting the field viewed latest when another object is assigned, keep the selection unless it is no more valid (got a phantom)
Example where this is useful: debug World allMorphs, select owner in the receiver view and watch the selection while stepping a few times into #allMorphsDo:.
=============== Diff against Tools-ct.857 ===============
Item was changed: ----- Method: Inspector>>object: (in category 'accessing') ----- object: anObject "Set anObject to be the object being inspected by the receiver."
+ | oldSelection oldFields newFields commonFieldRange | - | oldIndex | anObject == object ifTrue: [self update] ifFalse: + [oldSelection := selectionIndex. + oldFields := self fieldList. - [oldIndex := selectionIndex <= 2 ifTrue: [selectionIndex] ifFalse: [0]. self inspect: anObject. + newFields := self fieldList. + commonFieldRange := ((1 to: (oldFields size min: newFields size)) + select: [:i | (oldFields at: i) = (newFields at: i)]) + ifNotEmpty: #last + ifEmpty: [0]. - oldIndex := oldIndex min: self fieldList size. self changed: #inspectObject. + self toggleIndex: (oldSelection <= commonFieldRange + ifTrue: [oldSelection] + ifFalse: [0]). - oldIndex > 0 - ifTrue: [self toggleIndex: oldIndex]. self changed: #fieldList. self changed: #contents. self changed: #helpText]!
squeak-dev@lists.squeakfoundation.org