The Trunk: System-mt.1068.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-mt.1068.mcz

commits-2
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1068.mcz

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

Name: System-mt.1068
Author: mt
Time: 11 July 2019, 8:46:30.024838 am
UUID: e2fe883c-8353-bf4d-8921-ba296fa973bb
Ancestors: System-cmm.1067

Use new find-features feature to implement #suggestedTypeNames.

=============== Diff against System-cmm.1067 ===============

Item was changed:
  ----- Method: String>>suggestedTypeNames (in category '*system') -----
  suggestedTypeNames
+
+ ^ Array streamContents: [:stream |
+ self findFeatureIndicesDo: [:start :end |
+ (self at: start) isUppercase ifTrue: [
+ stream nextPut: (self copyFrom: start to: end).
+ "Often, argument names that refer to Collections end in the letter s, which can cause the suggested type-name to not be found. Account for this."
+ (self at: end) = $s ifTrue: [
+ stream nextPut: (self copyFrom: start to: end -1)]]]].!
- ^ Array streamContents:
- [ : stream |
- self withIndexDo:
- [ : eachChar : index |
- eachChar isUppercase ifTrue:
- [ stream nextPut:
- (self
- copyFrom: index
- to: self size) withBlanksTrimmed.
- "Often, argument names that refer to Collections end in the letter s, which can cause the suggested type-name to not be found.  Account for this."
- self last = $s
- ifTrue:
- [ stream nextPut:
- (self
- copyFrom: index
- to: self size-1) withBlanksTrimmed ] ] ] ]!