--- a/SystemBrowser.st Wed Jun 19 14:13:49 2002 +0200
+++ b/SystemBrowser.st Wed Jun 19 14:20:14 2002 +0200
@@ -648,6 +648,82 @@
ifAbsentPut:[(Depth4Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@H"H"H"H @BQBH!!D"H@@$P"HQH"@@H"H"DQH @BH"HQDRH@@"H"DQH"@@L3L3DSL0@CL3L1D3L@@3L3L3L3@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 51 153 153 51 255 255 255 153 0 255 255 0]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a') ; yourself); yourself]
!
+medium_methodEmptyInheritedIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self medium_methodEmptyInheritedIcon inspect
+ ImageEditor openOnClass:self andSelector:#medium_methodEmptyInheritedIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class medium_methodEmptyInheritedIcon'
+ ifAbsentPut:[(Depth4Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
+!
+
+medium_methodInheritedFromAboveAndRedefinedBelowIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self medium_methodInheritedFromAboveAndRedefinedBelowIcon inspect
+ ImageEditor openOnClass:self andSelector:#medium_methodInheritedFromAboveAndRedefinedBelowIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class medium_methodInheritedFromAboveAndRedefinedBelowIcon'
+ ifAbsentPut:[(Depth4Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@ADP@@@@DQ@@@L@A@@@@0@D@@@C@@P@@CL0@@@@L3@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255 255 255 127 255 127 127]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@/ B>@K8A7@G\@]0C:@O(@> @@@@@a') ; yourself); yourself]
+!
+
+medium_methodInheritedFromAboveIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self medium_methodInheritedFromAboveIcon inspect
+ ImageEditor openOnClass:self andSelector:#medium_methodInheritedFromAboveIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class medium_methodInheritedFromAboveIcon'
+ ifAbsentPut:[(Depth4Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@L@@@@@@0@@@@@C@@@@@CL0@@@@L3@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255 255 255 127]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@ @B@@H@A0@G@@\@C8@O @>@@@@@@a') ; yourself); yourself]
+!
+
+medium_methodRedefinedBelowIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self medium_methodRedefinedBelowIcon inspect
+ ImageEditor openOnClass:self andSelector:#medium_methodRedefinedBelowIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class medium_methodRedefinedBelowIcon'
+ ifAbsentPut:[(Depth4Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@ADP@@@@DQ@@@@@A@@@@@@D@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255 255 255 127 255 127 127]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@O @>@C8@G@@\@A0@B@@H@@ @@@@@a') ; yourself); yourself]
+!
+
menuIcon
"This resource specification was automatically generated
by the ImageEditor of ST/X."
@@ -667,6 +743,22 @@
ifAbsentPut:[(Depth2Image new) width: 13; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@B***P@%UUT@@@@@@B***P@%UUT@@@@@@B***P@%UUT@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255]; mask:((Depth1Image new) width: 13; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8?? @@@@a') ; yourself); yourself]
!
+methodEmptyInheritedIcon
+ ^ self small_methodEmptyInheritedIcon
+!
+
+methodInheritedFromAboveAndRedefinedBelowIcon
+ ^ self small_methodInheritedFromAboveAndRedefinedBelowIcon
+!
+
+methodInheritedFromAboveIcon
+ ^ self small_methodInheritedFromAboveIcon
+!
+
+methodRedefinedBelowIcon
+ ^ self small_methodRedefinedBelowIcon
+!
+
nameSpaceIcon
"This resource specification was automatically generated
by the ImageEditor of ST/X."
@@ -858,6 +950,82 @@
ifAbsentPut:[(Depth2Image new) width: 9; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@T@@AA@@AA@@EUP@EUP@EQP@EQP@EQP@EAP@AU@@@@@@') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 9; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'F@@$@BP@_ A>@G8@_ A>@G8@O@@@@@@a') ; yourself); yourself]
!
+small_methodEmptyInheritedIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self small_methodEmptyInheritedIcon inspect
+ ImageEditor openOnClass:self andSelector:#small_methodEmptyInheritedIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class small_methodEmptyInheritedIcon'
+ ifAbsentPut:[(Depth4Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@b') ; yourself); yourself]
+!
+
+small_methodInheritedFromAboveAndRedefinedBelowIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self small_methodInheritedFromAboveAndRedefinedBelowIcon inspect
+ ImageEditor openOnClass:self andSelector:#small_methodInheritedFromAboveAndRedefinedBelowIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class small_methodInheritedFromAboveAndRedefinedBelowIcon'
+ ifAbsentPut:[(Depth4Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'APT@@C@@USUP@3L@@@@@@@@@@@@@ADP@UTUP@D@@APT@') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255 255 255 127 255 127 127 63 63 63]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'\GC8>O @>O#8\G@b') ; yourself); yourself]
+!
+
+small_methodInheritedFromAboveIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self small_methodInheritedFromAboveIcon inspect
+ ImageEditor openOnClass:self andSelector:#small_methodInheritedFromAboveIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class small_methodInheritedFromAboveIcon'
+ ifAbsentPut:[(Depth4Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A@P@@C@@QCQ@@3L@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255 255 255 127 63 63 63]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'\GC8>O @@@@@@@@b') ; yourself); yourself]
+!
+
+small_methodRedefinedBelowIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self small_methodRedefinedBelowIcon inspect
+ ImageEditor openOnClass:self andSelector:#small_methodRedefinedBelowIcon
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'SystemBrowser class small_methodRedefinedBelowIcon'
+ ifAbsentPut:[(Depth4Image new) width: 5; height: 11; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@ADP@UTUP@D@@APT@') ; colorMapFromArray:#[0 0 0 170 170 170 255 255 255 255 255 127 255 127 127 63 63 63]; mask:((Depth1Image new) width: 5; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@>O#8\G@b') ; yourself); yourself]
+!
+
startableClassIcon
"This resource specification was automatically generated
by the ImageEditor of ST/X."
@@ -2142,7 +2310,7 @@
|list|
list := self
- findImplementorsOf:aSelectorString
+ findImplementorsMatching:aSelectorString
in:aCollectionOfClasses
ignoreCase:ignoreCase.
@@ -2897,6 +3065,84 @@
^ self findSpecMethodsFor:#help withString:aString in:aCollectionOfClasses ignoreCase:ignoreCase
!
+findImplementorsMatching:aSelectorMatchString in:aCollectionOfClasses ignoreCase:ignoreCase
+ "search for all implementors of aSelector in
+ the classes contained in aCollectionOfClasses and its metaclasses.
+ Return a collection of methods"
+
+ |list srchST srchJava lcSelector|
+
+ aSelectorMatchString size == 0 ifTrue:[ ^ #() ].
+
+ list := IdentitySet new.
+
+ ignoreCase == true ifTrue:[
+ lcSelector := aSelectorMatchString asLowercase.
+
+ srchST := [:aSelector :aMethod |
+ (lcSelector match:aSelectorMatchString asLowercase) ifTrue:[
+ list add:aMethod
+ ]
+ ].
+ srchJava := [:aSelector :aMethod |
+ (aSelector match:aMethod name asLowercase) ifTrue:[
+ list add:aMethod
+ ]
+ ].
+ ] ifFalse:[
+ srchST := [:aSelector :aMethod |
+ (aSelectorMatchString match:aSelector) ifTrue:[
+ list add:aMethod
+ ]
+ ].
+ srchJava := [:aSelector :aMethod |
+ (aSelectorMatchString match:aMethod name) ifTrue:[
+ list add:aMethod
+ ]
+ ].
+ ].
+
+ aCollectionOfClasses do:[:aClass |
+ |srchBlock|
+
+ aClass isObsolete ifFalse:[
+ aClass isJavaClass ifTrue:[
+ srchBlock := srchJava
+ ] ifFalse:[
+ srchBlock := srchST
+ ].
+ aClass methodDictionary keysAndValuesDo:srchBlock.
+ aClass isMeta ifFalse:[
+ aClass class methodDictionary keysAndValuesDo:srchBlock
+ ]
+ ]
+ ].
+
+ ^ list
+
+ "
+ SystemBrowser findImplementorsOf:#+
+ in:(Array with:Number
+ with:Float
+ with:SmallInteger)
+ "
+!
+
+findImplementorsMatchingAny:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase
+ "search for all implementors of any in aCollectionOfSelectors in
+ the classes contained in aCollectionOfClasses and its metaclasses.
+ Return a collection of methods.
+ CAVEAT: searches multiple times (could be tuned alot if heavily used)"
+
+ |implementors|
+
+ implementors := IdentitySet new.
+ aCollectionOfSelectors do:[:eachSelector |
+ implementors addAll:(self findImplementorsMatching:eachSelector in:aCollectionOfClasses ignoreCase:ignoreCase).
+ ].
+ ^ implementors
+!
+
findImplementorsOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase
"search for all implementors of aSelector in
the classes contained in aCollectionOfClasses and its metaclasses.
@@ -2908,36 +3154,35 @@
list := IdentitySet new.
- ((aSelectorString ~= '*') and:[aSelectorString includesMatchCharacters]) ifTrue:[
- "a matchString"
-
- ignoreCase == true ifTrue:[
- lcSelector := aSelectorString asLowercase.
-
- srchST := [:aSelector :aMethod |
- (lcSelector match:aSelector asLowercase) ifTrue:[
- list add:aMethod
- ]
- ].
- srchJava := [:aSelector :aMethod |
- (aSelector match:aMethod name asLowercase) ifTrue:[
- list add:aMethod
- ]
- ].
- ] ifFalse:[
- srchST := [:aSelector :aMethod |
- (aSelectorString match:aSelector) ifTrue:[
- list add:aMethod
- ]
- ].
- srchJava := [:aSelector :aMethod |
- (aSelectorString match:aMethod name) ifTrue:[
- list add:aMethod
- ]
- ].
- ].
- ] ifFalse:[
- "can do a faster search"
+"/ ((aSelectorString ~= '*') and:[aSelectorString includesMatchCharacters]) ifTrue:[
+"/ "a matchString"
+"/
+"/ ignoreCase == true ifTrue:[
+"/ lcSelector := aSelectorString asLowercase.
+"/
+"/ srchST := [:aSelector :aMethod |
+"/ (lcSelector match:aSelector asLowercase) ifTrue:[
+"/ list add:aMethod
+"/ ]
+"/ ].
+"/ srchJava := [:aSelector :aMethod |
+"/ (aSelector match:aMethod name asLowercase) ifTrue:[
+"/ list add:aMethod
+"/ ]
+"/ ].
+"/ ] ifFalse:[
+"/ srchST := [:aSelector :aMethod |
+"/ (aSelectorString match:aSelector) ifTrue:[
+"/ list add:aMethod
+"/ ]
+"/ ].
+"/ srchJava := [:aSelector :aMethod |
+"/ (aSelectorString match:aMethod name) ifTrue:[
+"/ list add:aMethod
+"/ ]
+"/ ].
+"/ ].
+"/ ] ifFalse:[
sel := aSelectorString asSymbolIfInterned.
sel isNil ifTrue:[
@@ -2974,7 +3219,7 @@
]
].
].
- ].
+"/ ].
aCollectionOfClasses do:[:aClass |
|srchBlock|
@@ -3907,6 +4152,6 @@
!SystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.154 2002-06-05 08:56:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.155 2002-06-19 12:20:14 cg Exp $'
! !
SystemBrowser initialize!