[squeak-dev] The Trunk: System-laza.466.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Dec 14 15:53:14 UTC 2011
Alexander Lazarević uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-laza.466.mcz
==================== Summary ====================
Name: System-laza.466
Author: laza
Time: 14 December 2011, 4:52:33.82 pm
UUID: 782ddcd7-793c-43d9-a06a-545f63004acc
Ancestors: System-ul.463
Backported From: System-laza.465
Make the recategorization of a class be recorded in the changes file
=============== Diff against System-ul.463 ===============
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 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 isRecategorized
+ ifTrue: [^self logChange: 'SystemOrganization classify: ', anEvent item name storeString, ' under: ', anEvent itemCategory 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: [
+ ^self logChange: anEvent itemClass name , ' organization classify: ', anEvent item selector storeString, ' under: ', anEvent itemProtocol storeString.
- | newProtocol |
- newProtocol := anEvent itemClass organization categoryOfElement: anEvent item selector.
- ^self logChange: anEvent itemClass name , ' organization classify: ', anEvent item selector storeString, ' under: ', newProtocol storeString.
].
].!
Item was changed:
----- Method: SystemDictionary>>renameClass:from:to: (in category 'classes and traits') -----
renameClass: aClass from: oldName to: newName
"Rename the class, aClass, to have the title newName."
| oldref category |
category := SystemOrganization categoryOfElement: oldName.
+ self organization classify: newName under: category suppressIfDefault: true.
- self organization classify: newName under: category.
self organization removeElement: oldName.
oldref := self associationAt: oldName.
self removeKey: oldName.
oldref key: newName.
self add: oldref. "Old association preserves old refs"
Smalltalk renamedClass: aClass from: oldName to: newName.
self flushClassNameCache.
SystemChangeNotifier uniqueInstance classRenamed: aClass from: oldName to: newName inCategory: category!
Item was changed:
----- Method: SystemOrganizer>>addCategory:before: (in category 'accessing') -----
addCategory: catString before: nextCategory
+ SystemChangeNotifier uniqueInstance
+ doSilently: [super addCategory: catString before: nextCategory];
+ classCategoryAdded: catString!
- SystemChangeNotifier uniqueInstance doSilently: [
- super addCategory: catString before: nextCategory].
- SystemChangeNotifier uniqueInstance classCategoryAdded: catString.
- !
Item was added:
+ ----- Method: SystemOrganizer>>classify:under: (in category 'accessing') -----
+ classify: element under: newCategory
+ | oldCategory |
+ oldCategory := self categoryOfElement: element.
+ super classify: element under: newCategory.
+ SystemChangeNotifier uniqueInstance
+ class: (Smalltalk at: element)
+ recategorizedFrom: oldCategory
+ to: newCategory !
More information about the Squeak-dev
mailing list
|