The Trunk: Tools-mt.885.mcz

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

The Trunk: Tools-mt.885.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.885.mcz

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

Name: Tools-mt.885
Author: mt
Time: 5 September 2019, 10:30:32.353472 am
UUID: 629ef430-add9-7140-94ae-d961f7288ab8
Ancestors: Tools-pre.884

Complements Kernel-mt.1264.

=============== Diff against Tools-pre.884 ===============

Item was changed:
  ----- Method: Browser>>renameClass (in category 'class functions') -----
  renameClass
  | oldName newName obs oldBinding |
  self hasClassSelected ifFalse: [^ self].
  self okToChange
  ifFalse: [^ self].
  oldName := self selectedClass name.
  newName := self request: 'Please type new class name' initialAnswer: oldName.
  newName = ''
  ifTrue: [^ self].
  "Cancel returns ''"
  newName := newName asSymbol.
  newName = oldName
  ifTrue: [^ self].
  (self selectedClass environment includesKey: newName)
  ifTrue: [^ self error: newName , ' already exists'].
  oldBinding := self selectedClass environment declarationOf: oldName.
+ [self selectedClass rename: newName]
+ on: Notification
+ do: [:ex | self inform: ex messageText].
- self selectedClass rename: newName.
  selectedClassName := newName.
  self changed: #classList.
  obs := self systemNavigation allCallsOn: oldBinding.
  obs isEmpty
  ifFalse: [self systemNavigation
  browseMessageList: obs
  name: 'Obsolete References to ' , oldName
  autoSelect: oldName].
  self selectClassNamed: newName.!