8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
12 |
13 'From Smalltalk/X, Version:2.10.9 on 11-jun-1996 at 16:32:26' ! |
13 'From Smalltalk/X, Version:2.10.9 on 19-jun-1996 at 14:29:50' ! |
14 |
14 |
15 ApplicationModel subclass:#SystemBrowser |
15 ApplicationModel subclass:#SystemBrowser |
16 instanceVariableNames:'currentClass currentMethodCategory currentMethod currentSelector |
16 instanceVariableNames:'currentClass currentMethodCategory currentMethod currentSelector |
17 showInstance actualClasslastMethodCategory aspect lockUpdates |
17 showInstance actualClasslastMethodCategory aspect lockUpdates |
18 autoSearch myLabel acceptClass' |
18 autoSearch myLabel acceptClass' |
19 classVariableNames:'CheckForInstancesWhenRemovingClasses' |
19 classVariableNames:'CheckForInstancesWhenRemovingClasses' |
20 poolDictionaries:'' |
20 poolDictionaries:'' |
21 category:'Interface-Browsers' |
21 category:'Interface-Browsers' |
22 ! |
22 ! |
23 |
23 |
24 !SystemBrowser class methodsFor:'documentation'! |
24 !SystemBrowser class methodsFor:'documentation'! |
25 |
25 |
26 copyright |
26 copyright |
27 " |
27 " |
28 COPYRIGHT (c) 1989 by Claus Gittinger |
28 COPYRIGHT (c) 1989 by Claus Gittinger |
29 All Rights Reserved |
29 All Rights Reserved |
160 d startDispatch. |
160 d startDispatch. |
161 SystemBrowser openOnDevice:d |
161 SystemBrowser openOnDevice:d |
162 " |
162 " |
163 ! ! |
163 ! ! |
164 |
164 |
165 !SystemBrowser class methodsFor:'private helpers'! |
165 !SystemBrowser class methodsFor:'private helpers'! |
166 |
166 |
167 showNoneFound |
167 showNoneFound |
168 super warn:(self classResources string:'None found'). |
168 super warn:(self classResources string:'None found'). |
169 ! |
169 ! |
170 |
170 |
171 showNoneFound:what |
171 showNoneFound:what |
172 super warn:(self classResources string:(what , '...\\... none found') withCRs). |
172 super warn:(self classResources string:(what , '...\\... none found') withCRs). |
173 ! ! |
173 ! ! |
174 |
174 |
175 !SystemBrowser class methodsFor:'private instance creation'! |
175 !SystemBrowser class methodsFor:'private instance creation'! |
176 |
176 |
177 newWithLabel:aString setupBlock:aBlock |
177 newWithLabel:aString setupBlock:aBlock |
178 "common helper method for all creation methods" |
178 "common helper method for all creation methods" |
179 |
179 |
180 ^ self newWithLabel:aString setupBlock:aBlock onDevice:Screen current |
180 ^ self newWithLabel:aString setupBlock:aBlock onDevice:Screen current |
209 newBrowser perform:aSymbol with:arg. |
209 newBrowser perform:aSymbol with:arg. |
210 newBrowser open. |
210 newBrowser open. |
211 ^ newBrowser |
211 ^ newBrowser |
212 ! ! |
212 ! ! |
213 |
213 |
214 !SystemBrowser class methodsFor:'special search startup'! |
214 !SystemBrowser class methodsFor:'special search startup'! |
215 |
215 |
216 aproposSearch:aString |
216 aproposSearch:aString |
217 "browse all methods, which have aString in their selector or |
217 "browse all methods, which have aString in their selector or |
218 in the methods comment. |
218 in the methods comment. |
219 This is relatively slow, since all source must be processed." |
219 This is relatively slow, since all source must be processed." |
625 (aClass implements:sel) ifTrue:[ |
625 (aClass implements:sel) ifTrue:[ |
626 list add:(nm , ' ' , aSelectorString) |
626 list add:(nm , ' ' , aSelectorString) |
627 ]. |
627 ]. |
628 aClass isMeta ifFalse:[ |
628 aClass isMeta ifFalse:[ |
629 (aClass class implements:sel) ifTrue:[ |
629 (aClass class implements:sel) ifTrue:[ |
630 list add:(nm , 'class ' , aSelectorString) |
630 list add:(nm , ' class ' , aSelectorString) |
631 ] |
631 ] |
632 ] |
632 ] |
633 ] |
633 ] |
634 ]. |
634 ]. |
635 ^ self browseMethods:list asOrderedCollection title:title |
635 ^ self browseMethods:list asOrderedCollection title:title |
642 title:'some implementors of +' |
642 title:'some implementors of +' |
643 " |
643 " |
644 |
644 |
645 "Modified: 4.9.1995 / 17:33:39 / claus" |
645 "Modified: 4.9.1995 / 17:33:39 / claus" |
646 "Modified: 10.12.1995 / 16:59:03 / cg" |
646 "Modified: 10.12.1995 / 16:59:03 / cg" |
647 "Modified: 7.6.1996 / 08:45:17 / stefan" |
647 "Modified: 19.6.1996 / 14:19:02 / stefan" |
648 ! |
648 ! |
649 |
649 |
650 browseImplementorsOf:aSelectorString under:aClass |
650 browseImplementorsOf:aSelectorString under:aClass |
651 "launch a browser for all implementors of aSelector in aClass |
651 "launch a browser for all implementors of aSelector in aClass |
652 and its subclasses" |
652 and its subclasses" |
988 ^ searchBlock |
988 ^ searchBlock |
989 |
989 |
990 "Modified: 24.4.1996 / 13:21:12 / cg" |
990 "Modified: 24.4.1996 / 13:21:12 / cg" |
991 ! ! |
991 ! ! |
992 |
992 |
993 !SystemBrowser class methodsFor:'startup'! |
993 !SystemBrowser class methodsFor:'startup'! |
994 |
994 |
995 browseAllSelect:aBlock |
995 browseAllSelect:aBlock |
996 "launch a browser for all methods where aBlock returns true. |
996 "launch a browser for all methods where aBlock returns true. |
997 The block is called with 3 arguments, class, method and seelctor." |
997 The block is called with 3 arguments, class, method and seelctor." |
998 |
998 |
1159 |
1159 |
1160 browseMethods:aList title:aString |
1160 browseMethods:aList title:aString |
1161 "launch a browser for an explicit list of class/selectors. |
1161 "launch a browser for an explicit list of class/selectors. |
1162 Each entry in the list can be either a method, or a string |
1162 Each entry in the list can be either a method, or a string |
1163 consisting of the classes name and the selector, separated by spaces. |
1163 consisting of the classes name and the selector, separated by spaces. |
1164 For class methods, the string 'class' must be appended to the classname." |
1164 For class methods, the string ' class' must be appended to the classname." |
1165 |
1165 |
1166 |l| |
1166 |l| |
1167 |
1167 |
1168 (aList size == 0) ifTrue:[ |
1168 (aList size == 0) ifTrue:[ |
1169 self showNoneFound:aString. |
1169 self showNoneFound:aString. |
1205 title:'some methods' |
1205 title:'some methods' |
1206 |
1206 |
1207 " |
1207 " |
1208 |
1208 |
1209 "Modified: 12.12.1995 / 16:34:27 / cg" |
1209 "Modified: 12.12.1995 / 16:34:27 / cg" |
|
1210 "Modified: 17.6.1996 / 17:07:46 / stefan" |
1210 ! |
1211 ! |
1211 |
1212 |
1212 browseMethodsFrom:aClass where:aBlock title:title |
1213 browseMethodsFrom:aClass where:aBlock title:title |
1213 "launch a browser for all instance- and classmethods in aClass |
1214 "launch a browser for all instance- and classmethods in aClass |
1214 and all its subclasses where aBlock evaluates to true. |
1215 and all its subclasses where aBlock evaluates to true. |
1294 The block is called with 3 arguments, class, method and seelctor." |
1295 The block is called with 3 arguments, class, method and seelctor." |
1295 |
1296 |
1296 ^ self browseMethodsIn:(Smalltalk allClasses) where:aBlock title:title |
1297 ^ self browseMethodsIn:(Smalltalk allClasses) where:aBlock title:title |
1297 ! ! |
1298 ! ! |
1298 |
1299 |
1299 !SystemBrowser class methodsFor:'startup with query'! |
1300 !SystemBrowser class methodsFor:'startup with query'! |
1300 |
1301 |
1301 askThenBrowseClass |
1302 askThenBrowseClass |
1302 self getClassThenPerform:#browseClass: |
1303 self getClassThenPerform:#browseClass: |
1303 |
1304 |
1304 " |
1305 " |