allow for a browser to be opened on all classes matching a name-pattern
from the search-dialog.
--- a/NewSystemBrowser.st Fri Sep 05 10:53:01 2008 +0200
+++ b/NewSystemBrowser.st Fri Sep 05 10:54:01 2008 +0200
@@ -21287,7 +21287,7 @@
where is: #newBrowser - open a new browser showing the classes
where is: #newBuffer - add a new buffer showing the classes"
- self spawnClassBrowserFor:classes label:nil in:where
+ ^ self spawnClassBrowserFor:classes label:nil in:where
!
spawnClassBrowserFor:classes in:where select:doSelect
@@ -21330,7 +21330,7 @@
doSelect := true.
] ifFalse:[
spec := #multipleClassBrowserSpec.
- meta := self meta value.
+ meta := self meta value ? false.
].
allClasses := classes collect:[:cls | cls theNonMetaclass].
@@ -34309,6 +34309,8 @@
(classNames size == 1) ifTrue:[
className := classNames first
] ifFalse:[
+ |browseButton|
+
sortedBySpellingDistance ifFalse:[
classNames := classNames asArray sort.
].
@@ -34326,6 +34328,21 @@
box initialText:(caselessWithoutPrefixSubstringMatchingNames first).
].
box action:[:aString | className := aString].
+
+ browseButton := Button label:(resources string:'Browse All').
+ browseButton action:[
+ |classes|
+
+ classes := classNames collect:[:nm | Smalltalk classNamed:nm].
+ self
+ spawnClassBrowserFor:classes
+ label:('Classes Matching "%1"' bindWith:matchStringArg)
+ in:#newBrowser
+ select:false.
+ box hide
+ ].
+ box addButton:browseButton before:box okButton.
+
box open.
(box accepted not or:[className isNil]) ifTrue:[ "/ cancel
^ nil
@@ -41978,7 +41995,7 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1224 2008-09-02 17:59:47 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1225 2008-09-05 08:54:01 mb Exp $'
! !
NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st Fri Sep 05 10:53:01 2008 +0200
+++ b/Tools__NewSystemBrowser.st Fri Sep 05 10:54:01 2008 +0200
@@ -21287,7 +21287,7 @@
where is: #newBrowser - open a new browser showing the classes
where is: #newBuffer - add a new buffer showing the classes"
- self spawnClassBrowserFor:classes label:nil in:where
+ ^ self spawnClassBrowserFor:classes label:nil in:where
!
spawnClassBrowserFor:classes in:where select:doSelect
@@ -21330,7 +21330,7 @@
doSelect := true.
] ifFalse:[
spec := #multipleClassBrowserSpec.
- meta := self meta value.
+ meta := self meta value ? false.
].
allClasses := classes collect:[:cls | cls theNonMetaclass].
@@ -34309,6 +34309,8 @@
(classNames size == 1) ifTrue:[
className := classNames first
] ifFalse:[
+ |browseButton|
+
sortedBySpellingDistance ifFalse:[
classNames := classNames asArray sort.
].
@@ -34326,6 +34328,21 @@
box initialText:(caselessWithoutPrefixSubstringMatchingNames first).
].
box action:[:aString | className := aString].
+
+ browseButton := Button label:(resources string:'Browse All').
+ browseButton action:[
+ |classes|
+
+ classes := classNames collect:[:nm | Smalltalk classNamed:nm].
+ self
+ spawnClassBrowserFor:classes
+ label:('Classes Matching "%1"' bindWith:matchStringArg)
+ in:#newBrowser
+ select:false.
+ box hide
+ ].
+ box addButton:browseButton before:box okButton.
+
box open.
(box accepted not or:[className isNil]) ifTrue:[ "/ cancel
^ nil
@@ -41978,7 +41995,7 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1224 2008-09-02 17:59:47 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1225 2008-09-05 08:54:01 mb Exp $'
! !
NewSystemBrowser initialize!