[squeak-dev] The Trunk: Tools-eem.771.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 31 17:29:59 UTC 2017


Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.771.mcz

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

Name: Tools-eem.771
Author: eem
Time: 31 October 2017, 10:29:35.046372 am
UUID: 42f7dc0f-720f-4d34-8871-9dc9b59c4135
Ancestors: Tools-tpr.770

Beef up thorough selector discovery in methods with pragmas so that any arguments to the pragma are also considered.  e.g. when browsing implementors in something like 
	notifyInformeeOfChange
		"If there is a changeInformee, notify her that I have changed value"
	
		<hasLiteralTest: #isChangeSelector:>
		"To find this method as sender of all changeSelectors"

		changeInformee ifNotNil: [changeInformee perform: changeSelector]

we want #isChangeSelector: included, not just #hasLiteralTest:

=============== Diff against Tools-tpr.770 ===============

Item was changed:
  ----- Method: StringHolder>>withSelectorAndMessagesIn:evaluate: (in category '*Tools') -----
  withSelectorAndMessagesIn: aCompiledMethod evaluate: aBlock
  	"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any"
  
  	| selectorOrNil messages |
  	selectorOrNil := aCompiledMethod selector. 
+ 	messages := aCompiledMethod messages.
+ 	SystemNavigation thoroughSenders ifTrue:
+ 		[| litGetter |
+ 		litGetter := [:l|
+ 			(l isSymbol and: [l size > 0 and: [l first isLowercase]]) ifTrue:
+ 				[messages add: l].
+ 			l isArray ifTrue:
+ 				[l do: litGetter]].
+ 		aCompiledMethod allLiterals do: litGetter.
+ 		aCompiledMethod pragmas do:
+ 			[:pragma|
+ 			 litGetter
+ 				value: pragma keyword;
+ 				value: pragma arguments]].
+ 	messages remove: selectorOrNil ifAbsent: ["do nothing"].
+ 	messages ifEmpty: "If only one item, there is no choice"
+ 		[^selectorOrNil ifNotNil: [aBlock value: selectorOrNil]]. 
- 	messages := SystemNavigation thoroughSenders 
- 		ifTrue: [
- 			| litGetter |
- 			litGetter := [:set :l|
- 				(l isSymbol and: [l size > 0 and: [l first isLowercase]]) ifTrue:
- 					[set add: l].
- 				l isArray ifTrue:
- 					[l inject: set into: litGetter].
- 				set].
- 			aCompiledMethod allLiterals, 
- 				(aCompiledMethod pragmas collect: [:pragma| pragma keyword])
- 				inject: aCompiledMethod messages into: litGetter]
- 		ifFalse: [aCompiledMethod messages].
- 	messages remove: selectorOrNil ifAbsent: [ "do nothing" ].
- 	messages ifEmpty: [  "If only one item, there is no choice"
- 		^selectorOrNil ifNotNil: [ aBlock value: selectorOrNil ] ]. 
  	self systemNavigation 
  		showMenuOf: messages
  		withFirstItem: selectorOrNil
  		ifChosenDo: aBlock!



More information about the Squeak-dev mailing list