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

commits at source.squeak.org commits at source.squeak.org
Sun Aug 4 14:31:04 UTC 2019


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

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

Name: Tools-mt.863
Author: mt
Time: 4 August 2019, 4:31:03.354743 pm
UUID: 02946d52-a7a1-5b45-844a-ab32966fdc99
Ancestors: Tools-mt.862

Fixes smaller bugs in message-set tool.

=============== Diff against Tools-mt.862 ===============

Item was changed:
  ----- Method: MessageSet class>>parse:toClassAndSelector: (in category 'utilities') -----
+ parse: codeReferenceOrString toClassAndSelector: csBlock
- parse: methodRef toClassAndSelector: csBlock
  	"Decode strings of the form <className> [class] <selectorName>."
  
  	| tuple cl |
+ 	codeReferenceOrString ifNil: [^ csBlock value: nil value: nil].
+ 	codeReferenceOrString isCodeReference ifTrue:
+ 		[^codeReferenceOrString setClassAndSelectorIn: csBlock].
+ 	codeReferenceOrString isEmpty ifTrue:
- 
- 
- 	self flag: #mref.	"compatibility with pre-MethodReference lists"
- 
- 	methodRef ifNil: [^ csBlock value: nil value: nil].
- 	methodRef isString ifFalse:
- 		[^methodRef setClassAndSelectorIn: csBlock].
- 	methodRef isEmpty ifTrue:
  		[^csBlock value: nil value: nil].
+ 	tuple := (codeReferenceOrString asString includesSubstring: '>>')
+ 				ifTrue: [(codeReferenceOrString findTokens: '>>') fold: [:a :b| (a findTokens: ' '), {b first = $# ifTrue: [b allButFirst] ifFalse: [b]}]]
+ 				ifFalse: [codeReferenceOrString asString findTokens: ' .'].
- 	tuple := (methodRef asString includesSubstring: '>>')
- 				ifTrue: [(methodRef findTokens: '>>') fold: [:a :b| (a findTokens: ' '), {b first = $# ifTrue: [b allButFirst] ifFalse: [b]}]]
- 				ifFalse: [methodRef asString findTokens: ' .'].
  	self flag: #environments. "missing information about the class environment"
  	cl := Smalltalk at: tuple first asSymbol ifAbsent: [^ csBlock value: nil value: nil].
  	^(tuple size = 2 or: [tuple size > 2 and: [(tuple at: 2) ~= 'class']])
  		ifTrue: [csBlock value: cl value: (tuple at: 2) asSymbol]
  		ifFalse: [csBlock value: cl class value: (tuple at: 3) asSymbol]!

Item was changed:
  ----- Method: MessageSet>>setClassAndSelectorIn: (in category 'private') -----
  setClassAndSelectorIn: csBlock
- 	| sel |
  	"Decode strings of the form <className> [class] <selectorName>."
  
+ 	| sel |
- 	self flag: #mref.	"compatibility with pre-MethodReference lists"
- 
  	sel := self selection.
+ 	^ sel isCodeReference
+ 		ifTrue: [sel setClassAndSelectorIn: csBlock]
+ 		ifFalse: [self class parse: sel toClassAndSelector: csBlock]!
- 	^(sel isKindOf: MethodReference) ifTrue: [
- 		sel setClassAndSelectorIn: csBlock
- 	] ifFalse: [
- 		MessageSet parse: sel toClassAndSelector: csBlock
- 	]!

Item was changed:
  ----- Method: MessageSet>>setFilteredList: (in category 'private') -----
  setFilteredList: newList 
  	"Establish newList as the new list if appropriate, and adjust the window title accordingly; if the new list is of the same size as the old, warn and do nothing"
+ 	
+ 	| currentSelection |
  	newList size = 0 ifTrue:
  		[ self inform: 'Nothing would be left in the list if you did that'.
  		^false ].
  	newList size = messageList size ifTrue:
  		[ self inform: 'That leaves the list unchanged'.
  		^false ].
+ 	
+ 	messageListIndex > 0 ifTrue:
+ 		[currentSelection := messageList at: messageListIndex].
+ 	
  	self
  		 initializeMessageList: newList ;
  		 adjustWindowTitleAfterFiltering.
+ 
+ 	currentSelection ifNotNil:
+ 		[messageListIndex := messageList indexOf: currentSelection ifAbsent: [1]].
+ 
+ 	self
+ 		changed: #messageList;
+ 		changed: #messageListIndex.
+ 	
  	^true!



More information about the Squeak-dev mailing list