[Pkg] The Trunk: System-ul.922.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 27 22:26:16 UTC 2016


Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.922.mcz

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

Name: System-ul.922
Author: ul
Time: 27 December 2016, 11:07:17.892759 pm
UUID: 694a8729-9b50-42d3-ae51-04dc932ab1f8
Ancestors: System-eem.921

SystemNavigation>>browseMethodsWithString:matchCase: 
 - ignore method selector from the results, just like messages
 - cache messages for performance

=============== Diff against System-eem.921 ===============

Item was changed:
  ----- Method: SystemNavigation>>browseMethodsWithString:matchCase: (in category 'browse') -----
  browseMethodsWithString: aString matchCase: caseSensitive
  	"Launch a browser on all methods that contain string literals with aString as a substring. Make the search case-sensitive or insensitive as dictated by the caseSensitive boolean parameter"
  
+ 	| selector messages |
+ 	self 
+ 		browseAllSelect: [ :method |
+ 			selector := messages := nil.
+ 			method hasLiteralSuchThat: [ :literal |
+ 				 literal isString
+ 					 and: [ (literal includesSubstring: aString caseSensitive: caseSensitive)
+ 					 and: [ literal isSymbol
+ 						ifFalse: [ true ]
+ 						ifTrue: [
+ 							((selector ifNil: [ selector := method selector ]) == literal 
+ 								or: [ (messages ifNil: [ messages := method messages ]) includes: literal ]) not ] ] ] ] ]
- 	self browseAllSelect:
- 			[:method |
- 			 method hasLiteralSuchThat:
- 				[:lit |
- 				 lit isString
- 				 and: [(lit includesSubstring: aString caseSensitive: caseSensitive)
- 				 and: [lit isSymbol
- 						ifTrue: [(method messages includes: lit) not]
- 						ifFalse: [true]]]]]
  		name:  'Methods with string ', aString printString, (caseSensitive ifTrue: [' (case-sensitive)'] ifFalse: [' (case-insensitive)'])
  		autoSelect: aString!



More information about the Packages mailing list