[squeak-dev] The Trunk: Tools-fbs.378.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Sep 11 12:42:23 UTC 2011

Levente Uzonyi uploaded a new version of Tools to project The Trunk:

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

Name: Tools-fbs.378
Author: fbs
Time: 10 September 2011, 2:55:47.901 pm
UUID: 389ea27d-de95-4e84-9212-59981f953940
Ancestors: Tools-eem.377

Mantis issue #7673.

Change a class name through the "rename class" menu item doesn't update code pane.

Given a class Foo renamed to Bar, the class description still looks like

Object subclass: #Foo <snip>

If you select another class and then Bar, the code pane contains correct information.

=============== Diff against Tools-eem.377 ===============

Item was changed:
  ----- Method: Browser>>renameClass (in category 'class functions') -----
  	| oldName newName obs |
  	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'].
  	self selectedClass rename: newName.
  	selectedClassName := newName.
  	self changed: #classList.
  	obs := self systemNavigation
  				allCallsOn: (self selectedClass environment associationAt: newName).
  	obs isEmpty
  		ifFalse: [self systemNavigation
  				browseMessageList: obs
  				name: 'Obsolete References to ' , oldName
+ 				autoSelect: oldName].
+ 	self selectClassNamed: newName.!
- 				autoSelect: oldName]!

More information about the Squeak-dev mailing list