[Pkg] The Trunk: System-ar.279.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 6 04:19:22 UTC 2010


Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.279.mcz

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

Name: System-ar.279
Author: ar
Time: 5 March 2010, 8:18:27.754 pm
UUID: 75a1f1c6-40d7-1e48-a805-27661be5d095
Ancestors: System-ar.278

Factor out some duplicate code.

=============== Diff against System-ar.278 ===============

Item was added:
+ ----- Method: SystemDictionary>>renameClass:from:to: (in category 'class and trait names') -----
+ 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.
+ 	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: SystemDictionary>>renameClass:from: (in category 'class and trait names') -----
- ----- Method: SystemDictionary>>renameClass:from: (in category 'class names') -----
  renameClass: aClass from: oldName 
  	"Rename the class, aClass, to have the title newName."
+ 
+ 	^self renameClass: aClass from: oldName to: aClass name!
- 	| oldref newName category |
- 	newName := aClass name.
- 	category := SystemOrganization categoryOfElement: oldName.
- 	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: SystemDictionary>>renameClass:as: (in category 'class and trait names') -----
  renameClass: aClass as: newName 
  	"Rename the class, aClass, to have the title newName."
+ 
+ 	^self renameClass: aClass from: aClass name to: newName!
- 	"Original one I want to keep but needs to be fixed"
- 	
- 	| oldref oldName category |
- 	oldName := aClass name.
- 	category := aClass category.
- 	self organization classify: newName under: aClass category.
- 	self organization removeElement: aClass name.
- 	oldref := self associationAt: aClass name.
- 	self removeKey: aClass name.
- 	oldref key: newName.
- 	self add: oldref.  "Old association preserves old refs"
- 	Smalltalk renamedClass: aClass from: aClass name to: newName.
- 	self flushClassNameCache.
- 	SystemChangeNotifier uniqueInstance classRenamed: aClass from: oldName to: newName inCategory: category!



More information about the Packages mailing list