[squeak-dev] The Trunk: Tools-ct.1180.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 7 15:40:20 UTC 2023


Christoph Thiede uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1180.mcz

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

Name: Tools-ct.1180
Author: ct
Time: 7 January 2023, 4:39:58.499428 pm
UUID: b684cc9c-3284-5346-9a19-931d8f2f9b96
Ancestors: Tools-ct.1179

Eliminates incorrectly displayed tabs from a PopUpMenu label in a message trace. When escaping from the menu, do not browse any implementors instead of the first selector.

=============== Diff against Tools-ct.1179 ===============

Item was changed:
  ----- Method: MessageTrace>>browseAllImplementorsOf:requestor: (in category 'actions') -----
  browseAllImplementorsOf: selectorSymbol requestor: anObject
  	"Overwritten to modify the trace if the request origins from a model-menu command such as the message-list menu (shortcut)."
  
  	| selectorToBrowse |
  	selectorToBrowse := self selection 
  		ifNil: [ selectorSymbol ] 
+ 		ifNotNil: [
+ 			(self getImplementorNamed: selectorSymbol asSymbol "since we can get passed literals")
+ 				ifNil: [^ self]].
- 		ifNotNil: [ self getImplementorNamed: selectorSymbol asSymbol "since we can get passed literals"].
  	(Preferences traceMessages and: [ self hasUnacceptedEdits not ])
  		ifTrue: [ self addChildMethodsNamed: selectorToBrowse ]
  		ifFalse: [ super browseAllImplementorsOf: selectorToBrowse requestor: anObject ].!

Item was changed:
  ----- Method: MessageTrace>>getImplementorNamed: (in category 'private accessing') -----
  getImplementorNamed: selectorSymbol
  	 | allPossibilities |
  	allPossibilities := (((self selection compiledMethod messages 
  		select: [ :eachSelector | eachSelector beginsWith: selectorSymbol ])
  		copyWith: selectorSymbol)
  		select: [ :each | (Symbol lookup: each) notNil ])
  		asSet asOrderedCollection sort.
  	(allPossibilities includes: selectorSymbol) ifTrue:
  		[ allPossibilities addFirst: (allPossibilities remove: selectorSymbol) ].
  	^allPossibilities size > 1
  		ifTrue: 
  			[ | selectionIndex |
  			selectionIndex := (PopUpMenu labelArray: allPossibilities lines: #(1))
+ 				startUpWithCaption: 'Browse implementors of which message?' translated.
+ 			selectionIndex = 0 ifFalse: [ allPossibilities at: selectionIndex ] ]
- 				startUpWithCaption: 
- 					'Browse implementors of
- 					which message?'.
- 			selectionIndex = 0 ifTrue: [ selectorSymbol ] ifFalse: [ allPossibilities at: selectionIndex ] ]
  		ifFalse: [ allPossibilities isEmpty
  			ifTrue: [ selectorSymbol ]
+ 			ifFalse: [ allPossibilities first ] ]!
- 			ifFalse: [ allPossibilities first ] ]
- !



More information about the Squeak-dev mailing list