A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ul.283.mcz==================== Summary ====================
Name: Tools-ul.283
Author: ul
Time: 8 December 2010, 9:22:57.213 pm
UUID: bee239a8-a732-0943-8145-899621dda613
Ancestors: Tools-ul.282
- Browser >> #findClass now uses the fancy ListChooser (in Morphic)
=============== Diff against Tools-ul.282 ===============
Item was changed:
----- Method: Browser>>findClass (in category 'system category functions') -----
findClass
+ "Search for a class or a trait by name."
+
+ | names index foundClass |
+ (multiWindowState notNil or: [ self okToChange ]) ifFalse: [
+ ^self classNotFound ].
+ names := Smalltalk globals classAndTraitNames.
+ index := UIManager default
+ chooseFrom: names
+ lines: #()
+ title: 'Class name or fragment?'.
+ index = 0 ifTrue: [ ^self classNotFound ].
+ foundClass := Smalltalk globals
+ at: (names at: index)
+ ifAbsent: [ ^self classNotFound ].
+ (self selectedClass notNil and: [
+ multiWindowState notNil and: [
+ "Can only support multi-window if original window has all the right panes."
+ multiWindowState prototype isHierarchy not ] ]) ifTrue: [
+ (self classList includes: foundClass name)
+ ifTrue: [ multiWindowState copyWindow ]
+ ifFalse: [ multiWindowState addNewWindow ] ].
- "Search for a class by name."
- | pattern foundClass |
-
- (multiWindowState notNil
- or: [self okToChange]) ifFalse:
- [^self classNotFound].
- pattern := UIManager default request: 'Class name or fragment?'.
- pattern isEmpty ifTrue: [^self classNotFound].
- foundClass := Utilities classFromPattern: pattern withCaption: ''.
- foundClass ifNil: [^self classNotFound].
- (self selectedClass notNil
- and: [multiWindowState notNil
- "Can only support multi-window if original window has all the right panes."
- and: [multiWindowState prototype isHierarchy not]]) ifTrue:
- [(self classList includes: foundClass name)
- ifTrue: [multiWindowState copyWindow]
- ifFalse: [multiWindowState addNewWindow]].
self selectCategoryForClass: foundClass.
self selectClass: foundClass!