[squeak-dev] The Trunk: Tools-eem.1161.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Jun 12 16:35:02 UTC 2022
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.1161.mcz
==================== Summary ====================
Name: Tools-eem.1161
Author: eem
Time: 12 June 2022, 9:35:00.035106 am
UUID: a7d6ba3b-626f-4b30-b339-0982249f6945
Ancestors: Tools-ct.1160
MessageNames should unique selectors matching patterns, rather than show duplicates.
=============== Diff against Tools-ct.1160 ===============
Item was changed:
----- Method: MessageNames>>computeSelectorListFrom: (in category 'search') -----
computeSelectorListFrom: searchString
"Compute selector list from search string. The searchString is a list of expressions separated by ;. Each expression is matched individually. An expression can be a simple string (same as *expression*), a string with double quotes (exact match) or a match expression (see String >> #match:)."
+ | selectors |
+ selectors := Set new.
+ (searchString findBetweenSubStrs: ';') do:
+ [ :selPat |
+ (selPat first = $" and: [ selPat last = $" and: [ selPat size > 2 ] ])
+ ifTrue:
+ [(Symbol lookup: (selPat copyFrom: 2 to: selPat size - 1))
+ ifNotNil: [ :sym | selectors add: sym ] ]
+ ifFalse:
+ [| n m |
+ n := selPat occurrencesOf: $*.
+ m := selPat occurrencesOf: $#.
+ selectors addAll:
+ (((n > 0 or: [ m > 0 ]) and: [ selPat size > (n + m) ])
+ ifTrue: [ Symbol selectorsMatching: selPat ]
+ ifFalse: [ Symbol selectorsContaining: selPat ]) ] ].
+ ^selectors sorted: [ :x :y | x caseInsensitiveLessOrEqual: y ]!
-
- ^ (Array streamContents: [ :stream |
- (searchString findBetweenSubStrs: ';') do: [ :selPat |
- (selPat first = $" and: [ selPat last = $" and: [ selPat size > 2 ] ])
- ifTrue: [
- (Symbol lookup: (selPat copyFrom: 2 to: selPat size - 1))
- ifNotNil: [ :sym | stream nextPut: sym ] ]
- ifFalse: [
- | raw n m |
- n := selPat occurrencesOf: $*.
- m := selPat occurrencesOf: $#.
- raw := ((n > 0 or: [ m > 0 ]) and: [ selPat size > (n + m) ])
- ifTrue: [ Symbol selectorsMatching: selPat ]
- ifFalse: [ Symbol selectorsContaining: selPat ].
- stream nextPutAll: raw ] ] ])
- sort: [ :x :y | x caseInsensitiveLessOrEqual: y ]!
More information about the Squeak-dev
mailing list
|