[squeak-dev] The Trunk: Tools-cmm.204.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 8 20:48:46 UTC 2010


Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.204.mcz

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

Name: Tools-cmm.204
Author: cmm
Time: 8 March 2010, 2:48:18.299 pm
UUID: 7faf3f39-147d-4f84-a25b-ded6bc3914b1
Ancestors: Tools-laza.203

MessageTrace fixes.  When filtering the message-list, MessageTrace must know whether "Nothing would be in the list if you did that."  Also, when pruning the list, the messageListIndex is now maintained.

=============== Diff against Tools-laza.203 ===============

Item was changed:
  ----- Method: MessageSet>>setFilteredList: (in category 'private') -----
+ setFilteredList: newList 
- 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"
+ 	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 ].
+ 	self
+ 		 initializeMessageList: newList ;
+ 		 adjustWindowTitleAfterFiltering.
+ 	^true!
- 
- 	newList size == 0
- 		ifTrue:
- 			[^ self inform: 'Nothing would be left in the list if you did that'].
- 	newList size == messageList size
- 		ifTrue:
- 			[^ self inform: 'That leaves the list unchanged'].
- 	self initializeMessageList: newList.
- 	self adjustWindowTitleAfterFiltering!

Item was changed:
  ----- Method: MessageTrace>>filterFrom: (in category 'filtering') -----
  filterFrom: aBlock
  	"Filter the receiver's list down to only those items that satisfy aBlock, which takes a class an a selector as its arguments."
- 
  	| newList newAutoSelectStrings newMessageSelections |
  	newList := messageList class new.
  	newAutoSelectStrings := autoSelectStrings class new.
  	newMessageSelections := messageSelections class new.
  	messageList withIndexDo:
  		[ :each :index |
  		(self class parse: each toClassAndSelector: aBlock)
  			ifTrue:
  				[ newList add: each.
  				newAutoSelectStrings add: (autoSelectStrings at: index).
  				newMessageSelections add: (messageSelections at: index) ] ].
+ 	(self setFilteredList: newList)
+ 		ifTrue: [ autoSelectStrings := newAutoSelectStrings ]!
- 	autoSelectStrings := newAutoSelectStrings.
- 	self setFilteredList: newList.
- !

Item was changed:
  ----- Method: MessageTrace>>removeMessageFromBrowser (in category 'building') -----
  removeMessageFromBrowser
  	| indexToSelect |
  	indexToSelect := (messageSelections indexOf: true) max: 1.
  	self selectedMessages do: [ :eachMethodReference | self deleteFromMessageList: eachMethodReference ].
  	self deselectAll.
  	messageSelections ifNotEmpty:
  		[ messageSelections 
  			at: (indexToSelect min: messageSelections size)  "safety"
  			put: true ].
+ 	anchorIndex := messageListIndex := indexToSelect.
- 	anchorIndex := indexToSelect.
  	self reformulateList!




More information about the Squeak-dev mailing list