--- a/BrowserView.st Sat Jun 01 00:33:23 1996 +0200
+++ b/BrowserView.st Sat Jun 01 16:16:49 1996 +0200
@@ -444,9 +444,37 @@
!
classCategoryFindClass
- |box|
-
- box := self enterBoxForCodeSelectionTitle:'class to find:' okText:'find'.
+ self classCategoryFindClassOpen:false
+
+ "Modified: 1.6.1996 / 16:03:12 / cg"
+!
+
+classCategoryFindClassOpen:doOpen
+ "common code for both opening a new browser on a class and
+ to search for a class in this browser"
+
+ |box openButton title open okText okText2|
+
+ open := doOpen.
+ open ifTrue:[
+ title := 'class to browse:'.
+ okText := 'open'.
+ okText2 := 'find here'.
+ ] ifFalse:[
+ title := 'class to find:'.
+ okText := 'find'.
+ okText2 := 'open new'.
+ ].
+ box := self enterBoxForCodeSelectionTitle:title okText:okText.
+ box label:'Class name entry'.
+ openButton := box addButton:(Button label:(resources string:okText2)) before:(box okButton).
+
+ openButton action:[
+ open := open not.
+ box doAccept.
+ box okPressed.
+ ].
+
box entryCompletionBlock:[:contents |
|s what m|
@@ -457,10 +485,20 @@
self beep
]
].
- box action:[:aString | self switchToClassNameMatching:aString].
+ box action:[:aString |
+ |brwsr|
+
+ open ifTrue:[
+ brwsr := SystemBrowser open
+ ] ifFalse:[
+ brwsr := self
+ ].
+ brwsr switchToClassNameMatching:aString
+ ].
box showAtPointer
- "Modified: 28.5.1996 / 16:54:30 / cg"
+ "Created: 1.6.1996 / 16:03:15 / cg"
+ "Modified: 1.6.1996 / 16:15:51 / cg"
!
classCategoryFindMethod
@@ -679,23 +717,9 @@
!
classCategoryOpenInClass
- |box|
-
- box := self enterBoxForCodeSelectionTitle:'class to find:' okText:'find'.
- box entryCompletionBlock:[:contents |
- |s what m|
-
- s := contents withoutSpaces.
- what := Smalltalk classnameCompletion:s.
- box contents:what first.
- (what at:2) size ~~ 1 ifTrue:[
- self beep
- ]
- ].
- box action:[:aString | (SystemBrowser open) switchToClassNameMatching:aString].
- box showAtPointer
-
- "Modified: 28.5.1996 / 16:54:38 / cg"
+ self classCategoryFindClassOpen:true
+
+ "Modified: 1.6.1996 / 16:03:30 / cg"
!
classCategoryPrintOut
@@ -7142,6 +7166,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.144 1996-05-29 15:37:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.145 1996-06-01 14:16:49 cg Exp $'
! !
BrowserView initialize!