[squeak-dev] The Inbox: System-ct.1245.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 4 14:15:16 UTC 2021


A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1245.mcz

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

Name: System-ct.1245
Author: ct
Time: 4 October 2021, 4:15:11.217947 pm
UUID: ce795acc-c89b-5748-9b42-61b1fde2ac59
Ancestors: System-mt.1241

Adds support for browsing extension methods to SystemNavigation.

Usage:

	self systemNavigation browseAllExtensionsOfCategory: 'System-Support'.
	self systemNavigation browseAllExtensionsOfPackage: Project packageInfo.

Replaces System-ct.1131, now also with support for browsing extensions of system categories. Thanks to Jakob and Chris for the feedback!

=============== Diff against System-mt.1241 ===============

Item was added:
+ ----- Method: SystemNavigation>>allExtensionsOfCategory: (in category 'query') -----
+ allExtensionsOfCategory: systemCategory
+ 
+ 	^ self environment organization extensionMethodsForCategory: systemCategory!

Item was added:
+ ----- Method: SystemNavigation>>allExtensionsOfPackage: (in category 'query') -----
+ allExtensionsOfPackage: aPackageInfo
+ 
+ 	^ aPackageInfo extensionMethods!

Item was added:
+ ----- Method: SystemNavigation>>browseAllExtensionsOfCategory: (in category 'browse') -----
+ browseAllExtensionsOfCategory: systemCategory
+ 	"self default browseAllExtensionsOfCategory: 'Tools-Browser'"
+ 
+ 	^ self
+ 		browseMessageList: [self allExtensionsOfCategory: systemCategory]
+ 		name: ('Extensions of category {1}' translated format: {systemCategory})!

Item was added:
+ ----- Method: SystemNavigation>>browseAllExtensionsOfPackage: (in category 'browse') -----
+ browseAllExtensionsOfPackage: aPackageInfo
+ 	"self default browseAllExtensionsOfPackage: Morph packageInfo"
+ 
+ 	^ self
+ 		browseMessageList: [self allExtensionsOfPackage: aPackageInfo]
+ 		name: ('Extensions of package {1}' translated format: {aPackageInfo name})!

Item was added:
+ ----- Method: SystemOrganizer>>category:matches: (in category 'as yet unclassified') -----
+ category: categoryName matches: prefix
+ 
+ 	| prefixSize catSize |
+ 	categoryName ifNil: [^ false].
+ 	catSize := categoryName size.
+ 	prefixSize := prefix size.
+ 	catSize < prefixSize ifTrue: [^ false].
+ 	(categoryName findString: prefix startingAt: 1 caseSensitive: false) = 1
+ 		ifFalse: [^ false].
+ 	^(categoryName at: prefix size + 1 ifAbsent: [^ true]) = $-!

Item was added:
+ ----- Method: SystemOrganizer>>extensionMethodsForCategory: (in category 'as yet unclassified') -----
+ extensionMethodsForCategory: systemCategoryName
+ 
+ 	| categoryPrefix |
+ 	categoryPrefix := '*' , systemCategoryName.
+ 	^ self allElements
+ 		gather: [:className | | class |
+ 			class := self environment classNamed: className.
+ 			(class organization categories
+ 				select: [:methodCategoryName | methodCategoryName notNil
+ 					and: [self category: methodCategoryName matches: categoryPrefix]])
+ 					gather: [:methodCategoryName | (class organization listAtCategoryNamed: methodCategoryName)
+ 						collect: [:selector | MethodReference
+ 							class: class
+ 							selector: selector
+ 							environment: self environment]]]!



More information about the Squeak-dev mailing list