SystemBrowser.st
changeset 90 60d0bb749a1c
parent 85 d9713a3ca092
child 93 dda97353e775
--- a/SystemBrowser.st	Sun Mar 26 22:18:34 1995 +0200
+++ b/SystemBrowser.st	Fri Mar 31 05:07:47 1995 +0200
@@ -64,7 +64,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.28 1995-03-25 22:24:49 claus Exp $
+$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.29 1995-03-31 03:07:37 claus Exp $
 "
 !
 
@@ -355,6 +355,54 @@
     ^ self browseMethodsIn:(aClass withAllSubclasses) inst:true class:false where:aBlock title:title
 ! !
 
+!SystemBrowser class methodsFor:'startup with query'!
+
+getClassThenPerform:aSelector
+    |enterBox|
+
+    enterBox := EnterBox title:(self classResources at:'Browse which class:') withCRs.
+    enterBox okText:(self classResources at:'browse').
+    enterBox action:[:className |
+	|cls|
+
+	cls := Smalltalk classNamed:className.
+	cls isNil ifTrue:[
+	    self warn:(self classResources at:'no such class').
+	] ifFalse:[
+	    self perform:aSelector with:cls  
+	]
+    ].
+    enterBox showAtPointer
+
+    "
+     SystemBrowser getClassThenPerform:#browseClass:
+    "
+!
+
+askThenBrowseClass
+    self getClassThenPerform:#browseClass:
+
+    "
+     SystemBrowser askThenBrowseClass
+    "
+!
+
+askThenBrowseClassHierarchy
+    self getClassThenPerform:#browseClassHierarchy:
+
+    "
+     SystemBrowser askThenBrowseClassHierarchy
+    "
+!
+
+askThenBrowseFullClassProtocol
+    self getClassThenPerform:#browseFullClassProtocol:
+
+    "
+     SystemBrowser askThenBrowseFullClassProtocol
+    "
+! !
+
 !SystemBrowser class methodsFor:'special search startup'!
 
 browseAllCallsOn:aSelectorString in:aCollectionOfClasses title:title