Christoph Thiede uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-ct.1226.mcz
==================== Summary ====================
Name: Tools-ct.1226 Author: ct Time: 15 August 2023, 3:40:21.19103 pm UUID: 359aded0-9d41-d447-ac76-82497dc3c070 Ancestors: Tools-mt.1225, Tools-ct.935
In message traces, honors the preference useUnifiedMessageLabels (by merging Tools-ct.935).
=============== Diff against Tools-mt.1225 ===============
Item was changed: ----- Method: MessageSet>>initializeMessageList: (in category 'private') ----- initializeMessageList: anArray "Initialize my messageList from the given list of MethodReference or string objects. NB: special handling for uniclasses. Do /not/ replace the elements of anArray if they are already MethodReferences, so as to allow users to construct richer systems, such as differencers between existing and edited versions of code. NOTE THAT we must support anArray to already have the desired amount and order of elements such as for the 'method inheritance' view, where all elements are prefixed with spaces to indicate the inheritance tree." | isOrdered | isOrdered := anArray size > 1 and: [anArray second isMethodReference] and: [anArray second stringVersion first = Character space]. messageList := isOrdered ifTrue: [OrderedCollection new] ifFalse: [Set new]. anArray do: [:each | each isMethodReference ifTrue: [messageList add: each] ifFalse: [ MessageSet parse: each toClassAndSelector: [ : class : sel | class ifNotNil: [ messageList add: (MethodReference class: class selector: sel) ] ] ] ]. isOrdered ifFalse: [messageList := messageList asOrderedCollection sort]. "Unify labels if wanted." self class useUnifiedMessageLabels ifTrue: [ messageList withIndexDo: + [ : each : index | + each stringVersion: (self indentionPrefixOfSize: (self indentionsIn: each stringVersion)) , (self unifiedMessageLabelFor: each) ] ]. - [ : each : index | | cls | - cls := each actualClass. - each stringVersion: - (self indentionPrefixOfSize: (self indentionsIn: each stringVersion)) - , (cls - ifNil: [each asString] - ifNotNil: - [cls isUniClass - ifTrue: [cls typicalInstanceName, ' ', each selector] - ifFalse: - [ cls name , ' ' , each selector , ' {' - , ((cls organization categoryOfElement: each selector) ifNil: ['']) , '}' - , ' {', cls category, '}' ] ]) ] ]. messageListIndex := messageList isEmpty ifTrue: [0] ifFalse: [1]. contents := String empty!
Item was added: + ----- Method: MessageSet>>unifiedMessageLabelFor: (in category 'private') ----- + unifiedMessageLabelFor: aMethodReference + + | class selector | + class := aMethodReference actualClass ifNil: [^ aMethodReference asString]. + selector := aMethodReference selector. + class isUniClass ifTrue: [ + ^ '{1} {2}' format: {class typicalInstanceName. selector}]. + ^ '{1} {2} {{3}} {{4}}' format: { + class. + selector. + class organization categoryOfElement: selector. + class category }!
Item was changed: ----- Method: MessageTrace>>addChildMessages:autoSelectString: (in category 'building') ----- addChildMessages: methodReferences autoSelectString: aString | currentIndentionLevel addables selectables selectableString newAnchor | selectableString := aString keywords ifEmpty: [ String empty ] ifNotEmptyDo: [ : keywords | "we can probably do something more precise here; perhaps recombining the extracted keywords into a single selector? Then again all usages of this method seem to already enforce use of a selector" aString ]. [ (messageListIndex between: 1 and: autoSelectStrings size) ] whileFalse: [ autoSelectStrings add: selectableString ]. currentIndentionLevel := self currentIndentionLevel. + "Don't add multiple copies of the same method, if a method is already in the list we will merely select it." - "Don't add mulitple copies of the same method, if a method is already in the list we will merely select it." addables := methodReferences reject: [ : each | messageList includes: each ]. addables do: [ : each | + each stringVersion: (self indentionPrefixOfSize: currentIndentionLevel + 1) + , (self class useUnifiedMessageLabels + ifTrue: [self unifiedMessageLabelFor: each] + ifFalse: [each asStringOrText]). - each stringVersion: (self indentionPrefixOfSize: currentIndentionLevel + 1) , each asStringOrText. messageList add: each afterIndex: self messageListIndex. autoSelectStrings add: nil afterIndex: self messageListIndex. messageSelections add: false afterIndex: self messageListIndex ]. selectables := addables copy addAll: (methodReferences select: [ : each | messageList includes: each ]) ; yourself. self deselectAll. anchorIndex := nil. selectables do: [ : each | self messageAt: (newAnchor := messageList indexOf: each) beSelected: true. anchorIndex ifNil: [ anchorIndex := newAnchor ] ]. self changed: #messageList. "Select the first child method." self messageListIndex: (selectables size > 0 ifTrue: [ messageList indexOf: selectables last ] ifFalse: [ messageList ifEmpty: [ 0 ] ifNotEmpty: [ 1 ] ])!
Item was changed: ----- Method: MessageTrace>>addParentMessages:autoSelectString: (in category 'building') ----- addParentMessages: methodReferences autoSelectString: aString | currentIndentionLevel addables selectables | addables := methodReferences reject: [ : each | messageList includes: each ]. "we may need to process aString here in a similar manner to that in #addChildMessages:autoSelectString:" selectables := addables copy addAll: (methodReferences select: [ : each | messageList includes: each ]) ; yourself. currentIndentionLevel := self currentIndentionLevel. (currentIndentionLevel = 0 and: [ addables notEmpty ]) ifTrue: [ self indentEverything. currentIndentionLevel := 1 ]. addables do: [ : each | + each stringVersion: (self indentionPrefixOfSize: currentIndentionLevel - 1) + , (self class useUnifiedMessageLabels + ifTrue: [self unifiedMessageLabelFor: each] + ifFalse: [each asStringOrText]). - each stringVersion: (self indentionPrefixOfSize: currentIndentionLevel - 1) , each asStringOrText. messageList add: each afterIndex: self messageListIndex - 1. autoSelectStrings add: aString afterIndex: self messageListIndex - 1. messageSelections add: false afterIndex: self messageListIndex - 1 ]. self deselectAll. selectables do: [ : each | | messageIndex | messageIndex := messageList indexOf: each. self messageAt: messageIndex beSelected: true. autoSelectStrings at: messageIndex put: aString ]. self changed: #messageList. anchorIndex := messageListIndex. selectables size > 0 ifTrue: [ self messageListIndex: (messageList indexOf: selectables first) ]!
packages@lists.squeakfoundation.org