[squeak-dev] The Trunk: Tools-mt.1165.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jun 22 07:01:13 UTC 2022


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1165.mcz

==================== Summary ====================

Name: Tools-mt.1165
Author: mt
Time: 22 June 2022, 9:01:09.312465 am
UUID: 9cc6a693-d855-bc46-a690-bb76af2a3210
Ancestors: Tools-mt.1164

Fixes serious regression from Tools-tpr.1008 (25 October 2020). Now the method-inheritance view works again.

Thanks to Chris (cmm) for reporting this!

=============== Diff against Tools-mt.1164 ===============

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].
- 	 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."
- 	messageList := 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].
- 	messageList := messageList asOrderedCollection sort. 
  	"Unify labels if wanted."
  	self class useUnifiedMessageLabels ifTrue:
  		[ messageList withIndexDo: 
  			[ : 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!



More information about the Squeak-dev mailing list