[Pkg] The Trunk: System-laza.459.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Nov 4 10:29:46 UTC 2011
Alexander Lazarević uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-laza.459.mcz
==================== Summary ====================
Name: System-laza.459
Author: laza
Time: 3 November 2011, 8:13:48.899 am
UUID: 7bf95c73-93c1-d044-b91e-75e6e1456825
Ancestors: System-laza.458
Make SystemOrganizer trigger a notification on adding a category
=============== Diff against System-laza.457 ===============
Item was added:
+ ----- Method: AbstractEvent class>>protocol:class: (in category 'instance creation') -----
+ protocol: aProtocol class: aClass
+
+ | instance |
+ instance := self item: aProtocol kind: self protocolKind.
+ instance itemClass: aClass.
+ ^instance!
Item was changed:
----- Method: SmalltalkImage>>event: (in category 'sources, changes log') -----
event: anEvent
"Hook for SystemChangeNotifier"
+ anEvent isDoIt ifTrue: [^self logChange: anEvent item].
+ (anEvent itemKind = SystemChangeNotifier categoryKind) ifTrue: [
+ anEvent isAdded
+ ifTrue: [^self logChange: 'SystemOrganization addCategory: ', anEvent item storeString].
+ anEvent isRemoved
+ ifTrue: [^self logChange: 'SystemOrganization removeSystemCategory: ', anEvent item storeString].
+ anEvent isRenamed
+ ifTrue: [^self logChange: 'SystemOrganization renameCategory: ', anEvent oldName storeString, ' toBe: ', anEvent newName storeString].
- (anEvent isRemoved and: [anEvent itemKind = SystemChangeNotifier classKind]) ifTrue: [
- anEvent item acceptsLoggingOfCompilation
- ifTrue: [self logChange: 'Smalltalk removeClassNamed: #' , anEvent item name].
].
+
+ (anEvent itemKind = SystemChangeNotifier classKind) ifTrue: [
+ anEvent item acceptsLoggingOfCompilation ifFalse: [^self].
+ "anEvent isAdded ifTrue: [
+ self logChange: anEvent item definition.
+ ]."
+ anEvent isModified
+ ifTrue: [^self logChange: anEvent item definition].
+ anEvent isRemoved
+ ifTrue: [^self logChange: 'Smalltalk removeClassNamed: ' , anEvent item name storeString].
+ anEvent isRenamed
+ ifTrue: [^self logChange: 'Smalltalk renameClassNamed: ', anEvent oldName storeString, ' as: ', anEvent newName storeString].
+ ].
+
+ (anEvent itemKind = SystemChangeNotifier protocolKind) ifTrue: [
+ anEvent isAdded
+ ifTrue: [^self logChange: anEvent itemClass name , ' organization addCategory: ' , anEvent itemProtocol storeString].
+ anEvent isRemoved
+ ifTrue: [^self logChange: anEvent itemClass name , ' organization removeCategory: ' , anEvent itemProtocol storeString].
+ anEvent isRenamed
+ ifTrue: [^self logChange: anEvent itemClass name , ' organization renameCategory: ' , anEvent oldName storeString, ' toBe: ', anEvent newName storeString].
+ ].
+
+ (anEvent itemKind = SystemChangeNotifier methodKind) ifTrue: [
+ anEvent itemClass acceptsLoggingOfCompilation ifFalse: [^self].
+ anEvent isRemoved
+ ifTrue: [^self logChange: anEvent itemClass name , ' removeSelector: ' , anEvent itemSelector storeString].
+ anEvent isRecategorized
+ ifTrue: [
+ | newProtocol |
+ newProtocol := anEvent itemClass organization categoryOfElement: anEvent item selector.
+ ^self logChange: anEvent itemClass name , ' organization classify: ', anEvent item selector storeString, ' under: ', newProtocol storeString.
+ ].
+ ].!
- anEvent isDoIt
- ifTrue: [self logChange: anEvent item].
- (anEvent isRemoved and: [anEvent itemKind = SystemChangeNotifier methodKind]) ifTrue: [
- anEvent itemClass acceptsLoggingOfCompilation
- ifTrue: [self logChange: anEvent itemClass name , ' removeSelector: #' , anEvent itemSelector]].!
Item was added:
+ ----- Method: SystemChangeNotifier>>protocolAdded:inClass: (in category 'system triggers') -----
+ protocolAdded: aProtocol inClass: aClass
+ self trigger: (
+ AddedEvent protocol: aProtocol class: aClass
+ )!
Item was added:
+ ----- Method: SystemChangeNotifier>>protocolRemoved:inClass: (in category 'system triggers') -----
+ protocolRemoved: aProtocol inClass: aClass
+ self trigger: (
+ RemovedEvent protocol: aProtocol class: aClass
+ )!
Item was added:
+ ----- Method: SystemChangeNotifier>>protocolRenamedFrom:to:inClass: (in category 'system triggers') -----
+ protocolRenamedFrom: anOldProtocol to: aNewProtocol inClass: aClass
+ self trigger: (
+ (RenamedEvent protocol: anOldProtocol class: aClass)
+ oldName: anOldProtocol;
+ newName: aNewProtocol
+ )!
Item was removed:
- ----- Method: SystemOrganizer>>addCategory: (in category 'accessing') -----
- addCategory: newCategory
- | r |
- r := super addCategory: newCategory.
- SystemChangeNotifier uniqueInstance classCategoryAdded: newCategory.
- ^ r!
Item was added:
+ ----- Method: SystemOrganizer>>addCategory:before: (in category 'accessing') -----
+ addCategory: catString before: nextCategory
+ SystemChangeNotifier uniqueInstance doSilently: [
+ super addCategory: catString before: nextCategory].
+ SystemChangeNotifier uniqueInstance classCategoryAdded: catString.
+ !
More information about the Packages
mailing list