The Trunk: Environments-cmm.52.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Environments-cmm.52.mcz

commits-2
Chris Muller uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-cmm.52.mcz

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

Name: Environments-cmm.52
Author: cmm
Time: 16 January 2015, 2:40:52.666 pm
UUID: 3da327fd-f1d6-49e1-ac81-0207b9264153
Ancestors: Environments-cmm.51, Environments-nice.47

- Roll back cwp.50 because creating a new binding leaves the CM-literal bindings in their old state.
- Don't signal #binding:removedFrom: because it's becoming the literal in CM's to a newly created Undeclared literal with the old name.
- So since we no longer signal removed: don't signal #binding:addedTo: either.
        Renaming is a updating of a binding, not a removing or adding.

=============== Diff against Environments-cmm.51 ===============

Item was changed:
  ----- Method: Environment>>renameClass:from:to: (in category 'classes and traits') -----
  renameClass: aClass from: oldName to: newName
  "Rename the class, aClass, to have the title newName."
 
  | binding category |
  category := self organization categoryOfElement: oldName.
  self organization classify: newName under: category suppressIfDefault: true.
  self organization removeElement: oldName.
 
+ binding := self associationAt: oldName.
- binding := self declarationOf: oldName.
  declarations removeKey: oldName.
+ " self binding: binding removedFrom: self."
- self binding: binding removedFrom: self.
 
+ binding key: newName.
- binding := newName => aClass.
  declarations add: binding.
+ " self binding: binding addedTo: self."
- self binding: binding addedTo: self.
 
  Smalltalk renamedClass: aClass from: oldName to: newName.
  SystemChangeNotifier uniqueInstance
  classRenamed: aClass
  from: oldName
  to: newName
  inCategory: category!