The Trunk: System-ul.922.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-ul.922.mcz

commits-2
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!