SystemBrowser.st
author Claus Gittinger <cg@exept.de>
Mon, 15 Jul 2019 18:53:35 +0200
changeset 18903 b0d007a5e683
parent 18900 8568425e77d1
child 18982 b122ce4e6e60
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     1
"
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
     3
              All Rights Reserved
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     4
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    10
 hereby transferred.
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    11
"
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
    12
"{ Package: 'stx:libtool' }"
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
    13
15206
988be4fe570b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15075
diff changeset
    14
"{ NameSpace: Smalltalk }"
988be4fe570b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15075
diff changeset
    15
85
d9713a3ca092 *** empty log message ***
claus
parents: 77
diff changeset
    16
ApplicationModel subclass:#SystemBrowser
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    17
	instanceVariableNames:''
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    18
	classVariableNames:'CheckForInstancesWhenRemovingClasses ClassHistory
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    19
		EmphasisForDifferentPackage EmphasisForModifiedBuffer
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    20
		EmphasisForObsoleteCode EmphasisForReadVariable
11271
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
    21
		EmphasisForWrittenVariable EmphasisForChangedCode
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
    22
		LastSearchPatterns LastClassSearchBoxShowedFullName'
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    23
	poolDictionaries:''
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    24
	category:'Interface-Browsers'
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    25
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    26
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
    27
Object subclass:#BrowserHistoryEntry
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    28
	instanceVariableNames:'className meta selector'
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    29
	classVariableNames:''
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    30
	poolDictionaries:''
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
    31
	privateIn:SystemBrowser
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
    32
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
    33
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
    34
!SystemBrowser class methodsFor:'documentation'!
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    35
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    36
copyright
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    37
"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    38
 COPYRIGHT (c) 1989 by Claus Gittinger
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
    39
              All Rights Reserved
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    40
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    41
 This software is furnished under a license and may be used
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    42
 only in accordance with the terms of that license and with the
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    44
 be provided or otherwise made available to, or used by, any
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    45
 other person.  No title to or ownership of the software is
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    46
 hereby transferred.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    47
"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    48
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    49
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    50
documentation
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    51
"
8893
27e01498c25b changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 8877
diff changeset
    52
    Notice: SystemBrowser has been completely rewritten to be an instance
16016
5a9f302b05df #FEATURE
Claus Gittinger <cg@exept.de>
parents: 15976
diff changeset
    53
    of ApplicationModel. This rewritten version is found under Tools::NewSystemBrowser.
8893
27e01498c25b changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 8877
diff changeset
    54
    Because the class protocol here was used by many others, it is left here
27e01498c25b changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 8877
diff changeset
    55
    as an instance-less functionality provider only.
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    56
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    57
    written winter 89 by claus.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    58
508
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 504
diff changeset
    59
    [author:]
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 504
diff changeset
    60
        Claus Gittinger
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 504
diff changeset
    61
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    62
"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    63
! !
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
    64
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
    65
!SystemBrowser class methodsFor:'initialization'!
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    66
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    67
initialize
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    68
    "Browser configuration;
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    69
     (values can be changed from your private startup file)"
45
950b84ba89e6 *** empty log message ***
claus
parents: 41
diff changeset
    70
254
8258536e5bcf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 215
diff changeset
    71
"/    self classResources.
85
d9713a3ca092 *** empty log message ***
claus
parents: 77
diff changeset
    72
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    73
    "
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    74
     setting this to false, the removeClass function will remove
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    75
     classes WITHOUT checking for instances. Otherwise,
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    76
     it will check and let you confirm in case there are instances.
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    77
     Checking for instances may be a bit time consuming, though.
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    78
     The default is true - therefore, it will check
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    79
    "
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    80
    CheckForInstancesWhenRemovingClasses := true
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    81
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    82
    "
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    83
     CheckForInstancesWhenRemovingClasses := true
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    84
     CheckForInstancesWhenRemovingClasses := false
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    85
85
d9713a3ca092 *** empty log message ***
claus
parents: 77
diff changeset
    86
     SystemBrowser initialize
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    87
    "
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    88
! !
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
    89
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
    90
!SystemBrowser class methodsFor:'instance creation'!
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
    91
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    92
open
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    93
    "launch a standard browser"
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
    94
2631
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
    95
    self == SystemBrowser ifFalse:[
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
    96
        ^ super open
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
    97
    ].
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
    98
105
claus
parents: 100
diff changeset
    99
    ^ self openOnDevice:(Screen current) 
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
   100
93
claus
parents: 90
diff changeset
   101
    "
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   102
     SystemBrowser default open
93
claus
parents: 90
diff changeset
   103
     SystemBrowser open
claus
parents: 90
diff changeset
   104
    "
194
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   105
!
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   106
523
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   107
openInClass:aClass
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   108
    "launch a standard browser which immediately switches
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   109
     to aClass"
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   110
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   111
    ^ self openInClass:aClass selector:nil
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   112
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   113
    "
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   114
     SystemBrowser default openInClass:Object
523
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   115
     SystemBrowser openInClass:Object
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   116
    "
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   117
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   118
    "Created: 30.4.1996 / 14:43:45 / cg"
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   119
!
db2c1ad12524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 508
diff changeset
   120
194
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   121
openInClass:aClass selector:aSelector
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   122
    "launch a standard browser which immediately switches
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
   123
     to aClass » aSelector. Returns the browser"
194
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   124
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3621
diff changeset
   125
    |brwsr classesName|
194
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   126
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   127
    brwsr := self openOnDevice:(Screen current).
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   128
    brwsr waitUntilVisible.
1561
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   129
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   130
    aClass notNil ifTrue:[
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   131
"/        cls := aClass.
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   132
"/        cls isMeta ifTrue:[
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   133
"/            cls := aClass soleInstance
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   134
"/        ].
1561
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   135
        aClass isMeta ifTrue:[
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   136
            brwsr instanceProtocol:false
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   137
        ].
1931
03de5c5f4402 care for javaClass in #openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   138
        aClass isJavaClass ifTrue:[
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   139
            classesName := aClass fullName. 
1931
03de5c5f4402 care for javaClass in #openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   140
        ] ifFalse:[
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   141
            classesName := aClass name. 
1931
03de5c5f4402 care for javaClass in #openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   142
        ].
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   143
        brwsr switchToClassNamed:classesName.
1681
b209bdfbf762 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1620
diff changeset
   144
        brwsr classSelectionChanged.
1561
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   145
        aSelector notNil ifTrue:[
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   146
            brwsr switchToMethodNamed:aSelector.
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   147
        ]
194
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   148
    ].
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   149
    ^ brwsr
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   150
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   151
    "
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   152
     SystemBrowser openInClass:Object selector:#at:put:
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   153
     SystemBrowser openInClass:Object selector:nil
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   154
     SystemBrowser openInClass:nil selector:nil
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   155
    "
93155825c7a0 added openInClass:selector:
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   156
1561
102b90f99e58 avoid double-redraw
Claus Gittinger <cg@exept.de>
parents: 1367
diff changeset
   157
    "Created: / 22.11.1995 / 21:04:50 / cg"
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
   158
    "Modified: / 5.11.2001 / 16:51:02 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   159
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   160
3588
3a8e5e30a92a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
   161
openOn:anEnvironment
18614
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   162
    "open on a namespace"
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   163
    
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   164
    ^ self
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   165
        openOn:anEnvironment
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   166
        label:(self classResources string:'System Browser')
3588
3a8e5e30a92a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
   167
3a8e5e30a92a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
   168
    "
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   169
     SystemBrowser default openOn:Smalltalk
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   170
     SystemBrowser default openOn:Demos
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   171
3588
3a8e5e30a92a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
   172
     SystemBrowser openOn:Smalltalk
3589
f38e59e3ab76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3588
diff changeset
   173
     SystemBrowser openOn:Demos
3588
3a8e5e30a92a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
   174
    "
18614
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   175
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   176
    "Modified: / 22-02-2019 / 10:14:45 / Claus Gittinger"
3588
3a8e5e30a92a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
   177
!
3a8e5e30a92a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3573
diff changeset
   178
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   179
openOn:aClassEnvironment label:title
18614
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   180
    "open on a namespace"
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   181
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   182
    ^ self
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   183
        openOn:aClassEnvironment 
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   184
        label:title 
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   185
        onDevice:(Screen current)
18614
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   186
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   187
    "Modified (comment): / 22-02-2019 / 10:14:37 / Claus Gittinger"
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   188
!
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   189
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   190
openOn:aClassEnvironment label:title onDevice:aDisplayDevice
18614
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   191
    "open on a nameSpace"
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   192
    
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   193
    |browser|
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   194
18614
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   195
    "/ to avoid errors when accessing the namespace...
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   196
    aClassEnvironment isNameSpace ifFalse:[
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   197
        ^ self openInClass:aClassEnvironment
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   198
    ].    
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   199
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   200
    browser := self 
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   201
                newWithLabel:title
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   202
                setupBlock:[:browser | browser environment:aClassEnvironment.
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   203
                                       browser setupForAll]
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   204
                onDevice:aDisplayDevice.
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   205
    ^ browser
18614
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   206
260f4b5b37ac *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 18411
diff changeset
   207
    "Modified (format): / 22-02-2019 / 10:15:20 / Claus Gittinger"
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   208
!
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   209
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   210
openOnDevice:aDisplay
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   211
    "launch a standard browser on another display."
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   212
2631
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
   213
    self == SystemBrowser ifFalse:[
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
   214
        ^ super openOnDevice:aDisplay
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
   215
    ].
bd18074649ed *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2623
diff changeset
   216
3519
0fef57de776a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3476
diff changeset
   217
    ^ self 
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   218
        openOn:Smalltalk
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   219
        label:(self classResources string:'System Browser')
3519
0fef57de776a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3476
diff changeset
   220
        onDevice:aDisplay
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   221
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   222
    "|d|
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   223
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   224
     d := XWorkstation new initializeFor:'porty:0'.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   225
     d startDispatch.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   226
     SystemBrowser openOnDevice:d
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
   227
    "
2818
27ff722f6c45 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
   228
!
27ff722f6c45 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
   229
3573
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   230
openOnRemoteImageOnHost:aHostName port:portOrNil
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   231
    |environment|
3573
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   232
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   233
    environment := RemoteImage onHost:aHostName port:portOrNil.
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   234
    ^ self
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   235
        openOn:environment 
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   236
        label:(self classResources string:'RemoteImage Browser - %1' with:aHostName)
3573
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   237
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   238
    "
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   239
     SystemBrowser openOnRemoteImageOnHost:'funkfix' port:nil
7998
0c63e8647d1f comment
Claus Gittinger <cg@exept.de>
parents: 7992
diff changeset
   240
     SystemBrowser openOnRemoteImageOnHost:'192.168.8.1' port:nil
3573
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   241
    "
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   242
!
cc8a6cf4520a + openOnRemoteImage
Claus Gittinger <cg@exept.de>
parents: 3549
diff changeset
   243
2818
27ff722f6c45 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
   244
openOnSnapShotImage:anImageFileName
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   245
    |environment|
2818
27ff722f6c45 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
   246
27ff722f6c45 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
   247
    environment := SnapShotImage for:anImageFileName.
4921
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   248
    ^ self
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   249
        openOn:environment 
cd47f919e8f9 openOn: protocols
Claus Gittinger <cg@exept.de>
parents: 4909
diff changeset
   250
        label:(self classResources string:'Image Browser - %1' with:anImageFileName asFilename baseName)
2818
27ff722f6c45 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
   251
27ff722f6c45 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2813
diff changeset
   252
    "
2822
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
   253
     SystemBrowser openOnSnapShotImage:('/tmp/stmeas.img')
2824
85795055a3bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2822
diff changeset
   254
    "
85795055a3bf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2822
diff changeset
   255
! !
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
   256
4909
e6b77dc6942e category
Claus Gittinger <cg@exept.de>
parents: 4860
diff changeset
   257
!SystemBrowser class methodsFor:'Compatibility-ST80'!
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
   258
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
   259
newOnClass:aClass
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
   260
    ^ self browseClass:aClass
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
   261
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
   262
    "Created: / 27.10.1997 / 20:10:39 / cg"
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
   263
! !
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
   264
4909
e6b77dc6942e category
Claus Gittinger <cg@exept.de>
parents: 4860
diff changeset
   265
!SystemBrowser class methodsFor:'accessing-history'!
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   266
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   267
addToHistory:aClass selector:aSelectorOrNil
3679
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   268
    |newEntry oldEntry classHistory|
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   269
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   270
    (newEntry := self historyEntryForClass:aClass selector:aSelectorOrNil) isNil ifTrue:[^ self].
3679
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   271
    classHistory := self classHistory.
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   272
10173
ed7cc5e574cb comment/format in: #addToHistory:selector:
Claus Gittinger <cg@exept.de>
parents: 10048
diff changeset
   273
    oldEntry := classHistory detect:[:entry | (entry className = newEntry className) 
ed7cc5e574cb comment/format in: #addToHistory:selector:
Claus Gittinger <cg@exept.de>
parents: 10048
diff changeset
   274
                                              "and:[entry selector = newEntry selector]"] ifNone:nil.
3679
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   275
    oldEntry notNil ifTrue:[
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   276
        classHistory removeIdentical:oldEntry.
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   277
    ].
3679
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   278
    classHistory addFirst:newEntry.
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   279
    classHistory size > self visitedHistoryMaxSize ifTrue:[
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   280
        classHistory removeLast
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   281
    ].
7524
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   282
    SystemBrowser changed:#visitedClassHistory with:classHistory.
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   283
10173
ed7cc5e574cb comment/format in: #addToHistory:selector:
Claus Gittinger <cg@exept.de>
parents: 10048
diff changeset
   284
    "Modified: / 05-07-2011 / 16:49:57 / cg"
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   285
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   286
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   287
checkClassHistory
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   288
    "checks the class history for non-existing classes"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   289
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   290
    "/ reverse, since we might modify while enumerating
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   291
    self classHistory reverseDo:[:histEntry|
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   292
        (Smalltalk at: (histEntry className) asSymbol) isBehavior
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   293
        ifFalse:[
10346
560fea0fd857 changed: #checkClassHistory
Claus Gittinger <cg@exept.de>
parents: 10327
diff changeset
   294
            self classHistory removeIdentical: histEntry
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   295
        ]
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   296
    ]
10346
560fea0fd857 changed: #checkClassHistory
Claus Gittinger <cg@exept.de>
parents: 10327
diff changeset
   297
560fea0fd857 changed: #checkClassHistory
Claus Gittinger <cg@exept.de>
parents: 10327
diff changeset
   298
    "Modified: / 20-07-2011 / 11:59:22 / cg"
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   299
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   300
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   301
classHistory
3679
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   302
    ClassHistory isNil ifTrue:[
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   303
        ClassHistory := List new
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   304
    ].
102d85a9efbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3675
diff changeset
   305
    ^ ClassHistory 
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   306
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   307
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   308
classHistory:newCollection
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   309
    ClassHistory := newCollection
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   310
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   311
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   312
emptyClassHistory
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   313
    "removes all class history entries"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   314
7524
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   315
    |classHistory|
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   316
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   317
    classHistory := self classHistory.
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   318
    classHistory removeAll.
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   319
    SystemBrowser changed:#visitedClassHistory with:classHistory.
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   320
0257265ae6b7 do not make dependent on the history-list;
Claus Gittinger <cg@exept.de>
parents: 7395
diff changeset
   321
    "Modified: / 20-11-2006 / 12:29:42 / cg"
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   322
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   323
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   324
historyEntryForClass:aClass selector:aSelectorOrNil
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   325
    |newEntry meta cls|
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   326
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   327
    aClass isBehavior ifFalse:[^ nil].
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   328
3151
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
   329
    (meta := aClass isMeta) ifTrue:[
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   330
        cls := aClass theNonMetaclass.
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   331
    ] ifFalse:[
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   332
        cls := aClass
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   333
    ].
3151
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
   334
    newEntry := BrowserHistoryEntry new.
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
   335
    newEntry 
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
   336
        className:cls name
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
   337
        meta:meta
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
   338
        selector:aSelectorOrNil.
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   339
    ^ newEntry
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   340
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   341
    "Modified: / 24.2.2000 / 18:03:52 / cg"
9189
9f57319e21ca added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents: 9157
diff changeset
   342
!
9f57319e21ca added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents: 9157
diff changeset
   343
11271
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   344
lastSearchPatterns
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   345
    ^ LastSearchPatterns
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   346
!
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   347
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   348
rememberSearchPattern:aString
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   349
    LastSearchPatterns isNil ifTrue:[
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   350
        LastSearchPatterns := OrderedCollection new.
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   351
    ].
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   352
    (LastSearchPatterns includes:aString) ifTrue:[
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   353
        LastSearchPatterns remove:aString.
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   354
    ] ifFalse:[
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   355
        LastSearchPatterns size > 20 ifTrue:[
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   356
            LastSearchPatterns removeFirst
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   357
        ]
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   358
    ].
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   359
    LastSearchPatterns addFirst:aString.
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   360
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   361
    "Modified: / 24-11-2010 / 12:51:31 / cg"
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   362
    "Created: / 14-02-2012 / 14:00:24 / cg"
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   363
!
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
   364
9189
9f57319e21ca added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents: 9157
diff changeset
   365
visitedClassNamesHistory
9f57319e21ca added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents: 9157
diff changeset
   366
    ^ self classHistory
9f57319e21ca added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents: 9157
diff changeset
   367
        collect:[:e | e className]
9f57319e21ca added: #visitedClassNamesHistory
Claus Gittinger <cg@exept.de>
parents: 9157
diff changeset
   368
        thenSelect:[:nm | nm notEmptyOrNil]
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
   369
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
   370
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
   371
     Tools::NewSystemBrowser visitedClassNamesHistory
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
   372
    "
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   373
! !
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   374
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   375
!SystemBrowser class methodsFor:'defaults'!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   376
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   377
classHistoryMaxLevels
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   378
    ^ 3
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   379
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   380
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   381
classHistoryMaxSize
12954
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   382
    "returns maximum size of the visited class history"
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   383
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   384
    Screen current height < 768 ifTrue:[
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   385
        ^ 15
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   386
    ].
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   387
    ^ 20 "/ 15
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   388
bb8d0ae1c21d class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12866
diff changeset
   389
    "Modified: / 10.2.2000 / 14:07:07 / cg"
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   390
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   391
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   392
default
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   393
    "convenient getter for the user's preference.
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   394
     Returns his choice of browser class"
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   395
15940
3562f909a860 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 15831
diff changeset
   396
    ^ UserPreferences systemBrowserClass
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   397
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   398
    "   
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   399
     SystemBrowser default open
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   400
    "
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   401
!
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
   402
16847
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
   403
largeLabelFont
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
   404
    ^ Label defaultFont scaled:1.2.
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
   405
!
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
   406
3549
056bd76b5b0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3519
diff changeset
   407
methodTemplate
8877
bb432153d321 changed: #methodTemplate
Claus Gittinger <cg@exept.de>
parents: 8862
diff changeset
   408
    "return a method definition template string or nil"
bb432153d321 changed: #methodTemplate
Claus Gittinger <cg@exept.de>
parents: 8862
diff changeset
   409
bb432153d321 changed: #methodTemplate
Claus Gittinger <cg@exept.de>
parents: 8862
diff changeset
   410
    ^ SmalltalkLanguage instance methodTemplate
3549
056bd76b5b0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3519
diff changeset
   411
!
056bd76b5b0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3519
diff changeset
   412
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   413
visitedHistoryMaxSize
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   414
    "the maximum number of remembered visited-class-history entries"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   415
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   416
    ^ 15
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   417
! !
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
   418
4909
e6b77dc6942e category
Claus Gittinger <cg@exept.de>
parents: 4860
diff changeset
   419
!SystemBrowser class methodsFor:'defaults-presentation'!
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   420
3352
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   421
emphasisForChangedCode
4499
395d7282b2f0 emphasis stuff
Claus Gittinger <cg@exept.de>
parents: 4490
diff changeset
   422
    ^ UserPreferences current emphasisForChangedCode.
3352
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   423
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   424
    "
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   425
     EmphasisForChangedCode := #underwave
4112
ed7af6707ad7 emphasisForChangedCode
tm
parents: 3834
diff changeset
   426
     EmphasisForChangedCode := #color->Color blue
3352
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   427
     EmphasisForChangedCode := #color->Color red lightened lightened lightened
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   428
    "
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   429
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   430
    "Created: / 31.10.2001 / 10:15:33 / cg"
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   431
!
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   432
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   433
emphasisForChangedCode:anEmphasis
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   434
    EmphasisForChangedCode := anEmphasis
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   435
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   436
    "
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   437
     self emphasisForChangedCode:#underwave
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   438
     self emphasisForChangedCode:(#color->Color red lightened lightened lightened)
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   439
    "
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   440
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   441
    "Created: / 31.10.2001 / 10:15:44 / cg"
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   442
!
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   443
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   444
emphasisForDifferentPackage
4499
395d7282b2f0 emphasis stuff
Claus Gittinger <cg@exept.de>
parents: 4490
diff changeset
   445
    ^ UserPreferences current emphasisForDifferentPackage.
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   446
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   447
    "
3352
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   448
     EmphasisForDifferentPackage := nil.
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   449
     EmphasisForDifferentPackage := #underwave
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   450
     EmphasisForDifferentPackage := #color->Color red lightened lightened lightened
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   451
    "
3352
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   452
fd047f6a8c9f +empForChangedCode
Claus Gittinger <cg@exept.de>
parents: 3314
diff changeset
   453
    "Modified: / 31.10.2001 / 10:47:25 / cg"
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   454
!
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   455
3241
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   456
emphasisForDifferentPackage:anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   457
    EmphasisForDifferentPackage := anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   458
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   459
    "
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   460
     self emphasisForDifferentPackage:#underwave
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   461
     self emphasisForDifferentPackage:(#color->Color red lightened lightened lightened)
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   462
    "
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   463
!
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   464
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   465
emphasisForModifiedBuffer
4499
395d7282b2f0 emphasis stuff
Claus Gittinger <cg@exept.de>
parents: 4490
diff changeset
   466
    ^ UserPreferences current emphasisForModifiedBuffer.
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   467
!
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   468
3241
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   469
emphasisForModifiedBuffer:anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   470
    EmphasisForModifiedBuffer := anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   471
!
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   472
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   473
emphasisForObsoleteCode
4499
395d7282b2f0 emphasis stuff
Claus Gittinger <cg@exept.de>
parents: 4490
diff changeset
   474
    ^ UserPreferences current emphasisForObsoleteCode.
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   475
!
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   476
3241
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   477
emphasisForObsoleteCode:anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   478
    EmphasisForObsoleteCode := anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   479
!
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   480
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   481
emphasisForReadVariable
4499
395d7282b2f0 emphasis stuff
Claus Gittinger <cg@exept.de>
parents: 4490
diff changeset
   482
    ^ UserPreferences current emphasisForReadVariable.
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   483
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   484
    "
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   485
     EmphasisForReadVariable := #underline
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   486
     EmphasisForReadVariable := Array with:#underline with:#underlineColor->Color yellow
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   487
    "
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   488
!
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   489
3241
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   490
emphasisForReadVariable:anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   491
    EmphasisForReadVariable := anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   492
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   493
    "
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   494
     self emphasisForReadVariable:#underline
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   495
     self emphasisForReadVariable:(Array with:#underline with:#underlineColor->Color yellow)
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   496
    "
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   497
!
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   498
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   499
emphasisForWrittenVariable
4499
395d7282b2f0 emphasis stuff
Claus Gittinger <cg@exept.de>
parents: 4490
diff changeset
   500
    ^ UserPreferences current emphasisForWrittenVariable.
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   501
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   502
    "
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   503
     EmphasisForWrittenVariable := #underline
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   504
     EmphasisForWrittenVariable := Array with:#underline with:#underlineColor->Color red lightened
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   505
    "
3241
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   506
!
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   507
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   508
emphasisForWrittenVariable:anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   509
    EmphasisForWrittenVariable := anEmphasis
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   510
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   511
    "
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   512
     self emphasisForWrittenVariable:#underline
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   513
     self emphasisForWrittenVariable:(Array with:#underline with:#underlineColor->Color red lightened)
caf04eb8c500 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3240
diff changeset
   514
    "
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   515
!
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   516
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   517
iconForClass:aClass
14103
288c15c69753 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13947
diff changeset
   518
    "ask the class for its browser symbol; 
288c15c69753 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13947
diff changeset
   519
     that's a key/selector in the ToolbarIconLibrary"
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   520
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   521
    aClass withAllSuperclassesDo:[:eachCls |
15540
49f2e8662059 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15513
diff changeset
   522
        |icon iconSymbol |
49f2e8662059 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15513
diff changeset
   523
15565
e6512d88f1ab class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15540
diff changeset
   524
        icon := [ eachCls toolListIcon ] on:Error do:[].
15540
49f2e8662059 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15513
diff changeset
   525
        icon notNil ifTrue:[^ icon ].
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   526
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   527
        iconSymbol := eachCls iconInBrowserSymbol.
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   528
        iconSymbol notNil ifTrue:[
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   529
            ^ ToolbarIconLibrary perform:iconSymbol
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   530
        ].
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   531
    ].
15944
a70fb091c054 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15940
diff changeset
   532
    (aClass isUtilityClass) ifTrue:[
a70fb091c054 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15940
diff changeset
   533
        ^ ToolbarIconLibrary utilityClassIcon
a70fb091c054 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15940
diff changeset
   534
    ].
a70fb091c054 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15940
diff changeset
   535
    (aClass isAbstract) ifTrue:[
a70fb091c054 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15940
diff changeset
   536
        ^ ToolbarIconLibrary abstractClassIcon
a70fb091c054 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15940
diff changeset
   537
    ].
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   538
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   539
    ^ nil
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   540
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   541
    "Created: / 17-08-2006 / 09:11:27 / cg"
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   542
    "Modified: / 20-07-2007 / 09:01:43 / cg"
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   543
!
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   544
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   545
resourceIconForMethod:aMethod
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   546
    |resources|
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   547
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   548
    (resources := aMethod resources) isNil ifTrue:[^ nil].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   549
18302
f26de4356e72 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18294
diff changeset
   550
    (resources includesKey:#todo) ifTrue:[
f26de4356e72 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18294
diff changeset
   551
        ^ ToolbarIconLibrary underConstructionIcon11x11
f26de4356e72 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18294
diff changeset
   552
    ].
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   553
    (resources includesKey:#obsolete) ifTrue:[
18411
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
   554
        ^ self obsoleteMethodIcon
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
   555
    ].
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
   556
    (resources includesKey:#deprecated) ifTrue:[
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   557
        ^ self deprecatedMethodIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   558
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   559
    (resources includesKey:#canvas) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   560
        ^ self canvasIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   561
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   562
    (resources includesKey:#menu) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   563
        ^ self menuIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   564
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   565
    (resources includesKey:#image) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   566
        ^ self imageIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   567
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   568
    (resources includesKey:#fileImage) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   569
        ^ self fileImageIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   570
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   571
    (resources includesKey:#programImage) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   572
        ^ self programImageIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   573
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   574
    (resources includesKey:#help) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   575
        ^ self helpIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   576
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   577
    (resources includesKey:#programMenu) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   578
        ^ self programMenuIcon
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   579
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   580
    (resources includesKey:#tableColumns) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   581
        ^ self tableColumnsIcon 
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   582
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   583
    (resources includesKey:#tabList) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   584
        ^ self tabListIcon 
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   585
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   586
    (resources includesKey:#hierarchicalList) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   587
        ^ self hierarchicalListIcon 
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   588
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   589
    (resources includesKey:#programImage) ifTrue:[
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   590
        ^ self programImageIcon 
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   591
    ].
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   592
    ^ nil
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   593
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
   594
    "Created: / 17-08-2006 / 09:08:11 / cg"
18411
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
   595
    "Modified: / 21-09-2018 / 15:34:34 / Claus Gittinger"
3240
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   596
! !
34f017469465 allow for some colors to be parametrized (Timos red-green blindness)
Claus Gittinger <cg@exept.de>
parents: 3221
diff changeset
   597
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   598
!SystemBrowser class methodsFor:'dialogs'!
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   599
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   600
askForClassNameMatching:matchStringArg inEnvironment:anEnvironmentOrClassOrNil for:aBrowserOrNil
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   601
    "open a dialog to ask for a class name.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   602
     env is either a nameSpace or a class (to ask for a private class)"
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   603
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   604
    |classNames caselessMatchingNames
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   605
     substringMatchingNames caselessSubstringMatchingNames
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   606
     caselessWithoutPrefixSubstringMatchingNames
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   607
     lcMatchString subMatch lcSubMatch box className
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   608
     needSearch cls env searchBlock searchBlock2
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   609
     idx pref aMatchString allNames sortedBySpellingDistance msg resources|
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   610
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   611
    resources := self classResources.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   612
    env := anEnvironmentOrClassOrNil ? Smalltalk.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   613
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   614
    aMatchString := matchStringArg.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   615
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   616
    "/ try to limit search to a namespace (but only if nameSpace is not a matchCharacter)
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   617
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   618
    (aMatchString includesString:'::') ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   619
        "/ pref := aMatchString upTo:$:.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   620
        idx := aMatchString lastIndexOf:$:.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   621
        pref := aMatchString copyTo:idx-2.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   622
        pref includesMatchCharacters ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   623
            "/ search all in Smalltalk
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   624
        ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   625
            cls := Smalltalk at:pref asSymbol ifAbsent:nil.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   626
            (cls notNil and:[cls isBehavior]) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   627
                env := cls.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   628
                aMatchString := aMatchString copyFrom:pref size + 1 + 2.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   629
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   630
        ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   631
    ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   632
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   633
    classNames := Set new.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   634
    caselessMatchingNames := Set new.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   635
    substringMatchingNames := Set new.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   636
    caselessSubstringMatchingNames := Set new.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   637
    caselessWithoutPrefixSubstringMatchingNames := Set new.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   638
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   639
    lcMatchString := aMatchString asLowercase.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   640
    needSearch := true.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   641
    aMatchString includesMatchCharacters ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   642
        subMatch := '*' , aMatchString , '*'.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   643
        lcSubMatch := subMatch asLowercase.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   644
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   645
        "/ if the name is already a good one, avoid the expensive search
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   646
        className := aMatchString asSymbolIfInterned.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   647
        className notNil ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   648
            env isNameSpace ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   649
                cls := env at:className ifAbsent:nil.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   650
            ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   651
                cls := env privateClassesAt:className.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   652
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   653
            (cls notNil and:[cls isBehavior]) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   654
                needSearch := false.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   655
            ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   656
        ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   657
    ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   658
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   659
    needSearch ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   660
        searchBlock := [:aClass |
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   661
            |thisName|
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   662
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   663
            "/ use dotted names for java
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   664
            aClass isJavaClass ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   665
                thisName := aClass displayString. "/ fullName copyReplaceAll:$/ with:$.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   666
            ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   667
                thisName := aClass name
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   668
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   669
            (lcMatchString match:aClass name asLowercase) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   670
                caselessWithoutPrefixSubstringMatchingNames add:thisName
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   671
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   672
            aClass nameWithoutPrefix ~= aClass name ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   673
                (lcMatchString match:aClass nameWithoutPrefix asLowercase) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   674
                    caselessWithoutPrefixSubstringMatchingNames add:thisName
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   675
                ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   676
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   677
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   678
            (aMatchString match:thisName) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   679
                classNames add:thisName
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   680
            ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   681
                (lcMatchString match:thisName asLowercase) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   682
                    caselessMatchingNames add:thisName
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   683
                ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   684
                    subMatch notNil ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   685
                        (subMatch match:thisName) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   686
                            substringMatchingNames add:thisName
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   687
                        ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   688
                            (lcSubMatch match:thisName asLowercase) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   689
                                caselessSubstringMatchingNames add:thisName
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   690
                            ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   691
                        ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   692
                    ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   693
                ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   694
            ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   695
        ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   696
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   697
        (env == Smalltalk or:[env isNameSpace]) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   698
            env allClassesDo:searchBlock
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   699
        ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   700
            env allPrivateClasses do:searchBlock
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   701
        ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   703
        sortedBySpellingDistance := false.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   704
        "/ if nothing matched - try caseless matches
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   705
        classNames size == 0 ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   706
            classNames := caselessMatchingNames.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   707
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   708
            "/ if nothing matched - try substring matches
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   709
            classNames size == 0 ifTrue:[
8704
f5b8ba75a158 some code cleanup
Claus Gittinger <cg@exept.de>
parents: 8702
diff changeset
   710
                aMatchString isUppercaseFirst ifTrue:[
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   711
                    classNames := substringMatchingNames.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   712
                ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   713
                "/ if nothing matched - try caseless substring matches
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   714
                classNames size == 0 ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   715
                    classNames := caselessSubstringMatchingNames.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   716
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   717
                    "/ if nothing matched - try best fitting
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   718
                    classNames size == 0 ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   719
                        aMatchString includesMatchCharacters ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   720
                            allNames := SortedCollection sortBlock:[:a :b | a value > b value].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   721
                            searchBlock2 :=
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   722
                                [:aClass |
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   723
                                    |thisName dist|
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   724
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   725
                                    aClass isJavaClass ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   726
                                        thisName := aClass displayString. "/ fullName copyReplaceAll:$/ with:$.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   727
                                    ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   728
                                        thisName := aClass name
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   729
                                    ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   730
                                    dist := thisName asLowercase spellAgainst:lcMatchString.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   731
                                    (thisName asLowercase startsWith:lcMatchString) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   732
                                        dist := dist + (thisName size * 10).
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   733
                                    ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   734
                                    allNames add:(thisName -> dist).
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   735
                                ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   736
                            (env == Smalltalk or:[env isNameSpace]) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   737
                                env allClassesDo:searchBlock2
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   738
                            ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   739
                                env allPrivateClasses do:searchBlock2
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   740
                            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   741
                            classNames := (allNames copyTo:(allNames size min:40)) collect:[:each | each key].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   742
                            sortedBySpellingDistance := true.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   743
                        ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   744
                    ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   745
                ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   746
            ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   747
        ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   748
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   749
        (classNames size == 0) ifTrue:[^ nil].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   750
        (classNames size == 1) ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   751
            className := classNames first
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   752
        ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   753
            |browseButton|
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   754
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   755
            sortedBySpellingDistance ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   756
                classNames := classNames asArray sort.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   757
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   758
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   759
            aMatchString includesMatchCharacters ifTrue:[
18149
19451c53de36 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17967
diff changeset
   760
                msg := 'Class names matching or similar to "%1"\\Select or enter name of class to switch to:'
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   761
            ] ifFalse:[
18149
19451c53de36 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17967
diff changeset
   762
                msg := 'Class names containing or similar to "%1"\\Select or enter name of class to switch to:'
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   763
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   764
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   765
            box := self listBoxTitle:(resources string:msg with:matchStringArg) withCRs
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   766
                              okText:'OK'
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   767
                                list:classNames.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   768
            caselessWithoutPrefixSubstringMatchingNames notEmpty ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   769
                box initialText:(caselessWithoutPrefixSubstringMatchingNames first).
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   770
            ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   771
            box action:[:aString | className := aString].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   772
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   773
            browseButton := Button label:(resources string:'Browse All').
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   774
            browseButton action:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   775
                            |classes title|
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   776
18149
19451c53de36 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17967
diff changeset
   777
                            title := resources string:'Class Names Matching or Similar to "%1"' with:matchStringArg.
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   778
                            classes := classNames collect:[:nm | Smalltalk classNamed:nm].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   779
                            aBrowserOrNil isNil ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   780
                                SystemBrowser
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   781
                                    browseClasses:classes 
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   782
                                    label:title. 
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   783
                            ] ifFalse:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   784
                                aBrowserOrNil
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   785
                                    spawnClassBrowserFor:classes 
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   786
                                    label:title 
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   787
                                    in:#newBrowser 
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   788
                                    select:false.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   789
                            ].
13365
58156ff25996 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13319
diff changeset
   790
                            box hide.
58156ff25996 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13319
diff changeset
   791
                            box closeRequest
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   792
                         ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   793
            box addButton:browseButton before:box okButton.
14502
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   794
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   795
            aMatchString isLowercaseFirst ifTrue:[
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   796
                |browseImplementorsButton|
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   797
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   798
                browseImplementorsButton := Button label:(resources string:'Implementors').
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   799
                browseImplementorsButton 
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   800
                    action:[
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   801
                        aBrowserOrNil isNil ifTrue:[
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   802
                            SystemBrowser browseImplementorsMatching:aMatchString
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   803
                        ] ifFalse:[
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   804
                            aBrowserOrNil
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   805
                                spawnMethodImplementorsBrowserFor:{ aMatchString } match:true in:#newBrowser.
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   806
                        ].
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   807
                        box hide.
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   808
                        box closeRequest
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   809
                     ].
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   810
                box addButton:browseImplementorsButton before:box okButton.
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   811
            ].
a5b6646c2db1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14413
diff changeset
   812
9157
c8166dbf5a5a changed: #askForClassNameMatching:inEnvironment:for:
Claus Gittinger <cg@exept.de>
parents: 9065
diff changeset
   813
            box minExtent:300@250.
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   814
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   815
            box open.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   816
            (box accepted not or:[className isNil]) ifTrue:[ "/ cancel
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   817
                ^ nil
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   818
            ]
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   819
        ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   820
    ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   821
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   822
    className notNil ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   823
        "/ use slashed javaName for search.
14653
0ca0460ee16b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14587
diff changeset
   824
        className := className copyReplaceAll:$. with:$/ ifNone:className.
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   825
    ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   826
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   827
"/    pref notNil ifTrue:[
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   828
"/        ^ pref , '::' , className
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   829
"/    ].
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   830
    ^ className
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   831
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   832
    "Modified: / 16-10-2006 / 11:36:20 / cg"
18149
19451c53de36 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17967
diff changeset
   833
    "Modified: / 24-05-2018 / 08:49:02 / Claus Gittinger"
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   834
!
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   835
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   836
listBoxTitle:title okText:okText list:aList
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   837
    "convenient method: setup a listBox & return it"
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   838
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   839
    |box resources|
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   840
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   841
    resources := self classResources.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   842
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   843
    box := ListSelectionBox
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   844
                title:(resources string:title)
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   845
                okText:(resources string:okText)
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   846
                action:nil.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   847
    box list:aList.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   848
    ^ box
13365
58156ff25996 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13319
diff changeset
   849
58156ff25996 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13319
diff changeset
   850
    "
58156ff25996 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13319
diff changeset
   851
     (self listBoxTitle:'hello world' okText:'aaa' list:#(1 2 3 4)) open
58156ff25996 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13319
diff changeset
   852
    "
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   853
! !
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
   854
2692
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   855
!SystemBrowser class methodsFor:'image specs'!
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   856
2748
80829f5a575d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2743
diff changeset
   857
abstractMethodIcon
80829f5a575d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2743
diff changeset
   858
    <resource: #programImage>
80829f5a575d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2743
diff changeset
   859
18294
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
   860
    ^ ToolbarIconLibrary padLockGrayMiniIcon
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
   861
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
   862
    "Modified: / 28-07-2018 / 10:00:47 / Claus Gittinger"
2748
80829f5a575d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2743
diff changeset
   863
!
80829f5a575d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2743
diff changeset
   864
3813
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   865
addBreakPointIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   866
    <resource: #image>
3813
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   867
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   868
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   869
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   870
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   871
    "
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   872
     self addBreakPointIcon inspect
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   873
     ImageEditor openOnClass:self andSelector:#addBreakPointIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   874
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   875
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   876
    ^ Icon constantNamed:'SystemBrowser class addBreakPointIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   877
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   878
            (Depth1Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   879
                width:16;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   880
                height:16;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   881
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   882
                bitsPerSample:(#( 1 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   883
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   884
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   885
                            fromPackedString:'@@@@@@@@@8@C @N@@8@A@@@@@P@C @D@@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   886
                colorMapFromArray:#[ 255 0 0 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   887
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   888
                            width:16;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   889
                            height:16;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   890
                            bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   891
                                        fromPackedString:'@@@O8A?0O?!!??G?<_?1??G?<_?1??C?8G?@O8@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   892
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   893
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   894
        ]
3813
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   895
!
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   896
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   897
addBreakPointIcon2
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
   898
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
   899
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
   900
    ^ ToolbarIconLibrary addBreakPointIcon2
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
   901
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
   902
    "Modified: / 28-07-2018 / 09:36:24 / Claus Gittinger"
3813
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   903
!
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
   904
4341
7bb51f44dca7 Icon for autoloaded classes
Stefan Vogel <sv@exept.de>
parents: 4332
diff changeset
   905
autoloadedClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   906
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   907
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   908
    ^ ToolbarIconLibrary autoloadedClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   909
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   910
    "Modified: / 20-07-2007 / 09:15:37 / cg"
4341
7bb51f44dca7 Icon for autoloaded classes
Stefan Vogel <sv@exept.de>
parents: 4332
diff changeset
   911
!
7bb51f44dca7 Icon for autoloaded classes
Stefan Vogel <sv@exept.de>
parents: 4332
diff changeset
   912
12040
5f2202d6fbec class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 11964
diff changeset
   913
breakPointedIcon
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
   914
    <resource: #obsolete>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
   915
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
   916
    ^ self lineBreakPointedIcon
12504
abf0ab5f5941 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12475
diff changeset
   917
    "/ ^ self breakPointedIcon2
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
   918
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
   919
    "Modified: / 05-03-2014 / 10:26:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12504
abf0ab5f5941 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12475
diff changeset
   920
!
abf0ab5f5941 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12475
diff changeset
   921
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   922
canvasIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   923
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   924
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   925
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   926
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   927
     the ImageEditor may not be able to read the specification."
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   928
    "
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   929
     ImageEditor openOnClass:self andSelector:#canvasIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   930
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   931
    ^ Icon constantNamed:'SystemBrowser class canvasIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   932
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   933
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   934
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   935
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   936
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   937
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   938
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   939
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   940
                            fromPackedString:'@@@@@@@@@@.;.;.;.0@@@@@@@@@@C.;/C.;/@@9&XP9&XP@NY&DNY&D@C&Y!!C&Y!!@@9&XP9&XP@NY&DNY&D@C1DQC1DQ@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   941
                colorMapFromArray:#[ 0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   942
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   943
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   944
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   945
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   946
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   947
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   948
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   949
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   950
4143
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
   951
containerClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   952
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   953
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   954
    ^ ToolbarIconLibrary containerClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   955
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
   956
    "Modified: / 20-07-2007 / 09:14:54 / cg"
4143
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
   957
!
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
   958
2692
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   959
defaultIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   960
    <resource: #image>
2692
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   961
    "This resource specification was automatically generated
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   962
     by the ImageEditor of ST/X."
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   963
    "Do not manually edit this!! If it is corrupted,
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   964
     the ImageEditor may not be able to read the specification."
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   965
    "
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
   966
     self defaultIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   967
     ImageEditor openOnClass:self andSelector:#defaultIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   968
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   969
    ^ Icon constantNamed:'SystemBrowser class defaultIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   970
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   971
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   972
                width:28;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   973
                height:28;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   974
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   975
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   976
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   977
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   978
                            fromPackedString:'
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   979
@@@@@@@@@@@@@@@@@@@FY&Y&Y&X0@@@@@@@@@@YDQDQDQB@@@@@@@@@@A$QDQDQDH@@@@@@@@@@CH"H"H"H @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H@@@
3794
Claus Gittinger <cg@exept.de>
parents: 3780
diff changeset
   980
@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@A&Y&Y&Y#@@@@@F@"H"HFDQDQDQH@@@@@@@@@@@L"H"H"
Claus Gittinger <cg@exept.de>
parents: 3780
diff changeset
   981
H @@@@@ @@@@@@@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@A&Y&Y&Y#@@@@@F@"H"HFUUUUUUH@@@@@@@@@@@L"H"H"H @@@@@@
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   982
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H@@@@B@B@ @@H@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   983
@@@@@@@@@@@@@@@@@@@@@@@@H@@@@@@@@@H@@ @@@@Hb');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   984
                colorMapFromArray:#[ 0 0 0 0 255 0 127 127 127 170 170 170 255 0 0 255 255 0 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   985
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   986
                            width:28;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   987
                            height:28;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   988
                            bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   989
                                        fromPackedString:'
3794
Claus Gittinger <cg@exept.de>
parents: 3780
diff changeset
   990
??0@@O?<@@C??@@@??0@@O?<@@C??@@@@ @@@@H@@@@B@@@@@ O?8@\C?>@G??? A0O?8@HC?>@B@@@@@ O?8@\C?>@G??? A0O?8@@C?>@@@@@@9O\7\IRT
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   991
QDBD%DQ@!!OH''HHRQEABT$QPP99]7\@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   992
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   993
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
   994
        ]
2846
b332c41c3daa allCallsOn fix
Claus Gittinger <cg@exept.de>
parents: 2830
diff changeset
   995
!
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
   996
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
   997
deprecatedMethodIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
   998
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
   999
18411
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1000
    ^ ToolbarIconLibrary deprecatedMethodIcon
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1001
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1002
    "Modified: / 21-09-2018 / 15:30:48 / Claus Gittinger"
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1003
!
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1004
16893
9e4bc0a230d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16863
diff changeset
  1005
disabledBreakpointIcon
9e4bc0a230d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16863
diff changeset
  1006
    <resource: #programImage>
9e4bc0a230d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16863
diff changeset
  1007
9e4bc0a230d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16863
diff changeset
  1008
    ^ ToolbarIconLibrary breakpointDisabled9x9
9e4bc0a230d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16863
diff changeset
  1009
!
9e4bc0a230d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16863
diff changeset
  1010
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1011
doNotEnterIcon
18411
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1012
    <resource: #programImage>
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1013
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1014
    ^ ToolbarIconLibrary doNotEnterIcon
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1015
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1016
    "Modified: / 21-09-2018 / 15:29:09 / Claus Gittinger"
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1017
!
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1018
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1019
emptyIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1020
    <resource: #image>
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1021
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1022
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1023
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1024
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1025
    "
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1026
     self emptyIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1027
     ImageEditor openOnClass:self andSelector:#emptyIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1028
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1029
    ^ Icon constantNamed:'SystemBrowser class emptyIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1030
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1031
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1032
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1033
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1034
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1035
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1036
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1037
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1038
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1039
                colorMapFromArray:#[ 0 0 0 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1040
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1041
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1042
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1043
                            bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1044
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1045
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1046
        ]
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1047
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1048
    "Created: / 5.11.2001 / 09:39:54 / cg"
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1049
!
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1050
4143
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1051
errorClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1052
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1053
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1054
    ^ ToolbarIconLibrary errorClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1055
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1056
    "Modified: / 20-07-2007 / 09:14:06 / cg"
4143
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1057
!
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1058
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1059
exceptionClassIcon
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1060
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1061
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1062
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1063
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1064
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1065
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1066
    "
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1067
     self exceptionClassIcon inspect
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1068
     ImageEditor openOnClass:self andSelector:#exceptionClassIcon
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1069
     Icon flushCachedIcons
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1070
    "
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1071
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1072
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1073
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1074
    ^ ToolbarIconLibrary exceptionClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1075
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1076
    "Modified: / 20-07-2007 / 09:13:18 / cg"
4143
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1077
!
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  1078
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1079
fileImageIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1080
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1081
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1082
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1083
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1084
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1085
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1086
     self fileImageIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1087
     ImageEditor openOnClass:self andSelector:#fileImageIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1088
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1089
    ^ Icon constantNamed:'SystemBrowser class fileImageIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1090
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1091
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1092
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1093
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1094
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1095
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1096
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1097
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1098
                            fromPackedString:'@@@@@@@@@@H"H"H"@@@BQBH!!D"@@@$P"HQH"@@H"H"DQH @BH"HQDRH@@"H"DQH"@@L3L3DSL0@CL3L1D3L@@3L3L3L3@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1099
                colorMapFromArray:#[ 0 0 0 51 153 153 51 255 255 255 153 0 255 255 0 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1100
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1101
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1102
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1103
                            bits:(ByteArray fromPackedString:'?<C?8O?0??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1104
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1105
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1106
        ]
2846
b332c41c3daa allCallsOn fix
Claus Gittinger <cg@exept.de>
parents: 2830
diff changeset
  1107
!
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1108
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1109
fullBreakPointedIcon
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1110
    <resource: #programImage>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1111
15305
4ba4b14f6039 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15206
diff changeset
  1112
    ^ ToolbarIconLibrary fullBreakPoint9x9Icon
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1113
    "/ ^ self fullBreakPointedIcon2
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1114
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1115
    "Created: / 05-03-2014 / 10:27:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1116
!
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1117
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1118
fullBreakPointedIcon1
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1119
    <resource: #image>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1120
    "This resource specification was automatically generated
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1121
     by the ImageEditor of ST/X."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1122
    "Do not manually edit this!! If it is corrupted,
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1123
     the ImageEditor may not be able to read the specification."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1124
    "
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1125
     self stopIcon1 inspect
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1126
     ImageEditor openOnClass:self andSelector:#stopIcon1
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1127
     Icon flushCachedIcons"
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1128
    
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1129
    ^ Icon constantNamed:'SystemBrowser stopIcon1'
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1130
        ifAbsentPut:[
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1131
            (Depth4Image new)
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1132
                width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1133
                height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1134
                photometric:(#palette);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1135
                bitsPerSample:(#[ 4 ]);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1136
                samplesPerPixel:(1);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1137
                bits:(ByteArray 
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1138
                            fromPackedString:'DQH"H!!DQDAD!!DAD!!DQ@RDP@AD!!DPHQD@@QD!!DBDQ@@DQHQ@!!DQ@QDRDZHQDQDQD!!FBDQDADQHQ@RDP@AD!!DPDRDPDRDQDADRH"HQDQ@b');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1139
                colorMapFromArray:#[ 255 255 255 255 0 0 128 0 0 ];
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1140
                mask:((ImageMask new)
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1141
                            width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1142
                            height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1143
                            bits:(ByteArray fromPackedString:'G0@? G?@?>C?8O? ?>C?8G?@O8@_@@@a');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1144
                            yourself);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1145
                yourself
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1146
        ]
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1147
!
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1148
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1149
fullBreakPointedIcon2
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1150
    <resource: #image>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1151
    "This resource specification was automatically generated
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1152
     by the ImageEditor of ST/X."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1153
    "Do not manually edit this!! If it is corrupted,
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1154
     the ImageEditor may not be able to read the specification."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1155
    "
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1156
     self stopIcon2 inspect
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1157
     ImageEditor openOnClass:self andSelector:#stopIcon2
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1158
     Icon flushCachedIcons"
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1159
    
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1160
    ^ Icon constantNamed:'SystemBrowser stopIcon2'
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1161
        ifAbsentPut:[
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1162
            (Depth4Image new)
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1163
                width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1164
                height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1165
                photometric:(#palette);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1166
                bitsPerSample:(#[ 4 ]);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1167
                samplesPerPixel:(1);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1168
                bits:(ByteArray 
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1169
                            fromPackedString:'DQH"H!!DQDAD!!DQD!!DQ@RDQDQD!!DPHQDQDQD!!DBDSL3LQHQ@!!D@@@DRDZHQL3L1D!!FBDQDQDQHQ@RDQDQD!!DPDRDQDRDQDADRH"HQDQ@b');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1170
                colorMapFromArray:#[ 255 255 255 255 0 0 128 0 0 255 163 163 ];
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1171
                mask:((ImageMask new)
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1172
                            width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1173
                            height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1174
                            bits:(ByteArray fromPackedString:'G0@? G?@?>C?8O? ?>C?8G?@O8@_@@@a');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1175
                            yourself);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1176
                yourself
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1177
        ]
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1178
!
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1179
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1180
greenCheckIcon
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1181
    "This resource specification was automatically generated
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1182
     by the ImageEditor of ST/X."
18157
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1183
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1184
    "Do not manually edit this!! If it is corrupted,
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1185
     the ImageEditor may not be able to read the specification."
18157
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1186
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1187
    "
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1188
     self greenCheckIcon inspect
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1189
     ImageEditor openOnClass:self andSelector:#greenCheckIcon
18157
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1190
     Icon flushCachedIcons
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1191
    "
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1192
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1193
    <resource: #image>
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1194
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1195
    ^Icon
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1196
        constantNamed:'SystemBrowser class greenCheckIcon'
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1197
        ifAbsentPut:[(Depth2Image width:13 height:11) bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@J@@@@FP@@@BP@@FA$@@A($@@@F)@@@@Y@@@@A@@@@@@@@@b')
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1198
            colorMapFromArray:#[0 0 0 126 190 126 0 127 0]
f8144e0ca395 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 18149
diff changeset
  1199
            mask:((ImageMask width:13 height:11) bits:(ByteArray fromPackedString:'@@@@@@C@@\@A CN@N0@_@@8@A@@@@@@a'); yourself); yourself]
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1200
!
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1201
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1202
greenLockIcon
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1203
    <resource: #programImage>
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  1204
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1205
    ^ ToolbarIconLibrary padLockGreenMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1206
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1207
    "Modified: / 05-11-2001 / 09:40:12 / cg"
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1208
    "Modified: / 28-07-2018 / 09:35:28 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1209
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1210
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1211
greenThumbUpIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1212
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1213
10327
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1214
    ^ ToolbarIconLibrary greenThumbUpIcon
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1215
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1216
    "Modified: / 17-07-2011 / 10:03:34 / cg"
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1217
    "Modified: / 28-07-2018 / 09:35:33 / Claus Gittinger"
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1218
!
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1219
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1220
greenThumbUpSmallIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1221
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1222
10327
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1223
    ^ ToolbarIconLibrary greenThumbUpSmallIcon
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1224
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1225
    "Modified: / 17-07-2011 / 10:03:43 / cg"
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1226
    "Modified: / 28-07-2018 / 09:35:35 / Claus Gittinger"
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1227
!
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1228
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1229
greyCheckIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1230
    <resource: #image>
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1231
    "This resource specification was automatically generated
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1232
     by the ImageEditor of ST/X."
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1233
    "Do not manually edit this!! If it is corrupted,
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1234
     the ImageEditor may not be able to read the specification."
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1235
    "
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1236
     self greyCheckIcon inspect
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1237
     ImageEditor openOnClass:self andSelector:#greyCheckIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1238
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1239
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1240
    ^ Icon constantNamed:'SystemBrowser class greyCheckIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1241
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1242
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1243
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1244
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1245
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1246
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1247
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1248
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1249
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@H @@@@@@@"@@@@@@@@H@@@@@@ @"@@@@@@H H@@@@@@@H"@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1250
                colorMapFromArray:#[ 0 0 0 255 255 255 127 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1251
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1252
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1253
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1254
                            bits:(ByteArray fromPackedString:'@@@@@@C@@X@A@AL@F @N@@P@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1255
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1256
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1257
        ]
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1258
!
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1259
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1260
greyThumbUpIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1261
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1262
10327
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1263
    ^ ToolbarIconLibrary greyThumbUpIcon
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1264
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1265
    "Modified: / 17-07-2011 / 10:04:06 / cg"
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1266
    "Modified: / 28-07-2018 / 09:35:40 / Claus Gittinger"
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1267
!
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1268
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1269
helpIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1270
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1271
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1272
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1273
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1274
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1275
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1276
     self helpIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1277
     ImageEditor openOnClass:self andSelector:#helpIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1278
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1279
    ^ Icon constantNamed:'SystemBrowser class helpIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1280
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1281
            (Depth1Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1282
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1283
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1284
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1285
                bitsPerSample:(#( 1 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1286
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1287
                bits:(ByteArray fromPackedString:'@@A?<G#0]7A?\G;0__A?<G72_?@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1288
                colorMapFromArray:#[ 0 0 0 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1289
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1290
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1291
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1292
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1293
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1294
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1295
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1296
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1297
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1298
hierarchicalListIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1299
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1300
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1301
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1302
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1303
     the ImageEditor may not be able to read the specification."
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1304
    "
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1305
     ImageEditor openOnClass:self andSelector:#hierarchicalListIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1306
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1307
    ^ Icon constantNamed:'SystemBrowser class hierarchicalListIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1308
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1309
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1310
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1311
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1312
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1313
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1314
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1315
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1316
                            fromPackedString:'@@@@NAUUU0@R??8@GO?>@A0@C @\??88G@@N@A3?? @^@@8@N***@@@@@C b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1317
                colorMapFromArray:#[ 0 0 0 255 255 255 127 127 127 170 170 170 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1318
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1319
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1320
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1321
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1322
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1323
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1324
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1325
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1326
5997
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1327
ignoredMethodIcon
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1328
    <resource: #programImage>
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1329
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1330
    ^ ToolbarIconLibrary padLockBlackMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1331
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1332
    "Modified: / 28-07-2018 / 09:35:17 / Claus Gittinger"
5997
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1333
!
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1334
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1335
imageIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1336
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1337
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1338
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1339
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1340
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1341
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1342
     self imageIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1343
     ImageEditor openOnClass:self andSelector:#imageIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1344
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1345
    ^ Icon constantNamed:'SystemBrowser class imageIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1346
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1347
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1348
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1349
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1350
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1351
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1352
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1353
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1354
                            fromPackedString:'@@@@@@@@@@H"H"H"H @BQBH!!D"H@@$P"HQH"@@H"H"DQH @BH"HQDRH@@"H"DQH"@@L3L3DSL0@CL3L1D3L@@3L3L3L3@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1355
                colorMapFromArray:#[ 0 0 0 51 153 153 51 255 255 255 153 0 255 255 0 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1356
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1357
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1358
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1359
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1360
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1361
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1362
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1363
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1364
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1365
instVarOverlayXmlSpec
14390
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1366
    <resource: #image>
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1367
    "This resource specification was automatically generated
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1368
     by the ImageEditor of ST/X."
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1369
    "Do not manually edit this!! If it is corrupted,
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1370
     the ImageEditor may not be able to read the specification."
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1371
    "
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1372
     self instVarOverlayXmlSpec inspect
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1373
     ImageEditor openOnClass:self andSelector:#instVarOverlayXmlSpec
14390
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1374
     Icon flushCachedIcons"
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1375
    
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1376
    ^ Icon constantNamed:'SystemBrowser class instVarOverlayXmlSpec'
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1377
        ifAbsentPut:[
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1378
            (Depth2Image new)
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1379
                width:16;
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1380
                height:16;
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1381
                photometric:(#palette);
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1382
                bitsPerSample:(#[ 2 ]);
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1383
                samplesPerPixel:(1);
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1384
                bits:(ByteArray 
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1385
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BDP@@BID@@@"Q@@@BDP@@@@@@@@@@@@@@@@@@@a');
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1386
                colorMapFromArray:#[ 0 0 0 84 84 84 170 170 170 255 255 255 ];
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1387
                mask:((ImageMask new)
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1388
                            width:16;
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1389
                            height:16;
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1390
                            bits:(ByteArray 
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1391
                                        fromPackedString:'
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1392
@@@@@@@@@@@@@@@@BA@XFC@L[>[O8<=#[7X0CA XBA@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1393
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
14390
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1394
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1395
                            yourself);
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1396
                yourself
05d5e002f60d Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents: 14355
diff changeset
  1397
        ]
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1398
!
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  1399
7992
425aa862d872 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7968
diff changeset
  1400
instrumentationIcon
425aa862d872 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7968
diff changeset
  1401
    <resource: #programImage>
425aa862d872 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7968
diff changeset
  1402
425aa862d872 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7968
diff changeset
  1403
    ^ ToolbarIconLibrary pipette16x16Icon
425aa862d872 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7968
diff changeset
  1404
!
425aa862d872 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7968
diff changeset
  1405
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1406
lineBreakPointedIcon
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1407
    <resource: #programImage>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1408
15305
4ba4b14f6039 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15206
diff changeset
  1409
    ^ ToolbarIconLibrary lineBreakPoint9x9Icon
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1410
    "/ ^ self lineBreakPointedIcon2
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1411
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1412
    "Created: / 05-03-2014 / 10:20:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1413
!
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1414
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1415
lineBreakPointedIcon1
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1416
    <resource: #image>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1417
    "This resource specification was automatically generated
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1418
     by the ImageEditor of ST/X."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1419
    "Do not manually edit this!! If it is corrupted,
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1420
     the ImageEditor may not be able to read the specification."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1421
    "
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1422
     self breakPointedIcon1 inspect
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1423
     ImageEditor openOnClass:self andSelector:#breakPointedIcon1
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1424
     Icon flushCachedIcons"
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1425
    
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1426
    ^ Icon constantNamed:'SystemBrowser breakPointedIcon1'
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1427
        ifAbsentPut:[
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1428
            (Depth4Image new)
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1429
                width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1430
                height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1431
                photometric:(#palette);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1432
                bitsPerSample:(#[ 4 ]);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1433
                samplesPerPixel:(1);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1434
                bits:(ByteArray 
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1435
                            fromPackedString:'@@@@@@@@@P@@L3@@@@$@L@@@L@@H@@@C@@@@APL@DQ@C@@@C@1DS@0@B@0@QD@L@@@@@@0@@@@@@L@@@L@@@@@@3L@@@@ @@@@@@@@ b');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1436
                colorMapFromArray:#[ 255 0 0 255 255 255 0 0 0 255 199 199 ];
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1437
                mask:((ImageMask new)
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1438
                            width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1439
                            height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1440
                            bits:(ByteArray fromPackedString:'@@@N@C>@O8A?0G?@_<@? C>@C @@@@@a');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1441
                            yourself);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1442
                yourself
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1443
        ]
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1444
!
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1445
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1446
lineBreakPointedIcon2
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1447
    <resource: #image>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1448
    "This resource specification was automatically generated
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1449
     by the ImageEditor of ST/X."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1450
    "Do not manually edit this!! If it is corrupted,
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1451
     the ImageEditor may not be able to read the specification."
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1452
    "
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1453
     self breakPointedIcon2 inspect
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1454
     ImageEditor openOnClass:self andSelector:#breakPointedIcon2
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1455
     Icon flushCachedIcons"
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1456
    
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1457
    ^ Icon constantNamed:'SystemBrowser breakPointedIcon2'
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1458
        ifAbsentPut:[
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1459
            (Depth4Image new)
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1460
                width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1461
                height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1462
                photometric:(#palette);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1463
                bitsPerSample:(#[ 4 ]);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1464
                samplesPerPixel:(1);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1465
                bits:(ByteArray 
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1466
                            fromPackedString:'DQH"H!!DQDAD!!DQD!!DQ@RDQDQD!!DPHQDQDQD!!DBDQDQDQHQ@!!DQDQDRDZHQDQDQD!!FBDQDQDQHQ@RDQDQD!!DPDRDQDRDQDADRH"HQDQ@b');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1467
                colorMapFromArray:#[ 255 255 255 255 0 0 128 0 0 ];
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1468
                mask:((ImageMask new)
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1469
                            width:13;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1470
                            height:11;
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1471
                            bits:(ByteArray fromPackedString:'G0@? G?@?>C?8O? ?>C?8G?@O8@_@@@a');
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1472
                            yourself);
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1473
                yourself
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1474
        ]
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1475
!
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  1476
16027
36719009525a #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16016
diff changeset
  1477
lineTracePointedIcon
36719009525a #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16016
diff changeset
  1478
    <resource: #programImage>
36719009525a #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16016
diff changeset
  1479
36719009525a #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16016
diff changeset
  1480
    ^ ToolbarIconLibrary lineTracePoint9x9Icon
36719009525a #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16016
diff changeset
  1481
!
36719009525a #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16016
diff changeset
  1482
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1483
medium_methodEmptyInheritedIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1484
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1485
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1486
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1487
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1488
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1489
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1490
     self medium_methodEmptyInheritedIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1491
     ImageEditor openOnClass:self andSelector:#medium_methodEmptyInheritedIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1492
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1493
    ^ Icon 
7968
1acda3f58974 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7915
diff changeset
  1494
        constantNamed:'SystemBrowser class medium_methodEmptyInheritedIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1495
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1496
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1497
                width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1498
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1499
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1500
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1501
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1502
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1503
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1504
                colorMapFromArray:#[ 0 0 0 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1505
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1506
                            width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1507
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1508
                            bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1509
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1510
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1511
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1512
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1513
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1514
medium_methodInheritedFromAboveAndRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1515
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1516
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1517
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1518
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1519
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1520
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1521
     self medium_methodInheritedFromAboveAndRedefinedBelowIcon inspect
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1522
     ImageEditor openOnClass:self andSelector:#medium_methodInheritedFromAboveAndRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1523
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1524
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1525
    ^ Icon 
7968
1acda3f58974 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7915
diff changeset
  1526
        constantNamed:'SystemBrowser class medium_methodInheritedFromAboveAndRedefinedBelowIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1527
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1528
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1529
                width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1530
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1531
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1532
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1533
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1534
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1535
                            fromPackedString:'@@@@@@@@@B()@B(@A@ @A@ @A@ (EP@HEP@@@@@@@@@@');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1536
                colorMapFromArray:#[ 0 0 0 255 255 127 255 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1537
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1538
                            width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1539
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1540
                            bits:(ByteArray fromPackedString:'@@@/ B>@K8A7@G\@]0C:@O(@> @@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1541
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1542
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1543
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1544
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1545
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1546
medium_methodInheritedFromAboveIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1547
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1548
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1549
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1550
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1551
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1552
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1553
     self medium_methodInheritedFromAboveIcon inspect
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1554
     ImageEditor openOnClass:self andSelector:#medium_methodInheritedFromAboveIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1555
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1556
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1557
    ^ Icon 
7968
1acda3f58974 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7915
diff changeset
  1558
        constantNamed:'SystemBrowser class medium_methodInheritedFromAboveIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1559
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1560
            (Depth1Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1561
                width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1562
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1563
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1564
                bitsPerSample:(#( 1 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1565
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1566
                bits:(ByteArray fromPackedString:'@@@@@@@A@@@ @B@@HA=0LG@@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1567
                colorMapFromArray:#[ 0 0 0 255 255 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1568
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1569
                            width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1570
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1571
                            bits:(ByteArray fromPackedString:'@@@ @B@@H@A0@G@@\@C8@O @>@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1572
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1573
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1574
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1575
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1576
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1577
medium_methodRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1578
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1579
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1580
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1581
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1582
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1583
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1584
     self medium_methodRedefinedBelowIcon inspect
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1585
     ImageEditor openOnClass:self andSelector:#medium_methodRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1586
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1587
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1588
    ^ Icon 
7968
1acda3f58974 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7915
diff changeset
  1589
        constantNamed:'SystemBrowser class medium_methodRedefinedBelowIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1590
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1591
            (Depth1Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1592
                width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1593
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1594
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1595
                bitsPerSample:(#( 1 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1596
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1597
                bits:(ByteArray fromPackedString:'@ED@L@\@A0@B@@H@@"8@P@@@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1598
                colorMapFromArray:#[ 0 0 0 255 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1599
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1600
                            width:9;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1601
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1602
                            bits:(ByteArray fromPackedString:'@@@O @>@C8@G@@\@A0@B@@H@@ @@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1603
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1604
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1605
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1606
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1607
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1608
menuIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1609
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1610
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1611
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1612
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1613
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1614
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1615
     self menuIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1616
     ImageEditor openOnClass:self andSelector:#menuIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1617
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1618
    ^ Icon constantNamed:'SystemBrowser class menuIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1619
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1620
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1621
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1622
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1623
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1624
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1625
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1626
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1627
                            fromPackedString:'@@@@@B***P@%UUT@@@@@@B***P@%UUT@@@@@@B***P@%UUT@@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1628
                colorMapFromArray:#[ 0 0 0 170 170 170 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1629
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1630
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1631
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1632
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8?? @@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1633
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1634
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1635
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1636
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1637
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1638
methodEmptyInheritedIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1639
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1640
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1641
    ^ self small_methodEmptyInheritedIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1642
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1643
    "Modified: / 28-07-2018 / 09:37:15 / Claus Gittinger"
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1644
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1645
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1646
methodInheritedFromAboveAndRedefinedBelowIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1647
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1648
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1649
    ^ self small_methodInheritedFromAboveAndRedefinedBelowIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1650
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1651
    "Modified: / 28-07-2018 / 09:37:18 / Claus Gittinger"
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1652
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1653
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1654
methodInheritedFromAboveIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1655
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1656
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1657
    ^ self small_methodInheritedFromAboveIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1658
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1659
    "Modified: / 28-07-2018 / 09:37:23 / Claus Gittinger"
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1660
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1661
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1662
methodIsSubclassResponsibilityAndRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1663
    <resource: #image>
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1664
    "This resource specification was automatically generated
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1665
     by the ImageEditor of ST/X."
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1666
    "Do not manually edit this!! If it is corrupted,
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1667
     the ImageEditor may not be able to read the specification."
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1668
    "
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1669
     self methodIsSubclassResponsibilityAndRedefinedBelowIcon inspect
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1670
     ImageEditor openOnClass:self andSelector:#methodIsSubclassResponsibilityAndRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1671
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1672
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1673
    ^ Icon 
7968
1acda3f58974 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7915
diff changeset
  1674
        constantNamed:'SystemBrowser class methodIsSubclassResponsibilityAndRedefinedBelowIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1675
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1676
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1677
                width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1678
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1679
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1680
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1681
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1682
                bits:(ByteArray fromPackedString:' @D@@H@@@@@B@@@@@@4UBHR@A@@"@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1683
                colorMapFromArray:#[ 0 0 0 255 127 127 127 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1684
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1685
                            width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1686
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1687
                            bits:(ByteArray fromPackedString:'<HC DO@@>O#8\G@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1688
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1689
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1690
        ]
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1691
!
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1692
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1693
methodIsSubclassResponsibilityIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1694
    <resource: #image>
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1695
    "This resource specification was automatically generated
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1696
     by the ImageEditor of ST/X."
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1697
    "Do not manually edit this!! If it is corrupted,
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1698
     the ImageEditor may not be able to read the specification."
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1699
    "
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1700
     self methodIsSubclassResponsibilityIcon inspect
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1701
     ImageEditor openOnClass:self andSelector:#methodIsSubclassResponsibilityIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1702
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1703
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1704
    ^ Icon 
7968
1acda3f58974 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7915
diff changeset
  1705
        constantNamed:'SystemBrowser class methodIsSubclassResponsibilityIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1706
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1707
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1708
                width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1709
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1710
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1711
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1712
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1713
                bits:(ByteArray fromPackedString:' @D@@H@@@@@B@@@@@ 4@B@H@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1714
                colorMapFromArray:#[ 0 0 0 255 127 127 127 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1715
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1716
                            width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1717
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1718
                            bits:(ByteArray fromPackedString:'<HC DO@@<IC0(I@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1719
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1720
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1721
        ]
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1722
!
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5546
diff changeset
  1723
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1724
methodRedefinedBelowIcon
18294
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1725
    <resource: #programImage>
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1726
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1727
    ^ self small_methodRedefinedBelowIcon
18294
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1728
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1729
    "Modified: / 28-07-2018 / 09:52:59 / Claus Gittinger"
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1730
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1731
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1732
nameSpaceIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1733
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1734
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1735
    ^ ToolbarIconLibrary nameSpaceBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1736
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1737
    "Modified: / 20-07-2007 / 09:12:26 / cg"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1738
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1739
4308
9957b7ab92e3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4275
diff changeset
  1740
notificationClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1741
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1742
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1743
    ^ ToolbarIconLibrary notificationClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1744
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1745
    "Modified: / 20-07-2007 / 09:11:21 / cg"
4308
9957b7ab92e3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4275
diff changeset
  1746
!
9957b7ab92e3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4275
diff changeset
  1747
18411
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1748
obsoleteMethodIcon
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1749
    <resource: #programImage>
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1750
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1751
    ^ ToolbarIconLibrary obsoleteMethodIcon
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1752
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1753
    "Created: / 21-09-2018 / 15:29:51 / Claus Gittinger"
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1754
!
f247ae2dd036 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18317
diff changeset
  1755
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1756
packageIcon
8853
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1757
    <resource: #programImage>
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1758
18294
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1759
    ^ ToolbarIconLibrary packageIcon
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1760
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1761
    "Modified: / 28-07-2018 / 09:41:22 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1762
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1763
6954
b10a2c15fee5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
  1764
packageIconGraySmall
8853
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1765
    <resource: #programImage>
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1766
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1767
    ^ ToolbarIconLibrary smallGrayPackageIcon
6954
b10a2c15fee5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
  1768
!
b10a2c15fee5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6944
diff changeset
  1769
6925
388067acd009 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6913
diff changeset
  1770
packageIconGreenSmall
8853
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1771
    <resource: #programImage>
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1772
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1773
    ^ ToolbarIconLibrary smallGreenPackageIcon
6925
388067acd009 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6913
diff changeset
  1774
!
388067acd009 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6913
diff changeset
  1775
388067acd009 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6913
diff changeset
  1776
packageIconOrangeSmall
8853
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1777
    <resource: #programImage>
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1778
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1779
    ^ ToolbarIconLibrary smallOrangePackageIcon
6925
388067acd009 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6913
diff changeset
  1780
!
388067acd009 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6913
diff changeset
  1781
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
  1782
packageIconSmall
8853
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1783
    <resource: #programImage>
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1784
a2a14e8871c0 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 8851
diff changeset
  1785
    ^ ToolbarIconLibrary smallYellowPackageIcon
6901
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
  1786
!
34d695317c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6873
diff changeset
  1787
5997
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1788
padLockBlackMiniIcon
6333
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1789
    <resource: #programImage>
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1790
18294
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1791
    ^ ToolbarIconLibrary padLockBlackMiniIcon
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1792
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1793
    "Modified: / 28-07-2018 / 10:00:43 / Claus Gittinger"
5997
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1794
!
a0654a5af9a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5928
diff changeset
  1795
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1796
padLockBlueMiniIcon
6333
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1797
    <resource: #programImage>
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1798
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1799
    ^ ToolbarIconLibrary padLockBlueMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1800
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1801
    "Modified: / 28-07-2018 / 09:34:48 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1802
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1803
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1804
padLockGrayMiniIcon
6333
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1805
    <resource: #programImage>
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1806
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1807
    ^ ToolbarIconLibrary padLockGrayMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1808
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1809
    "Modified: / 28-07-2018 / 09:34:51 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1810
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1811
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1812
padLockGreenMiniIcon
6333
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1813
    <resource: #programImage>
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1814
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1815
    ^ ToolbarIconLibrary padLockGreenMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1816
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1817
    "Modified: / 28-07-2018 / 09:34:58 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1818
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1819
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1820
padLockRedMiniIcon
6333
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1821
    <resource: #programImage>
d5d28109866e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6303
diff changeset
  1822
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1823
    ^ ToolbarIconLibrary padLockRedMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1824
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1825
    "Modified: / 28-07-2018 / 09:33:57 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1826
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1827
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1828
privateMethodIcon
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1829
    <resource: #programImage>
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1830
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1831
    ^ ToolbarIconLibrary padLockRedMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1832
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1833
    "Modified: / 28-07-2018 / 09:34:42 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1834
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1835
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1836
programImageIcon
18294
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1837
    <resource: #programImage>
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1838
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1839
    ^ ToolbarIconLibrary programImageIcon
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1840
c3e05f350239 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 18283
diff changeset
  1841
    "Modified: / 28-07-2018 / 09:43:41 / Claus Gittinger"
2846
b332c41c3daa allCallsOn fix
Claus Gittinger <cg@exept.de>
parents: 2830
diff changeset
  1842
!
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1843
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1844
programMenuIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1845
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1846
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1847
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1848
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1849
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1850
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1851
     self programMenuIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1852
     ImageEditor openOnClass:self andSelector:#programMenuIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1853
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1854
    ^ Icon constantNamed:#'SystemBrowser class programMenuIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1855
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1856
            (Depth1Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1857
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1858
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1859
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1860
                bitsPerSample:(#( 1 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1861
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1862
                bits:(ByteArray fromPackedString:'@@A?<G?0@@A?<G?0@@A?<G?3@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1863
                colorMapFromArray:#[ 0 0 0 170 170 170 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1864
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1865
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1866
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1867
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8?? @@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1868
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1869
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1870
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1871
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1872
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1873
protectedMethodIcon
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1874
    <resource: #programImage>
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1875
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1876
    ^ ToolbarIconLibrary padLockGreenMiniIcon
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1877
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1878
    "Modified: / 28-07-2018 / 09:34:10 / Claus Gittinger"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1879
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  1880
4308
9957b7ab92e3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4275
diff changeset
  1881
queryClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1882
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1883
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1884
    ^ ToolbarIconLibrary queryClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1885
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  1886
    "Modified: / 20-07-2007 / 09:10:32 / cg"
4308
9957b7ab92e3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4275
diff changeset
  1887
!
9957b7ab92e3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4275
diff changeset
  1888
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1889
redCheckIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1890
    <resource: #image>
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1891
    "This resource specification was automatically generated
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1892
     by the ImageEditor of ST/X."
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1893
    "Do not manually edit this!! If it is corrupted,
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1894
     the ImageEditor may not be able to read the specification."
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1895
    "
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1896
     self redCheckIcon inspect
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1897
     ImageEditor openOnClass:self andSelector:#redCheckIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1898
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1899
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1900
    ^ Icon constantNamed:#'SystemBrowser class redCheckIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1901
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1902
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1903
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1904
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1905
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1906
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1907
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1908
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1909
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@"@@@@@@@BH@@@@ @@H @@@BH @"@@@@@BH"H @@@@@BH"@@@@@@@BH @@@@@@@B@@@@@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1910
                colorMapFromArray:#[ 0 0 0 255 255 255 255 0 0 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1911
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1912
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1913
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1914
                            bits:(ByteArray fromPackedString:'@@@@@@A @L@!! GL@O0@^@@8@A@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1915
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1916
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1917
        ]
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1918
!
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1919
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1920
redThumbDownIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1921
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1922
10327
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1923
    ^ ToolbarIconLibrary redThumbDownIcon
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1924
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1925
    "Modified: / 17-07-2011 / 10:04:37 / cg"
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1926
    "Modified: / 28-07-2018 / 09:37:09 / Claus Gittinger"
4165
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1927
!
5004f043a266 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4158
diff changeset
  1928
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1929
redThumbDownSmallIcon
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1930
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1931
10327
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1932
    ^ ToolbarIconLibrary redThumbDownSmallIcon
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1933
1273d6c94564 changed:5 methods
Claus Gittinger <cg@exept.de>
parents: 10188
diff changeset
  1934
    "Modified: / 17-07-2011 / 10:05:09 / cg"
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1935
    "Modified: / 28-07-2018 / 09:37:04 / Claus Gittinger"
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1936
!
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  1937
3813
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
  1938
removeBreakPointIcon2
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1939
    <resource: #programImage>
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1940
15362
1bb59c7b3817 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15334
diff changeset
  1941
    UserPreferences current useColorsForColorBlindness ifTrue:[
1bb59c7b3817 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15334
diff changeset
  1942
        ^ ToolbarIconLibrary removeBreakPointBlueIcon2
1bb59c7b3817 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15334
diff changeset
  1943
    ].
1bb59c7b3817 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15334
diff changeset
  1944
    ^ ToolbarIconLibrary removeBreakPointIcon2
18283
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1945
2df6fdc3f068 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18157
diff changeset
  1946
    "Modified: / 28-07-2018 / 09:36:57 / Claus Gittinger"
3813
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
  1947
!
Claus Gittinger <cg@exept.de>
parents: 3794
diff changeset
  1948
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1949
small_methodEmptyInheritedIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1950
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1951
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1952
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1953
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1954
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1955
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1956
     self small_methodEmptyInheritedIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1957
     ImageEditor openOnClass:self andSelector:#small_methodEmptyInheritedIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1958
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1959
    ^ Icon 
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1960
        constantNamed:#'SystemBrowser class small_methodEmptyInheritedIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1961
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1962
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1963
                width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1964
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1965
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1966
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1967
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1968
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1969
                            fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1970
                colorMapFromArray:#[ 0 0 0 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1971
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1972
                            width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1973
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1974
                            bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1975
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1976
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1977
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1978
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1979
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1980
small_methodInheritedFromAboveAndRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1981
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1982
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1983
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1984
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1985
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1986
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1987
     self small_methodInheritedFromAboveAndRedefinedBelowIcon inspect
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1988
     ImageEditor openOnClass:self andSelector:#small_methodInheritedFromAboveAndRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1989
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1990
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1991
    ^ Icon 
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  1992
        constantNamed:#'SystemBrowser class small_methodInheritedFromAboveAndRedefinedBelowIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1993
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1994
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1995
                width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1996
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1997
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1998
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  1999
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2000
                bits:(ByteArray fromPackedString:'L1@DLLS,ES@@@@@0@@@*@L#@B@@3@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2001
                colorMapFromArray:#[ 0 0 0 255 255 127 255 127 127 127 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2002
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2003
                            width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2004
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2005
                            bits:(ByteArray fromPackedString:'\GC8>O @>O#8\G@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2006
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2007
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2008
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2009
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2010
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2011
small_methodInheritedFromAboveIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2012
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2013
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2014
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2015
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2016
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2017
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2018
     self small_methodInheritedFromAboveIcon inspect
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2019
     ImageEditor openOnClass:self andSelector:#small_methodInheritedFromAboveIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2020
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2021
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2022
    ^ Icon 
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2023
        constantNamed:#'SystemBrowser class small_methodInheritedFromAboveIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2024
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2025
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2026
                width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2027
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2028
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2029
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2030
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2031
                bits:(ByteArray fromPackedString:'H#HDLHR@EP@@@@@@@BD@IP@!!@B@@IP@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2032
                colorMapFromArray:#[ 0 0 0 255 255 127 127 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2033
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2034
                            width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2035
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2036
                            bits:(ByteArray fromPackedString:'\GC8>O @@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2037
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2038
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2039
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2040
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2041
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2042
small_methodRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2043
    <resource: #image>
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2044
    "This resource specification was automatically generated
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2045
     by the ImageEditor of ST/X."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2046
    "Do not manually edit this!! If it is corrupted,
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2047
     the ImageEditor may not be able to read the specification."
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2048
    "
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2049
     self small_methodRedefinedBelowIcon inspect
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2050
     ImageEditor openOnClass:self andSelector:#small_methodRedefinedBelowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2051
     Icon flushCachedIcons"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2052
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2053
    ^ Icon 
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2054
        constantNamed:#'SystemBrowser class small_methodRedefinedBelowIcon'
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2055
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2056
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2057
                width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2058
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2059
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2060
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2061
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2062
                bits:(ByteArray fromPackedString:'@@D@@@@@@@@@@@@@@@4UBHR@A@@"@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2063
                colorMapFromArray:#[ 0 0 0 255 127 127 127 127 127 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2064
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2065
                            width:5;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2066
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2067
                            bits:(ByteArray fromPackedString:'@@@@@@@@>O#8\G@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2068
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2069
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2070
        ]
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2071
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  2072
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2073
startableClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2074
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2075
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2076
    ^ ToolbarIconLibrary startableClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2077
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2078
    "Created: / 05-11-2001 / 09:50:16 / cg"
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2079
    "Modified: / 20-07-2007 / 09:09:40 / cg"
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2080
!
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2081
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2082
startableVisualAppIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2083
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2084
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2085
    ^ ToolbarIconLibrary visualStartableClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2086
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2087
    "Created: / 05-11-2001 / 09:49:00 / cg"
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2088
    "Modified: / 20-07-2007 / 09:08:34 / cg"
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2089
!
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2090
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2091
stopIcon
14106
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  2092
    <resource: #obsolete>
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  2093
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  2094
    ^ self fullBreakPointedIcon
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  2095
c042bb7e4cee Added icons fullBreakPointedIcon and lineBreakPointedIcon.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14103
diff changeset
  2096
    "Modified: / 05-03-2014 / 10:27:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2097
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2098
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2099
tabListIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2100
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2101
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2102
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2103
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2104
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2105
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2106
     self tabListIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2107
     ImageEditor openOnClass:self andSelector:#tabListIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2108
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2109
    ^ Icon constantNamed:#'SystemBrowser class tabListIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2110
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2111
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2112
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2113
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2114
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2115
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2116
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2117
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2118
                            fromPackedString:'@@@@D3!!QP@@8TT@@N@@J@C***P@:**$AN**)@C***P@:**$@IUUUB @@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2119
                colorMapFromArray:#[ 0 0 0 127 127 127 170 170 170 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2120
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2121
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2122
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2123
                            bits:(ByteArray fromPackedString:'?8C?0O?0??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2124
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2125
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2126
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2127
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2128
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2129
tableColumnsIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2130
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2131
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2132
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2133
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2134
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2135
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2136
     self tableColumnsIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2137
     ImageEditor openOnClass:self andSelector:#tableColumnsIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2138
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2139
    ^ Icon constantNamed:#'SystemBrowser class tableColumnsIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2140
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2141
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2142
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2143
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2144
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2145
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2146
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2147
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2148
                            fromPackedString:'@@@@@C??? @8(($@L@@AHC"""R@0@@D@NJJI@C@@@P@8(($@IUUU@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2149
                colorMapFromArray:#[ 0 0 0 127 127 127 170 170 170 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2150
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2151
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2152
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2153
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2154
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2155
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2156
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2157
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2158
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2159
testCaseClassIcon
8862
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2160
    <resource: #programImage>
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2161
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2162
    "/ only left here for backward compatibility...
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2163
    ^ ToolbarIconLibrary testCaseClassIcon
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2164
!
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2165
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2166
testCaseClassIconFor:cls
4167
588e05d2124d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4166
diff changeset
  2167
    <resource: #programImage>
588e05d2124d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4166
diff changeset
  2168
8862
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2169
    "/ decision moved to TestCase - see there.
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2170
    "/ only left here for backward compatibility...
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2171
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2172
    |lastResult|
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2173
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  2174
    lastResult := cls lastTestRunResultOrNil.
12729
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2175
    lastResult notNil ifTrue:[
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2176
        lastResult == TestResult statePass ifTrue:[
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2177
            ^ self testCasePassedIcon
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2178
        ].
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2179
        lastResult == TestResult stateFail ifTrue:[
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2180
            ^ self testCaseFailedIcon
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2181
        ].
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2182
        lastResult == TestResult stateError ifTrue:[
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2183
            ^ self testCaseErrorIcon
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2184
        ].
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2185
    ].
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2186
    ^ self testCaseUnknownResultIcon
6848
27b76bc54f22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6776
diff changeset
  2187
27b76bc54f22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6776
diff changeset
  2188
    "Modified: / 06-08-2006 / 11:14:12 / cg"
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2189
!
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2190
12729
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2191
testCaseErrorIcon
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2192
    <resource: #programImage>
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2193
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2194
    "/ only left here for backward compatibility...
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2195
    ^ ToolbarIconLibrary testCaseErrorIcon
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2196
!
8185c4f20ed1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12713
diff changeset
  2197
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2198
testCaseFailedIcon
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  2199
    <resource: #programImage>
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  2200
8862
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2201
    "/ only left here for backward compatibility...
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2202
    ^ ToolbarIconLibrary testCaseFailedIcon
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2203
!
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2204
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2205
testCasePassedIcon
8862
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2206
    <resource: #programImage>
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2207
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2208
    "/ only left here for backward compatibility...
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2209
    ^ ToolbarIconLibrary testCasePassedIcon
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2210
!
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2211
12631
94d188b87901 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12621
diff changeset
  2212
testCaseSkippedIcon
94d188b87901 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12621
diff changeset
  2213
    <resource: #programImage>
94d188b87901 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12621
diff changeset
  2214
94d188b87901 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12621
diff changeset
  2215
    "/ only left here for backward compatibility...
94d188b87901 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12621
diff changeset
  2216
    ^ ToolbarIconLibrary testCaseSkippedIcon
94d188b87901 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12621
diff changeset
  2217
!
94d188b87901 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12621
diff changeset
  2218
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2219
testCaseUnknownResultIcon
4166
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  2220
    <resource: #programImage>
e24130283125 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4165
diff changeset
  2221
8862
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2222
    "/ only left here for backward compatibility...
dece7957557d comment/format in: #testCaseClassIconFor:
Claus Gittinger <cg@exept.de>
parents: 8853
diff changeset
  2223
    ^ ToolbarIconLibrary testCaseClassIcon
4150
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2224
!
Claus Gittinger <cg@exept.de>
parents: 4143
diff changeset
  2225
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2226
timeIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2227
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2228
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2229
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2230
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2231
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2232
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2233
     self timeIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2234
     ImageEditor openOnClass:self andSelector:#timeIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2235
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2236
    ^ Icon constantNamed:#'SystemBrowser class timeIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2237
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2238
            (Depth1Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2239
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2240
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2241
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2242
                bitsPerSample:(#( 1 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2243
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2244
                bits:(ByteArray fromPackedString:'@@@G@A7@G\@=8C0 O>@_0A?@A0@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2245
                colorMapFromArray:#[ 0 0 0 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2246
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2247
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2248
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2249
                            bits:(ByteArray fromPackedString:'A0@_0C? O>A?<G?0_?@?8C? G<@G@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2250
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2251
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2252
        ]
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2253
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2254
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2255
traceIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2256
    <resource: #image>
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2257
    "This resource specification was automatically generated
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2258
     by the ImageEditor of ST/X."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2259
    "Do not manually edit this!! If it is corrupted,
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2260
     the ImageEditor may not be able to read the specification."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2261
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  2262
     self traceIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2263
     ImageEditor openOnClass:self andSelector:#traceIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2264
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2265
    ^ Icon constantNamed:#'SystemBrowser class traceIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2266
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2267
            (Depth1Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2268
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2269
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2270
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2271
                bitsPerSample:(#( 1 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2272
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2273
                bits:(ByteArray fromPackedString:'@@@@@@>@C8@G@@\@@ @B@@@@@@@@@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2274
                colorMapFromArray:#[ 255 0 0 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2275
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2276
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2277
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2278
                            bits:(ByteArray fromPackedString:'_?A?<C? O>@_0A?@C8@O @\@A0@B@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2279
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2280
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2281
        ]
2830
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2282
!
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2283
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2284
visualStartableClassIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2285
    <resource: #image>
2830
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2286
    "This resource specification was automatically generated
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2287
     by the ImageEditor of ST/X."
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2288
    "Do not manually edit this!! If it is corrupted,
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2289
     the ImageEditor may not be able to read the specification."
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2290
    "
36dee112c780 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2828
diff changeset
  2291
     self visualStartableClassIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2292
     ImageEditor openOnClass:self andSelector:#visualStartableClassIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2293
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2294
    ^ Icon constantNamed:#'SystemBrowser class visualStartableClassIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2295
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2296
            (Depth2Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2297
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2298
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2299
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2300
                bitsPerSample:(#( 2 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2301
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2302
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2303
                            fromPackedString:'**J*NJ*"*#"*!!J(@*!!T*@J(DJ B*DR(@*!!T*NJ(*J B*O2(@*+.*@J*** @b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2304
                colorMapFromArray:#[ 0 0 0 127 127 127 255 0 0 255 255 0 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2305
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2306
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2307
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2308
                            bits:(ByteArray fromPackedString:'@ @B@@\@C8@O @>@C8@H @>@A0@G@@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2309
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2310
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2311
        ]
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2312
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2313
    "Modified: / 5.11.2001 / 09:49:30 / cg"
2892
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2314
!
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2315
4275
aeaf7c245b7a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4270
diff changeset
  2316
warningClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2317
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2318
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2319
    ^ ToolbarIconLibrary warningClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2320
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2321
    "Modified: / 20-07-2007 / 09:04:39 / cg"
4275
aeaf7c245b7a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4270
diff changeset
  2322
!
aeaf7c245b7a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4270
diff changeset
  2323
2892
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2324
watchIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2325
    <resource: #image>
2892
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2326
    "This resource specification was automatically generated
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2327
     by the ImageEditor of ST/X."
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2328
    "Do not manually edit this!! If it is corrupted,
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2329
     the ImageEditor may not be able to read the specification."
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2330
    "
1acef635a284 icons use less colors
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
  2331
     self watchIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2332
     ImageEditor openOnClass:self andSelector:#watchIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2333
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2334
    ^ Icon constantNamed:#'SystemBrowser class watchIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2335
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2336
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2337
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2338
                height:12;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2339
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2340
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2341
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2342
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2343
                            fromPackedString:'@@X@@@X@@@@AE XQY @@XALCDFD@@AD0@CDV@@XAL@@1A @AD0@P@1D@XBI!!DVH A QUPQEEU@@%"EDAVHT@IX]R@%!!5@FQUH@@%U@A&H$@@P"X@');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2344
                colorMapFromArray:#[ 0 0 51 0 0 60 0 51 102 51 102 153 71 102 145 128 213 221 153 153 204 153 255 255 255 255 255 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2345
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2346
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2347
                            height:12;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2348
                            bits:(ByteArray fromPackedString:'FL@]0C7 O>A?<G?0??#=>O78?_#8>GA0');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2349
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2350
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2351
        ]
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2352
!
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2353
4143
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  2354
windowClassIcon
7827
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2355
    <resource: #programImage>
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2356
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2357
    ^ ToolbarIconLibrary windowClassBrowserIcon
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2358
36dc2d8ec6b6 icons in ToolbarIconLibrary
Claus Gittinger <cg@exept.de>
parents: 7711
diff changeset
  2359
    "Modified: / 20-07-2007 / 09:05:57 / cg"
4143
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  2360
!
Claus Gittinger <cg@exept.de>
parents: 4130
diff changeset
  2361
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2362
windowIcon
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2363
    <resource: #image>
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2364
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2365
     by the ImageEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2366
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2367
     the ImageEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2368
    "
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2369
     self windowIcon inspect
14413
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2370
     ImageEditor openOnClass:self andSelector:#windowIcon"
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2371
    
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2372
    ^ Icon constantNamed:#'SystemBrowser class windowIcon'
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2373
        ifAbsentPut:[
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2374
            (Depth4Image new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2375
                width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2376
                height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2377
                photometric:(#palette);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2378
                bitsPerSample:(#( 4 ));
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2379
                samplesPerPixel:(1);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2380
                bits:(ByteArray 
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2381
                            fromPackedString:'@@@@@@@@@@.;.;.;.0@@@@@@@@@@C.;.;.;/@@9&Y&Y&XP@NY&Y&Y&D@C&Y&Y&Y!!@@9&Y&Y&XP@NY&Y&Y&D@C1DQDQDQ@@@@@@@@@@@b');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2382
                colorMapFromArray:#[ 0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170 ];
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2383
                mask:((ImageMask new)
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2384
                            width:13;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2385
                            height:11;
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2386
                            bits:(ByteArray fromPackedString:'??#?>O?8??#?>O?8??#?>O?8??#?>@@a');
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2387
                            yourself);
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2388
                yourself
cdd8eaf8a5e3 Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents: 14390
diff changeset
  2389
        ]
3354
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2390
Claus Gittinger <cg@exept.de>
parents: 3352
diff changeset
  2391
    "Created: / 5.11.2001 / 09:39:03 / cg"
2846
b332c41c3daa allCallsOn fix
Claus Gittinger <cg@exept.de>
parents: 2830
diff changeset
  2392
! !
2692
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  2393
1203
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2394
!SystemBrowser class methodsFor:'interface specs'!
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2395
1367
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2396
metaSpec
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2397
        "UIPainter new openOnClass: self andSelector: #metaSpec"
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2398
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2399
        <resource: #canvas>
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2400
        ^#(#FullSpec 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2401
                #window: 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2402
                #(#WindowSpec 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2403
                        #label: 'Unlabeled Canvas' 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2404
                        #bounds: #(#Rectangle 27 249 325 334 ) ) 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2405
                #component: 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2406
                #(#SpecCollection 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2407
                        #collection: #(
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2408
                                #(#RadioButtonSpec 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2409
                                        #layout: #(#LayoutFrame 0 0 4 0 -1 0.575 20 0 ) 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2410
                                        #name: #instanceSwitch 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2411
                                        #model: #metaHolder 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2412
                                        #callbacksSpec: 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2413
                                        #(#UIEventCallbackSubSpec 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2414
                                                #requestValueChangeSelector: #changeRequest ) 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2415
                                        #label: 'instance' 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2416
                                        #select: false ) 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2417
                                #(#RadioButtonSpec 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2418
                                        #layout: #(#LayoutFrame 1 0.575 4 0 -1 1 20 0 ) 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2419
                                        #name: #classSwitch 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2420
                                        #model: #metaHolder 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2421
                                        #callbacksSpec: 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2422
                                        #(#UIEventCallbackSubSpec 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2423
                                                #requestValueChangeSelector: #changeRequest ) 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2424
                                        #label: 'class' 
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2425
                                        #select: true ) ) ) )
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2426
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2427
    "Created: / 30.10.1997 / 19:07:29 / cg"
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2428
!
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  2429
1203
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2430
methodMoveDialogSpec
16847
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2431
    "This resource specification was automatically generated
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2432
     by the UIPainter of ST/X."
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2433
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2434
    "Do not manually edit this!! If it is corrupted,
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2435
     the UIPainter may not be able to read the specification."
1203
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2436
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2437
    "
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2438
     UIPainter new openOnClass:SystemBrowser andSelector:#methodMoveDialogSpec
16847
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2439
     SystemBrowser new openInterface:#methodMoveDialogSpec
1203
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2440
    "
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2441
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2442
    <resource: #canvas>
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2443
16847
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2444
    ^ 
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2445
    #(FullSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2446
       name: methodMoveDialogSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2447
       window: 
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2448
      (WindowSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2449
         label: 'move method'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2450
         name: 'move method'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2451
         bounds: (Rectangle 0 0 387 118)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2452
       )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2453
       component: 
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2454
      (SpecCollection
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2455
         collection: (
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2456
          (HorizontalPanelViewSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2457
             name: 'horizontalPanelView'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2458
             layout: (LayoutFrame 0 0.0 -35 1.0 0 1.0 -2 1.0)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2459
             level: 0
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2460
             horizontalLayout: fitSpace
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2461
             verticalLayout: center
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2462
             horizontalSpace: 4
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2463
             verticalSpace: 4
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2464
             component: 
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2465
            (SpecCollection
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2466
               collection: (
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2467
                (ActionButtonSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2468
                   label: 'cancel'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2469
                   name: 'actionButton2'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2470
                   translateLabel: true
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2471
                   tabable: true
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2472
                   model: cancel
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2473
                   extent: (Point 187 27)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2474
                 )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2475
                (ActionButtonSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2476
                   label: 'move'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2477
                   name: 'actionButton1'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2478
                   translateLabel: true
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2479
                   tabable: true
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2480
                   model: accept
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2481
                   isDefault: true
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2482
                   extent: (Point 188 27)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2483
                 )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2484
                )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2485
              
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2486
             )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2487
           )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2488
          (LabelSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2489
             label: 'move current method to which class:'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2490
             name: 'label'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2491
             layout: (LayoutFrame 2 0 2 0 -2 1.0 25 0)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2492
             style: largeLabelFont
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2493
             foregroundColor: (Color 0.0 0.0 0.0)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2494
             backgroundColor: (Color 67.0 67.0 67.0)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2495
             translateLabel: true
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2496
             adjust: left
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2497
           )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2498
          (ComboBoxSpec
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2499
             name: 'comboBox1'
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2500
             layout: (LayoutFrame 2 0 29 0 -2 1.0 51 0)
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2501
             tabable: true
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2502
             model: className
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2503
             comboList: classList
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2504
           )
1203
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2505
          )
16847
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2506
        
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2507
       )
b4eddbe34078 #UI_ENHANCEMENT by stefan
Stefan Vogel <sv@exept.de>
parents: 16691
diff changeset
  2508
     )
1203
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2509
! !
ade0bcc06188 preps to use UISpecs
Claus Gittinger <cg@exept.de>
parents: 1190
diff changeset
  2510
17734
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2511
!SystemBrowser class methodsFor:'private-code update'!
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2512
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2513
sourceOfMethod:mthd
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2514
    |code|
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2515
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2516
    code := mthd source.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2517
    code notNil ifTrue:[ ^ code].
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2518
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2519
    "/ wrong: even if there is no source, we
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2520
    "/ should be able to type in something and accept
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2521
    "/ self setNoAcceptAction.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2522
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2523
    (mthd sourcePosition isNil
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2524
    or:[mthd getSource isNil]) ifTrue:[
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2525
        ^ '"
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2526
Sorry, but the method''s sourceCode is not available.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2527
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2528
Probably, the method''s sourceCode-info was stripped from the system.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2529
"'.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2530
    ].
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2531
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2532
    ^ '"
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2533
Sorry, but the method''s sourceCode is not available or corrupted.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2534
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2535
',(Smalltalk isStandAloneApp ifTrue:['If this is a deployed application, this part of the source is probably not
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2536
part of the distribution (only the base Smalltalk/X framework is open-source).
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2537
'] ifFalse:['']),'
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2538
Please check the setting of your packagePath, which contains a collection of pathNames.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2539
The system searches those directories for a package-subdirectories,
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2540
which should either contain the classes source file.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2541
Also, check if that directory and/or sourceFile grants read access.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2542
The packagePath can be accessed via
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2543
    Smalltalk packagePath
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2544
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2545
To fix this (in the running system), evaluate:
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2546
    Smalltalk packagePath addFirst:''<<pathOfDirContainingPackageDir>>''.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2547
    Smalltalk flushPathCaches.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2548
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2549
You may also want to add those statements to the end of your ''private.rc''
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2550
file - so you will not get this error again and again.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2551
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2552
Also, check if you have the sourceCodeManagement (CVS) enabled,
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2553
and (if so) configured correctly.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2554
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2555
If all of the above fail, and you know the path of the source file,
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2556
you can workaround the problem, by adding a symbolic link to that sourcefile
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2557
in the ''source'' directory.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2558
"'.
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2559
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2560
    "Modified: / 09-11-2017 / 08:16:28 / cg"
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2561
! !
e01603154e47 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17624
diff changeset
  2562
4860
8e1a4b990512 method category rename
Claus Gittinger <cg@exept.de>
parents: 4852
diff changeset
  2563
!SystemBrowser class methodsFor:'private-helpers'!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2564
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2565
askForPackageChangeFrom:oldPkg to:newPkg
3626
abf84bdbfdb2 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 3621
diff changeset
  2566
    |answer box notAgain chk|
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2567
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2568
    box := OptionBox 
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2569
                title:
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2570
('You are about to change a method from another (system-) package.
17775
0bd37dc16a54 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17734
diff changeset
  2571
The method''s original packageID was ''%1''. 
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2572
If you proceed, the new method will be marked as belonging
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2573
to the ''%2'' package (and this warning will not be shown again).
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2574
If you proceed with ''keep'', the new method will be installed
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2575
but the old packageID will be preserved.
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2576
Otherwise, hit ''cancel'' to leave the code unchanged.
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2577
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2578
PS: if you disable this check here, it can be reenabled it in the launchers settings-compilation dialog.' 
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2579
                        bindWith:(oldPkg allBold)
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2580
                            with:(newPkg allBold))
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2581
                numberOfOptions:3.
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2582
3476
685f67f7e818 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3471
diff changeset
  2583
    box buttonTitles:#('Cancel' 'Keep' 'Continue').
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2584
    box defaultButtonIndex:3. 
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2585
    box action:[:n | answer := #(#cancel #keep #continue) at:n].
5833
5c2a75846afc Do not use obsolete methods with #form:
Stefan Vogel <sv@exept.de>
parents: 5802
diff changeset
  2586
    box label:'Method redefinition'; image:(WarningBox iconBitmap).
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2587
    box yPosition:(box formLabel bottom max:box textLabel bottom).
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2588
    box addVerticalSpace:10.
17043
6185cc2147c2 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16893
diff changeset
  2589
    chk := box addCheckBoxAtBottom:'Don''t show this dialog again (never keep)' on:(notAgain := false asValue).
8158
f7b891e7fb75 added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents: 8139
diff changeset
  2590
    box preferredExtent:(box preferredExtent + (0 @ chk preferredHeight) + (0@10)).
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2591
    box resize.
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2592
    box showAtPointer.
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2593
    box destroy.
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2594
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2595
    (answer ~~ #cancel) ifTrue:[
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2596
        notAgain value ifTrue:[
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2597
            Class catchMethodRedefinitions:false.
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2598
        ].
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2599
    ].
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2600
    ^ answer.
11291
d4d27edd6ab4 changed: #askForPackageChangeFrom:to:
Claus Gittinger <cg@exept.de>
parents: 11271
diff changeset
  2601
17775
0bd37dc16a54 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17734
diff changeset
  2602
    "Modified: / 21-11-2017 / 13:09:11 / cg"
2880
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2603
!
ef6fcc02a924 give user a chance to suppress the annoying package-change-keep
Claus Gittinger <cg@exept.de>
parents: 2846
diff changeset
  2604
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2605
showNoneFound
3244
1e41eccb08b9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3241
diff changeset
  2606
    self warn:(self classResources string:'None found.').
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2607
!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2608
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2609
showNoneFound:what
1620
51341ec8360b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1573
diff changeset
  2610
    |rs|
51341ec8360b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1573
diff changeset
  2611
51341ec8360b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1573
diff changeset
  2612
    rs := self classResources.
3244
1e41eccb08b9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3241
diff changeset
  2613
    self information:((rs string:what) , (rs string:'...\\... none found.')) withCRs.
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2614
! !
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2615
4860
8e1a4b990512 method category rename
Claus Gittinger <cg@exept.de>
parents: 4852
diff changeset
  2616
!SystemBrowser class methodsFor:'private-instance creation'!
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2617
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2618
newWithLabel:aString setupBlock:aBlock
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2619
    "common helper method for all creation methods"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2620
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2621
    ^ self newWithLabel:aString setupBlock:aBlock onDevice:Screen current
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2622
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2623
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2624
newWithLabel:aString setupBlock:aBlock onDevice:aWorkstation
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2625
    "common helper method for all creation methods"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2626
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2627
    |newBrowser|
45
950b84ba89e6 *** empty log message ***
claus
parents: 41
diff changeset
  2628
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2629
    newBrowser := BrowserView onDevice:aWorkstation.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2630
    newBrowser title:aString.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2631
    aBlock value:newBrowser.
45
950b84ba89e6 *** empty log message ***
claus
parents: 41
diff changeset
  2632
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2633
    newBrowser open.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2634
    ^ newBrowser
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2635
!
45
950b84ba89e6 *** empty log message ***
claus
parents: 41
diff changeset
  2636
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2637
newWithLabel:aString setupSelector:aSymbol arg:arg
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2638
    "common helper method for all creation methods"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2639
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2640
    ^ self newWithLabel:aString setupSelector:aSymbol arg:arg onDevice:Screen current 
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2641
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  2642
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2643
newWithLabel:aString setupSelector:aSymbol arg:arg onDevice:aWorkstation
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2644
    "common helper method for all creation methods"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2645
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2646
    |newBrowser|
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2647
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2648
    newBrowser := BrowserView onDevice:aWorkstation.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2649
    newBrowser title:aString.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2650
    newBrowser perform:aSymbol with:arg.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2651
    newBrowser open.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2652
    ^ newBrowser
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2653
! !
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2654
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  2655
!SystemBrowser class methodsFor:'special search startup'!
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2656
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2657
allCallsOn:aSelectorString
16449
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  2658
    "return a collection of methods which send aSelector.
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  2659
     This takes some time, because source code is parsed to see
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  2660
     if there is really a message send inside (and not just a symbol reference)"
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2661
9007
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2662
    ^ self 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2663
        allCallsOn:aSelectorString 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2664
        in:(Smalltalk allClasses) 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2665
        ignoreCase:false 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2666
        match:false
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2667
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2668
    "
16449
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  2669
     Time millisecondsToRun:[
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  2670
         SystemBrowser allCallsOn:#at:put:
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  2671
     ].            
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2672
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2673
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2674
    "Created: 24.1.1997 / 19:42:57 / cg"
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2675
!
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2676
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2677
allCallsOn:aSelectorString in:aCollectionOfClasses
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2678
    "return a collection of methods which send aSelector.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2679
     Methods from classes in aCollectionOfClasses are searched only."
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2680
9007
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2681
    ^ self 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2682
        allCallsOn:aSelectorString 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2683
        in:aCollectionOfClasses 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2684
        ignoreCase:false 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2685
        match:false
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2686
!
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2687
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2688
allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2689
    "return a collection of methods which send aSelector.
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2690
     Methods from classes in aCollectionOfClasses are searched only."
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2691
9007
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2692
    ^ self 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2693
        allCallsOn:aSelectorString 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2694
        in:aCollectionOfClasses 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2695
        ignoreCase:ignoreCase 
7e05080796d6 comment/format in:
Claus Gittinger <cg@exept.de>
parents: 9002
diff changeset
  2696
        match:true
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2697
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2698
    "
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2699
     SystemBrowser allCallsOn:#at:put: in:(Smalltalk allClasses)
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2700
    "
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2701
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2702
    "Modified: 18.4.1997 / 10:32:50 / cg"
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2703
!
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2704
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2705
allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatchArg
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2706
    "return a collection of methods which send aSelector.
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2707
     Methods from classes in aCollectionOfClasses are searched only."
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2708
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2709
    |doMatch sel searchBlock classesSearched|
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2710
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2711
    doMatch := doMatchArg.
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2712
    (doMatch and:[aSelectorString includesMatchCharacters not]) ifTrue:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2713
        doMatch := false.
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2714
    ].    
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2715
        
3471
4c4b41516d96 care for empty selector in allCallsOn.
Claus Gittinger <cg@exept.de>
parents: 3470
diff changeset
  2716
    aSelectorString size == 0 ifTrue:[ ^ #() ].
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2717
    (doMatch or:[ignoreCase]) ifFalse:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2718
        "/ no need to search, if there is no such symbol in the system
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2719
        sel := aSelectorString asSymbolIfInterned.
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2720
        sel isNil ifTrue:[ ^ #() ].   "/ none (no such selector)
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2721
    ]. 
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  2722
2901
8d162dedd271 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2892
diff changeset
  2723
    classesSearched := aCollectionOfClasses.
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2724
    doMatch ifFalse:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  2725
        "/ exclude all javaClasses, if the selector cannot be a valid java-selector
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2726
        (aSelectorString includes:$() ifFalse:[
12831
f7fe86345bc4 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12822
diff changeset
  2727
            classesSearched := classesSearched reject:[:eachClass | eachClass theNonMetaclass isJavaClass ].
2846
b332c41c3daa allCallsOn fix
Claus Gittinger <cg@exept.de>
parents: 2830
diff changeset
  2728
        ].
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2729
    ].
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  2730
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2731
    searchBlock := self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:doMatch.
4332
c8efd47b1a1c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4308
diff changeset
  2732
    searchBlock isNil ifTrue:[
c8efd47b1a1c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4308
diff changeset
  2733
        ^ #()    "/ none (no such selector)
c8efd47b1a1c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4308
diff changeset
  2734
    ].
2901
8d162dedd271 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2892
diff changeset
  2735
    ^ self allMethodsIn:classesSearched where:searchBlock
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2736
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2737
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2738
     SystemBrowser allCallsOn:#at:put: in:(Smalltalk allClasses)
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2739
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2740
1143
0707461e582a avoid compilation of lazy methods when searching for senders
Claus Gittinger <cg@exept.de>
parents: 1059
diff changeset
  2741
    "Modified: 18.4.1997 / 10:32:50 / cg"
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2742
!
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2743
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2744
allMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2745
    "return a collection of methods which pass the given test.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2746
     wantInst/wantClass control if instMethods and/or classMethods are to be
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2747
     considered.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2748
     Only classes in aCollectionOfClasses are inspected in the search"
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2749
2769
768b6aa2fb5f eliminated a message
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
  2750
    |list activePriority|
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2751
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2752
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2753
     since this may take a long time, lower my priority ...
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2754
    "
2769
768b6aa2fb5f eliminated a message
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
  2755
    activePriority := Processor activePriority.
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  2756
    Processor activeProcess 
2769
768b6aa2fb5f eliminated a message
Claus Gittinger <cg@exept.de>
parents: 2748
diff changeset
  2757
        withPriority:activePriority-1 to:activePriority
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  2758
    do:[
2484
afd8d8dbd9e2 care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
  2759
        |checkedClasses checkBlock detectedMethods|
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2760
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2761
        checkedClasses := IdentitySet new.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2762
        list := OrderedCollection new.
2484
afd8d8dbd9e2 care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
  2763
        detectedMethods := IdentitySet new.
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2764
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2765
        checkBlock := [:cls |
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2766
            (checkedClasses includes:cls) ifFalse:[
8554
441ea25ad1fd Do not complain about obsolete classes which are unloaded when searching
Stefan Vogel <sv@exept.de>
parents: 8505
diff changeset
  2767
                (cls isObsolete and:[cls isLoaded]) ifTrue:[
17466
93123277a442 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17440
diff changeset
  2768
                    Logger debug:'Browser method search: skipping obsolete class: %1' with:cls displayString
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2769
                ] ifFalse:[
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2770
                    cls methodDictionary keysAndValuesDo:[:sel :method |
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2771
                        (aBlock value:cls value:method value:sel) ifTrue:[
2484
afd8d8dbd9e2 care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
  2772
                            "/ care for methods being in multiple classes (should not happen)
afd8d8dbd9e2 care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
  2773
                            (detectedMethods includes:method) ifFalse:[
afd8d8dbd9e2 care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
  2774
                                list add:method.
afd8d8dbd9e2 care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
  2775
                                detectedMethods add:method
afd8d8dbd9e2 care vor methods being found in multiple classes
Claus Gittinger <cg@exept.de>
parents: 2439
diff changeset
  2776
                            ]
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2777
                        ]
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2778
                    ].
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2779
                    checkedClasses add:cls.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2780
                ]
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2781
            ]
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2782
        ].
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2783
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2784
        aCollectionOfClasses do:[:aClass |
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2785
            "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2786
             output disabled - it slows down things too much (when searching for
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2787
             implementors or senders)
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2788
            "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2789
            wantInst ifTrue:[
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2790
"/                Transcript show:'searching '; show:aClass name; showCR:' ...'; endEntry.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2791
                checkBlock value:aClass
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2792
            ].
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2793
            wantClass ifTrue:[
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2794
"/                Transcript show:'searching '; show:aClass class name; showCR:' ...'; endEntry.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2795
                checkBlock value:(aClass class)
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2796
            ].
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2797
            Processor yield
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2798
        ]
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2799
    ].
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2800
    ^ list
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2801
17466
93123277a442 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17440
diff changeset
  2802
    "Created: / 24-01-1997 / 19:41:12 / cg"
93123277a442 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17440
diff changeset
  2803
    "Modified: / 14-03-2017 / 12:05:41 / cg"
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2804
!
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2805
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2806
allMethodsIn:aCollectionOfClasses where:aBlock
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2807
    "return a collection of methods which pass the given test.
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2808
     Only classes in aCollectionOfClasses are inspected in the search"
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2809
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2810
    ^ self
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2811
        allMethodsIn:aCollectionOfClasses 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2812
        inst:true 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2813
        class:true
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2814
        where:aBlock
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2815
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2816
    "Created: 24.1.1997 / 19:41:49 / cg"
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2817
!
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2818
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2819
aproposSearch:aString
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2820
    "browse all methods, which have aString in their selector."
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2821
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2822
    ^ self aproposSearch:aString in:(Smalltalk allClasses)
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
  2823
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2824
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2825
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2826
aproposSearch:aString in:aCollectionOfClasses
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2827
    "browse all methods, which have aString.
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2828
     This is relatively slow, since all source must be processed."
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2829
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2830
    |matchString list s searchBlock browser|
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2831
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2832
    matchString := '*' , aString , '*'.
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2833
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2834
    list := OrderedCollection new.
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2835
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2836
    (aString includesMatchCharacters) ifTrue:[
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2837
        s := '*' , aString asLowercase , '*'.
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2838
        "a matchString"
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2839
        searchBlock := [:text | (text asCollectionOfLinesfindFirst:[:line | s match:line]) ~~ 0].
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2840
    ] ifFalse:[
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2841
        searchBlock := [:source | (source findString:aString asLowercase) ~~ 0]
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2842
    ].
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2843
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2844
    browser := self browseMethodsIn:aCollectionOfClasses 
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2845
                     where:[:class :method :sel |
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2846
                                |comment|
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2847
2655
9e90bbd1eb18 apropos search is now: selectors containing
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2848
                                (searchBlock value:sel asLowercase)
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2849
                           ]
2729
9af04074a4bb no direct access to super-class-instvars
Claus Gittinger <cg@exept.de>
parents: 2728
diff changeset
  2850
                     title:(self classResources string:'selectors containing: %1' with:aString).
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2851
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2852
    browser notNil ifTrue:[
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2853
        browser autoSearch:aString 
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2854
    ].
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2855
    ^ browser
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2856
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2857
    "
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2858
     SystemBrowser aproposSearch:'append' in:(Collection withAllSubclasses)
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2859
     SystemBrowser aproposSearch:'add'    in:(Collection withAllSubclasses)
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2860
     SystemBrowser aproposSearch:'sort'   in:(Collection withAllSubclasses)
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2861
     SystemBrowser aproposSearch:'[Aa]bsent' in:(Collection withAllSubclasses)
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2862
    "
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2863
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2864
    "Created: 9.12.1995 / 18:02:36 / cg"
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
  2865
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 203
diff changeset
  2866
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2867
browseAllCallsOn:aSelectorString
4490
de7216d4a28a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4350
diff changeset
  2868
    "launch a browser for all senders of aSelector.
de7216d4a28a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4350
diff changeset
  2869
     Notice: better go via Smalltalk browseAllCallsOn:, which honors the tool-preferences"
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2870
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2871
    ^ self 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2872
        browseAllCallsOn:aSelectorString 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2873
        in:(Smalltalk allClasses)
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2874
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2875
    "
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  2876
     SystemBrowser browseAllCallsOn:#+
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2877
    "
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2878
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  2879
    "Created: 9.12.1995 / 18:00:41 / cg"
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2880
    "Modified: 10.7.1996 / 10:26:15 / cg"
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2881
!
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2882
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2883
browseAllCallsOn:aSelectorString in:aSetOfClasses
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2884
    "launch a browser for all senders of aSelector"
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2885
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2886
    ^ self
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2887
        browseAllCallsOn:aSelectorString 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2888
        in:aSetOfClasses
4200
3859a6fee797 show none found
Claus Gittinger <cg@exept.de>
parents: 4198
diff changeset
  2889
        title:(self classResources string:'Senders of: %1' with:aSelectorString)
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2890
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2891
    "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2892
     SystemBrowser browseAllCallsOn:#+ in:(Number withAllSubclasses)
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2893
    "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2894
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  2895
    "Created: 10.7.1996 / 10:25:49 / cg"
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2896
    "Modified: 24.1.1997 / 19:49:34 / cg"
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2897
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2898
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2899
browseAllCallsOn:aSelectorString in:aSetOfClasses ignoreCase:ignoreCase
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2900
    "launch a browser for all senders of aSelector"
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2901
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2902
    ^ self
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2903
        browseAllCallsOn:aSelectorString 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2904
        in:aSetOfClasses
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2905
        ignoreCase:ignoreCase
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  2906
        title:(self classResources string:'Senders of: %1' with:aSelectorString)
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2907
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2908
    "
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2909
     SystemBrowser browseAllCallsOn:#+ in:(Number withAllSubclasses)
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2910
    "
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2911
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2912
    "Created: 10.7.1996 / 10:25:49 / cg"
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2913
    "Modified: 24.1.1997 / 19:49:34 / cg"
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2914
!
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2915
11271
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2916
browseAllCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:match title:titleArg
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2917
    "launch a browser for all senders of aSelector in aCollectionOfClasses"
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2918
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2919
    |list list2 browser selWithColon title rs|
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2920
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2921
    title := titleArg.
4200
3859a6fee797 show none found
Claus Gittinger <cg@exept.de>
parents: 4198
diff changeset
  2922
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  2923
    list := self allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:true.
4200
3859a6fee797 show none found
Claus Gittinger <cg@exept.de>
parents: 4198
diff changeset
  2924
    list isEmpty ifTrue:[
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2925
        aSelectorString numArgs == 0 ifTrue:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2926
            selWithColon := aSelectorString , ':'.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2927
            selWithColon knownAsSymbol ifTrue:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2928
                list2 := self allCallsOn:selWithColon in:aCollectionOfClasses ignoreCase:ignoreCase match:true.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2929
            ].            
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2930
        ].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2931
        list2 size == 0 ifTrue:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2932
            self showNoneFound:title.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2933
            ^ nil
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2934
        ].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2935
        rs := self classResources.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2936
        (Dialog confirm:((rs string:title) , 
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2937
                         (rs string:'...\\... none found.') ,
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2938
                         (rs string:'\\But I found %1 sends of the "%2" message (with colon).\\Browse those ?'
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2939
                             with:list2 size
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2940
                             with:selWithColon allBold)) withCRs) ifFalse:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2941
            ^ nil
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2942
        ].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2943
        list := list2.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  2944
        title := title , ':'.
4200
3859a6fee797 show none found
Claus Gittinger <cg@exept.de>
parents: 4198
diff changeset
  2945
    ].
3859a6fee797 show none found
Claus Gittinger <cg@exept.de>
parents: 4198
diff changeset
  2946
3859a6fee797 show none found
Claus Gittinger <cg@exept.de>
parents: 4198
diff changeset
  2947
    browser := self browseMethods:list title:title.
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2948
    browser notNil ifTrue:[
648
6ec086b7972c Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents: 634
diff changeset
  2949
        |s|
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2950
8139
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2951
"/        "
17404
8786f9f4241b #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17328
diff changeset
  2952
"/         kludge for now, if it's a multipart selector,
8139
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2953
"/         no easy search is (as yet) possible
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2954
"/        "
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2955
"/        s := aSelectorString.
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2956
"/        (s includes:$:) ifTrue:[
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2957
"/            s := s copyTo:(s indexOf:$:)
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2958
"/        ].
acdaec7c63a0 auto-search for selector (not string) when searching senders.
Claus Gittinger <cg@exept.de>
parents: 8129
diff changeset
  2959
"/        browser autoSearch:s 
16471
ad521c8abbbb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16468
diff changeset
  2960
        browser setSearchSelector:aSelectorString ignoreCase:ignoreCase doMatch:true.
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2961
    ].
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2962
    ^ browser
648
6ec086b7972c Move method's literals form literalArray to indexed instvars.
Stefan Vogel <sv@exept.de>
parents: 634
diff changeset
  2963
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2964
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2965
     SystemBrowser
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2966
        browseAllCallsOn:#+ 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2967
        in:(Number withAllSubclasses) 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2968
        title:'just a test'
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2969
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  2970
11271
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2971
    "Modified: / 24-01-1997 / 19:48:54 / cg"
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2972
    "Created: / 14-02-2012 / 14:19:51 / cg"
17404
8786f9f4241b #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17328
diff changeset
  2973
    "Modified (format): / 13-02-2017 / 20:31:46 / cg"
11271
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2974
!
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2975
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2976
browseAllCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2977
    "launch a browser for all senders of aSelector in aCollectionOfClasses"
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2978
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2979
    ^ self 
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2980
        browseAllCallsOn:aSelectorString 
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2981
        in:aCollectionOfClasses 
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2982
        ignoreCase:ignoreCase 
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2983
        match:true 
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2984
        title:titleArg
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2985
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2986
    "
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2987
     SystemBrowser
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2988
        browseAllCallsOn:#+ 
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2989
        in:(Number withAllSubclasses) 
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2990
        title:'just a test'
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2991
    "
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2992
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  2993
    "Modified: / 14-02-2012 / 14:20:17 / cg"
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2994
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  2995
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2996
browseAllCallsOn:aSelectorString in:aCollectionOfClasses title:title
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2997
    "launch a browser for all senders of aSelector in aCollectionOfClasses"
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2998
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  2999
    ^ self
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3000
        browseAllCallsOn:aSelectorString 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3001
        in:aCollectionOfClasses 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3002
        ignoreCase:false 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3003
        title:title
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3004
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3005
    "
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3006
     SystemBrowser
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3007
        browseAllCallsOn:#+ 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3008
        in:(Number withAllSubclasses) 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3009
        title:'just a test'
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3010
    "
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3011
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3012
    "Modified: 24.1.1997 / 19:48:54 / cg"
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3013
!
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3014
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3015
browseCallsOn:aSelectorString under:aClass
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3016
    "launch a browser for all senders of aSelector in aClass and subclasses"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3017
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3018
    ^ self 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3019
        browseAllCallsOn:aSelectorString
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3020
                      in:(aClass withAllSubclasses)
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3021
                   title:(self classResources 
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  3022
                                string:'Senders of: %1 (in and below %2)'
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3023
                                with:aSelectorString 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3024
                                with:aClass name)
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3025
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3026
    "
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3027
     SystemBrowser browseCallsOn:#+ under:Number
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3028
    "
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3029
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3030
    "Created: 9.12.1995 / 17:59:57 / cg"
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  3031
    "Modified: 24.1.1997 / 19:50:33 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3032
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3033
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3034
browseClassRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3035
    "launch a browser for all methods in aClass where the classVar named
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3036
     aString is referenced; if modsOnly is true, browse only methods where the
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3037
     classvar is modified"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3038
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3039
    ^ self browseRefsTo:aString classVars:true in:aCollectionOfClasses modificationsOnly:modsOnly
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3040
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3041
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3042
browseClassRefsTo:varName in:aCollectionOfClasses modificationsOnly:modsOnly title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3043
    "launch a browser for all methods in aCollectionOfClasses,
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3044
     where the classVar named aString is referenced; 
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3045
     if modsOnly is true, browse only methods where the classvar is modified"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3046
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3047
    ^ self browseRefsTo:varName classVars:true in:aCollectionOfClasses modificationsOnly:modsOnly title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3048
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3049
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3050
browseClassRefsTo:aString under:aClass modificationsOnly:modsOnly
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3051
    "launch a browser for all methods in aClass and subclasses
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3052
     where the classVar named aString is referenced; 
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3053
     if modsOnly is true, browse only methods where the classvar is modified"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3054
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3055
    ^ self browseClassRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3056
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3057
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3058
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3059
browseForResource:aResourceSymbol containing:item in:aCollectionOfClasses title:title
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3060
    "launch a browser for all methods which have a particular (or any, ifNil)
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3061
     resource in aCollectionOfClasses.
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3062
     If aKey is nonNil, only methods which have aKey in the (any) resourceSpec
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3063
     are parsed.
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3064
     I.e. to find all methods, which access the styleSheets, use:
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3065
        browseForResource:#style containing:nil in:... title:...
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3066
     to find methods which access the 'arrowButtonDownForm' styleSheet entry, use:
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3067
        browseForResource:#style containing:'arrowButtonDownForm' in:... title:..."
573
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3068
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
  3069
    |browser searchBlock|
573
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3070
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3071
    "/ search for any resource can be done without looking
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3072
    "/ at the source ...
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3073
    (aResourceSymbol isNil and:[item isNil]) ifTrue:[
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3074
        searchBlock := [:class :method :s | method hasResource]
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3075
    ] ifFalse:[
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3076
        searchBlock := [:class :method :s |
1573
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3077
                            |rsrc val found|
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3078
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3079
                            found := false.
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3080
                            method hasResource ifTrue:[
1573
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3081
                                rsrc := method resources.
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3082
                                rsrc notNil ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3083
                                    aResourceSymbol isNil ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3084
                                        item isNil ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3085
                                            found := true
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3086
                                        ] ifFalse:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3087
                                            rsrc isCollection ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3088
                                                rsrc keysAndValuesDo:[:rsrc :val |
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3089
                                                    val isCollection ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3090
                                                        val do:[:v |
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3091
                                                            found := item match:v printString 
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3092
                                                        ]
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3093
                                                    ] ifFalse:[
1573
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3094
                                                        found := item match:val printString 
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3095
                                                    ]
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3096
                                                ]
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3097
                                            ] ifFalse:[
1573
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3098
                                                found := item match:rsrc printString
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3099
                                            ]
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3100
                                        ]
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3101
                                    ] ifFalse:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3102
                                        (rsrc includesKey:aResourceSymbol) ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3103
                                            item isNil ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3104
                                                found := true
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3105
                                            ] ifFalse:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3106
                                                rsrc isCollection ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3107
                                                    val := rsrc at:aResourceSymbol.
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3108
                                                    val isCollection ifTrue:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3109
                                                        val do:[:v |
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3110
                                                            found := item match:v printString 
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3111
                                                        ]
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3112
                                                    ] ifFalse:[
1573
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3113
                                                        found := item match:val printString 
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3114
                                                    ]
1573
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3115
                                                ] ifFalse:[
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3116
                                                    found := item match:rsrc printString
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3117
                                                ]
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3118
                                            ]
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3119
                                        ]
573
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3120
                                    ]
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3121
                                ].
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3122
                            ].
1356
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3123
                            found
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3124
                       ].
0080df099c35 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1203
diff changeset
  3125
    ].
573
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3126
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3127
    browser := self browseMethodsIn:aCollectionOfClasses
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3128
                              where:searchBlock
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3129
                              title:title.
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3130
    browser notNil ifTrue:[
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3131
        browser autoSearch:'resource:' 
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3132
    ].
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3133
    ^ browser
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3134
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3135
    "
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3136
     SystemBrowser
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3137
        browseForResource:nil
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3138
        in:Smalltalk allClasses
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3139
        title:'methods with a resource'
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3140
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3141
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3142
     SystemBrowser
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3143
        browseForResource:#style
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3144
        containing:nil
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3145
        in:Smalltalk allClasses
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3146
        title:'methods with a #style resource'
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3147
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3148
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3149
     SystemBrowser
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3150
        browseForResource:#style
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3151
        containing:'arrowButton*'
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3152
        in:Smalltalk allClasses
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3153
        title:'methods with a #style resource'
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3154
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3155
1573
4b6ce12dff2b dont duplicate the code in method>>resources
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
  3156
    "Modified: / 22.4.1998 / 10:29:20 / cg"
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3157
!
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3158
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3159
browseForResource:aResourceSymbol in:aCollectionOfClasses title:title
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3160
    "launch a browser for all methods which have a particular (or any, ifNil)
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3161
     resource in aCollectionOfClasses"
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3162
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3163
    ^ self
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3164
        browseForResource:aResourceSymbol
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3165
        containing:nil
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3166
        in:aCollectionOfClasses 
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3167
        title:title
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3168
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3169
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3170
     SystemBrowser
573
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3171
        browseForResource:#style
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3172
        in:Smalltalk allClasses
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3173
        title:'methods accessing styleSheet values'
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3174
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3175
    "
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3176
     SystemBrowser
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3177
        browseForResource:#keyboard
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3178
        in:Smalltalk allClasses
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3179
        title:'methods handling keyboard events'
573
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3180
    "
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3181
    "
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3182
     SystemBrowser
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3183
        browseForResource:nil
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3184
        in:Smalltalk allClasses
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3185
        title:'methods with a resource'
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3186
    "
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3187
929
a2275f1b4c94 enhanced resource search, to search for a particular
Claus Gittinger <cg@exept.de>
parents: 825
diff changeset
  3188
    "Modified: 9.1.1997 / 12:44:38 / cg"
573
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3189
!
e32bd3e46a72 added startup for searching resourceSpecs
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  3190
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3191
browseForString:aString
16471
ad521c8abbbb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16468
diff changeset
  3192
    <resource: #obsolete>
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3193
    "launch a browser for all methods containing a string in their source.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3194
     This may be slow, since source-code has to be scanned."
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3195
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3196
    ^ self browseForString:aString in:(Smalltalk allClasses) ignoreCase:false
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3197
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3198
    "Modified: / 18.6.1998 / 16:42:39 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3199
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3200
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3201
browseForString:aString in:aCollectionOfClasses
16471
ad521c8abbbb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16468
diff changeset
  3202
    <resource: #obsolete>
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3203
    "launch a browser for all methods in aCollectionOfClasses  
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3204
     containing a string in their source.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3205
     This may be slow, since source-code has to be scanned."
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3206
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3207
    ^ self
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3208
        browseForString:aString 
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3209
        in:aCollectionOfClasses 
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3210
        ignoreCase:false
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3211
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3212
    "
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3213
     SystemBrowser browseForString:'all'      in:(Array with:Object)
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3214
     SystemBrowser browseForString:'should'   in:(Array with:Object)
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3215
     SystemBrowser browseForString:'[eE]rror' in:(Array with:Object)
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3216
    "
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3217
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3218
    "Created: / 9.12.1995 / 18:03:12 / cg"
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3219
    "Modified: / 18.6.1998 / 16:43:27 / cg"
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3220
!
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3221
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3222
browseForString:aString in:aCollectionOfClasses ignoreCase:ignoreCase
16471
ad521c8abbbb #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16468
diff changeset
  3223
    <resource: #obsolete>
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3224
    "launch a browser for all methods in aCollectionOfClasses  
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3225
     containing a string in their source.
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3226
     This may be slow, since source-code has to be scanned."
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3227
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3228
    |browser searchBlock title s|
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3229
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  3230
    title := self classResources string:'Methods containing: %1' with:aString displayString.
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3231
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3232
    (aString includesMatchCharacters
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3233
    or:[ignoreCase]) ifTrue:[
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3234
        s := '*' , aString , '*'.
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3235
        "a matchString"
475
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3236
        searchBlock := [:c :m :sel | 
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3237
                            |src|       
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3238
                            src := m source.
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3239
                            src isNil ifTrue:[
2208
e077aa992f7a check for nil source in #allCallsOn: (for methods where src in not available)
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  3240
                                ('Browser [info]: no source for ' , m printString) infoPrintCR.
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3241
                                false
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3242
                            ] ifFalse:[
13438
06f6d5fc73ef class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13365
diff changeset
  3243
                                s match:src caseSensitive:ignoreCase not
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3244
                            ]
475
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3245
                       ]
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3246
    ] ifFalse:[
475
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3247
        searchBlock := [:c :m :sel | 
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3248
                            |src|
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3249
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3250
                            src := m source.
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3251
                            src isNil ifTrue:[
2208
e077aa992f7a check for nil source in #allCallsOn: (for methods where src in not available)
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  3252
                                ('Browser [info]: no source for ' , m printString) infoPrintCR.
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3253
                                false
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3254
                            ] ifFalse:[
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3255
                                (src findString:aString) ~~ 0
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3256
                            ]
475
b14b3ab39af6 dont crash if searching a string in a method which has no accessable source
Claus Gittinger <cg@exept.de>
parents: 436
diff changeset
  3257
                       ]
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3258
    ].
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3259
    browser := self browseMethodsIn:aCollectionOfClasses where:searchBlock title:title.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3260
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3261
    browser notNil ifTrue:[
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3262
        browser autoSearch:aString ignoreCase:ignoreCase
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3263
    ].
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3264
    ^ browser
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3265
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3266
    "
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3267
     SystemBrowser browseForString:'all'      in:(Array with:Object)
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3268
     SystemBrowser browseForString:'should'   in:(Array with:Object)
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3269
     SystemBrowser browseForString:'[eE]rror' in:(Array with:Object)
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3270
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3271
1703
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3272
    "Created: / 18.6.1998 / 16:42:50 / cg"
ea66390f879b added ignoreCase option to string-search.
Claus Gittinger <cg@exept.de>
parents: 1681
diff changeset
  3273
    "Modified: / 18.6.1998 / 16:51:25 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3274
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3275
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3276
browseForSymbol:aSymbol
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3277
    "launch a browser for all methods referencing aSymbol"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3278
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3279
    ^ self 
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3280
        browseForSymbol:aSymbol 
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  3281
        title:(self classResources string:'Users of: %1' with:aSymbol) 
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3282
        warnIfNone:true
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3283
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3284
    "Created: 9.12.1995 / 18:04:34 / cg"
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3285
    "Modified: 10.7.1996 / 10:35:34 / cg"
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3286
!
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3287
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3288
browseForSymbol:aSymbol in:aSetOfClasses title:title warnIfNone:doWarn
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3289
    "launch a browser for all methods referencing aSymbol"
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3290
7914
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  3291
    ^ self
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  3292
        browseForSymbol:aSymbol 
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  3293
        in:aSetOfClasses 
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  3294
        title:title 
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  3295
        warnIfNone:doWarn
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  3296
        searchFor:aSymbol
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3297
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3298
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3299
browseForSymbol:aSymbol in:aSetOfClasses title:title warnIfNone:doWarn searchFor:searchString
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3300
    "launch a browser for all methods referencing aSymbol"
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3301
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3302
    |browser searchBlock sym|
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3303
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3304
    (aSymbol includesMatchCharacters) ifTrue:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3305
        "a matchString"
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3306
        searchBlock := [:c :m :s |
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3307
                            (m literalsDetect:[:aLiteral|
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3308
                                (aLiteral isMemberOf:Symbol) 
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3309
                                  and:[aSymbol match:aLiteral]
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3310
                            ] ifNone:nil) notNil
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3311
                       ].
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3312
    ] ifFalse:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3313
        "
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3314
         can do a faster search
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3315
        "
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3316
        sym := aSymbol asSymbolIfInterned.
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3317
        sym isNil ifTrue:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3318
            self showNoneFound:title.
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3319
            ^ nil
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3320
        ].
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3321
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3322
        searchBlock := [:c :m :s |
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3323
                            (m literalsDetect:[:aLiteral|
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3324
                                (sym == aLiteral) 
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3325
                            ] ifNone:nil) notNil
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3326
                       ].
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3327
    ].
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3328
    doWarn ifFalse:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3329
        WarningSignal ignoreIn:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3330
            browser := self browseMethodsIn:aSetOfClasses where:searchBlock title:title.
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3331
        ]
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3332
    ] ifTrue:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3333
        browser := self browseMethodsIn:aSetOfClasses where:searchBlock title:title.
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3334
    ].
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3335
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3336
    (browser notNil 
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3337
    and:[searchString notNil]) ifTrue:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3338
        browser autoSearch:searchString
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3339
    ].
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3340
    ^ browser
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3341
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3342
    "Modified: 24.6.1996 / 14:39:07 / stefan"
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3343
    "Modified: 30.6.1996 / 16:45:25 / cg"
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3344
    "Created: 31.10.1996 / 14:57:30 / cg"
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3345
!
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3346
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3347
browseForSymbol:aSymbol title:title ifNone:actionIfNoneFound searchFor:searchString
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3348
    "launch a browser for all methods referencing aSymbol"
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3349
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  3350
    |browser searchBlock|
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  3351
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  3352
    searchBlock := self searchBlockForSymbol:aSymbol.
12866
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  3353
    searchBlock == false ifTrue:[
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  3354
        actionIfNoneFound value.
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  3355
        ^ nil
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  3356
    ].
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3357
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3358
    WarningSignal ignoreIn:[
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3359
        InformationSignal ignoreIn:[
375
a82f2fe29802 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
  3360
            browser := self browseMethodsWhere:searchBlock title:title.
a82f2fe29802 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
  3361
        ]
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3362
    ].
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3363
    browser isNil ifTrue:[
12866
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  3364
        actionIfNoneFound value.
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  3365
        ^ nil
215
244f3a9b2a60 check for existing class in rename; avoid warnbox if no refs are found after rename
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3366
    ].
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3367
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  3368
    (browser notNil and:[searchString notNil]) ifTrue:[
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3369
        browser autoSearch:searchString
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3370
    ].
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3371
    ^ browser
375
a82f2fe29802 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
  3372
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  3373
    "Modified: / 24-06-1996 / 14:39:07 / stefan"
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  3374
    "Created: / 31-10-1996 / 14:45:08 / cg"
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  3375
    "Modified: / 22-03-2012 / 06:58:07 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3376
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3377
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3378
browseForSymbol:aSymbol title:title warnIfNone:doWarn
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3379
    "launch a browser for all methods referencing aSymbol"
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3380
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3381
    ^ self
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3382
        browseForSymbol:aSymbol 
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3383
        title:title 
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3384
        warnIfNone:doWarn 
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3385
        searchFor:aSymbol
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3386
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3387
    "Modified: 31.10.1996 / 14:45:38 / cg"
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3388
!
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3389
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3390
browseForSymbol:aSymbol title:title warnIfNone:doWarn searchFor:searchString
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3391
    "launch a browser for all methods referencing aSymbol"
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3392
2414
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3393
    |b|
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3394
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3395
    doWarn ifTrue: [
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3396
        b := [self showNoneFound:title]
2414
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3397
    ].
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3398
    ^ self
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3399
        browseForSymbol:aSymbol 
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3400
        title:title 
2414
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3401
        ifNone:b
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3402
        searchFor:searchString
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3403
!
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3404
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3405
browseImplementorsMatching:aSelectorString
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3406
    "launch a browser for all implementors of aSelector"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3407
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3408
    ^ self 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3409
        browseImplementorsMatching:aSelectorString 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3410
        in:(Smalltalk allClasses)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3411
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3412
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3413
     SystemBrowser browseImplementorsOf:#+
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3414
     NewSystemBrowser browseImplementorsOf:#+
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3415
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3416
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3417
    "Created: / 9.12.1995 / 18:01:18 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3418
    "Modified: / 5.11.2001 / 17:31:11 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3419
!
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3420
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3421
browseImplementorsMatching:aSelectorString in:aSetOfClasses
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3422
    "launch a browser for all implementors of aSelector"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3423
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3424
    ^ self 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3425
        browseImplementorsMatching:aSelectorString
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3426
        in:aSetOfClasses
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3427
        title:(self classResources string:'implementors of: %1' with:aSelectorString)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3428
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3429
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3430
     SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3431
     NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3432
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3433
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3434
    "Created: / 10.7.1996 / 10:20:59 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3435
    "Modified: / 5.11.2001 / 17:30:57 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3436
!
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3437
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3438
browseImplementorsMatching:aSelectorString in:aSetOfClasses ignoreCase:ignoreCase
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3439
    "launch a browser for all implementors of aSelector"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3440
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3441
    ^ self 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3442
        browseImplementorsMatching:aSelectorString
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3443
        in:aSetOfClasses
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3444
        ignoreCase:ignoreCase
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3445
        title:(self classResources string:'implementors of: %1' with:aSelectorString)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3446
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3447
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3448
     SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3449
     NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3450
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3451
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3452
    "Created: / 10.7.1996 / 10:20:59 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3453
    "Modified: / 5.11.2001 / 17:30:43 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3454
!
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3455
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3456
browseImplementorsMatching:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:title
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3457
    "launch a browser for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  3458
     the classes contained in aCollectionOfClasses and their metaclasses"
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3459
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3460
    |list|
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3461
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3462
    list := self 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3463
                findImplementorsMatching:aSelectorString 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3464
                in:aCollectionOfClasses 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3465
                ignoreCase:ignoreCase.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3466
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3467
    list size == 0 ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3468
        self showNoneFound:title.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3469
        ^ nil
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3470
    ].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3471
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3472
    ^ self browseMethods:list asOrderedCollection title:title
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3473
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3474
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3475
     SystemBrowser browseImplementorsOf:#+
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3476
                                     in:(Array with:Number
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3477
                                               with:Float
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3478
                                               with:SmallInteger)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3479
                                  title:'some implementors of +'
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3480
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3481
     NewSystemBrowser browseImplementorsOf:#+
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3482
                                     in:(Array with:Number
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3483
                                               with:Float
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3484
                                               with:SmallInteger)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3485
                                  title:'some implementors of +'
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3486
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3487
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3488
    "Modified: / 4.9.1995 / 17:33:39 / claus"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3489
    "Modified: / 19.6.1996 / 14:19:02 / stefan"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3490
    "Modified: / 5.11.2001 / 17:30:38 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3491
!
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3492
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3493
browseImplementorsMatching:aSelectorString in:aCollectionOfClasses title:title
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3494
    "launch a browser for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  3495
     the classes contained in aCollectionOfClasses and their metaclasses"
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3496
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3497
    ^ self
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3498
        browseImplementorsMatching:aSelectorString 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3499
        in:aCollectionOfClasses 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3500
        ignoreCase:false
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3501
        title:title
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3502
!
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3503
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3504
browseImplementorsMatching:aSelectorString under:aClass
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3505
    "launch a browser for all implementors of aSelector in aClass
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3506
     and its subclasses"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3507
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3508
    ^ self 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3509
        browseImplementorsMatching:aSelectorString
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3510
        in:(aClass withAllSubclasses)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3511
        title:(self classResources 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3512
                string:'implementors of: %1 (in and below %2)' 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3513
                with:aSelectorString
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3514
                with:aClass name)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3515
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3516
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3517
     SystemBrowser browseImplementorsOf:#+ under:Integer
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3518
     NewSystemBrowser browseImplementorsOf:#+ under:Integer
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3519
    "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3520
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3521
    "Created: / 9.12.1995 / 18:06:09 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3522
    "Modified: / 5.11.2001 / 17:30:15 / cg"
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3523
!
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3524
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3525
browseImplementorsOf:aSelectorString
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3526
    "launch a browser for all implementors of aSelector"
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3527
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3528
    ^ self 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3529
        browseImplementorsOf:aSelectorString 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3530
        in:(Smalltalk allClasses)
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3531
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3532
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3533
     SystemBrowser browseImplementorsOf:#+
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3534
     NewSystemBrowser browseImplementorsOf:#+
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3535
    "
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3536
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3537
    "Created: / 9.12.1995 / 18:01:18 / cg"
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3538
    "Modified: / 5.11.2001 / 17:31:11 / cg"
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3539
!
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3540
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3541
browseImplementorsOf:aSelectorString in:aSetOfClasses
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3542
    "launch a browser for all implementors of aSelector"
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3543
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3544
    ^ self 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3545
        browseImplementorsOf:aSelectorString
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3546
        in:aSetOfClasses
8704
f5b8ba75a158 some code cleanup
Claus Gittinger <cg@exept.de>
parents: 8702
diff changeset
  3547
        title:(self classResources string:'Implementors of: %1' with:aSelectorString allBold)
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3548
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3549
    "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3550
     SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3551
     NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3552
    "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3553
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3554
    "Created: / 10.7.1996 / 10:20:59 / cg"
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3555
    "Modified: / 5.11.2001 / 17:30:57 / cg"
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3556
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3557
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3558
browseImplementorsOf:aSelectorString in:aSetOfClasses ignoreCase:ignoreCase
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3559
    "launch a browser for all implementors of aSelector"
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3560
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3561
    ^ self 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3562
        browseImplementorsOf:aSelectorString
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3563
        in:aSetOfClasses
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3564
        ignoreCase:ignoreCase
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  3565
        title:(self classResources string:'Implementors of: %1' with:aSelectorString)
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3566
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3567
    "
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3568
     SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3569
     NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3570
    "
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3571
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3572
    "Created: / 10.7.1996 / 10:20:59 / cg"
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3573
    "Modified: / 5.11.2001 / 17:30:43 / cg"
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3574
!
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3575
11271
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3576
browseImplementorsOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch title:titleArg
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3577
    "launch a browser for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  3578
     the classes contained in aCollectionOfClasses and their metaclasses"
11271
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3579
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3580
    doMatch ifTrue:[
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3581
        self browseImplementorsOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3582
    ] ifFalse:[
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3583
        self browseImplementorsMatching:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3584
    ].
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3585
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3586
    "Created: / 14-02-2012 / 13:55:23 / cg"
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3587
!
efce0b7d3072 class definition
Claus Gittinger <cg@exept.de>
parents: 10897
diff changeset
  3588
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3589
browseImplementorsOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase title:titleArg
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3590
    "launch a browser for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  3591
     the classes contained in aCollectionOfClasses and their metaclasses"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3592
17180
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3593
    |list list2 rs selWithColon title top20 allSelectors choice but globalClass global globalName lcSelector|
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3594
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3595
    title := titleArg.
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  3596
    list := self 
15206
988be4fe570b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15075
diff changeset
  3597
                findImplementors:aSelectorString 
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  3598
                in:aCollectionOfClasses 
15206
988be4fe570b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15075
diff changeset
  3599
                ignoreCase:ignoreCase
988be4fe570b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15075
diff changeset
  3600
                match:(aSelectorString includesMatchCharacters and:[aSelectorString ~= '*']).
45
950b84ba89e6 *** empty log message ***
claus
parents: 41
diff changeset
  3601
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  3602
    list size == 0 ifTrue:[
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3603
        aSelectorString numArgs == 0 ifTrue:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3604
            selWithColon := aSelectorString , ':'.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3605
            selWithColon knownAsSymbol ifTrue:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3606
                list2 := self findImplementorsOf:selWithColon in:aCollectionOfClasses ignoreCase:ignoreCase.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3607
            ].            
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3608
        ].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3609
        list2 size == 0 ifTrue:[
8678
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3610
            "/ self showNoneFound:title.
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3611
            "/ ^ self
17180
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3612
            lcSelector := aSelectorString asLowercase.
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3613
            
8688
71d973fdd817 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8685
diff changeset
  3614
            allSelectors := Set new.
8678
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3615
            top20 := SortedCollection new.
17180
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3616
            top20 
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3617
                sortBlock:[:a :b | 
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3618
                    |isPrefixOfA isPrefixOfB aDist bDist|
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3619
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3620
                    isPrefixOfA := (a asLowercase startsWith:lcSelector).
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3621
                    isPrefixOfB := (b asLowercase startsWith:lcSelector).
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3622
                    (isPrefixOfA and:[isPrefixOfB not])
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3623
                    or:[ 
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3624
                        aDist := (a spellAgainst:aSelectorString).
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3625
                        bDist := (b spellAgainst:aSelectorString).
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3626
                        (isPrefixOfA and:[isPrefixOfB and:[aDist > bDist]])     
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3627
                        or:[ isPrefixOfB not and:[ aDist > bDist ]]]
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3628
                ].
8759
1ef143757126 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8704
diff changeset
  3629
            Smalltalk allMethodsWithSelectorDo:[:eachMethod :eachSelector |
17180
4ac997b21c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17056
diff changeset
  3630
                ((eachSelector asLowercase startsWith:lcSelector) or:[(eachSelector spellAgainst:aSelectorString) > 50]) ifTrue:[    
8759
1ef143757126 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8704
diff changeset
  3631
                    (allSelectors includes:eachSelector) ifFalse:[
1ef143757126 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8704
diff changeset
  3632
                        allSelectors add:eachSelector.
1ef143757126 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8704
diff changeset
  3633
                        top20 add:eachSelector.
1ef143757126 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8704
diff changeset
  3634
                        top20 size > 20 ifTrue:[ top20 removeLast. allSelectors := top20 asSet ].
1ef143757126 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8704
diff changeset
  3635
                    ]
8678
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3636
                ]
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3637
            ].
9685
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3638
            top20 isEmpty ifTrue:[
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3639
                Smalltalk allMethodsWithSelectorDo:[:eachMethod :eachSelector |
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3640
                    (eachSelector asLowercase spellAgainst:lcSelector) > 50 ifTrue:[    
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3641
                        (allSelectors includes:eachSelector) ifFalse:[
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3642
                            allSelectors add:eachSelector.
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3643
                            top20 add:eachSelector.
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3644
                            top20 size > 20 ifTrue:[ top20 removeLast. allSelectors := top20 asSet ].
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3645
                        ]
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3646
                    ]
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3647
                ].
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3648
            ].
15499
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3649
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3650
            "/ for your convenience: look for a global class by that name, and offer browsing the class
12621
a0af9112b051 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12575
diff changeset
  3651
            but := ''.
13128
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3652
            (globalClass := Smalltalk classNamed:aSelectorString) notNil ifTrue:[
12575
7fd56ce01f68 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12504
diff changeset
  3653
                top20 := (OrderedCollection withAll:top20) addFirst:('>> Browse class ',aSelectorString,' <<'); yourself.
12621
a0af9112b051 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12575
diff changeset
  3654
                but := '\But there exists a class by that name.'.
13128
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3655
            ] ifFalse:[
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3656
                (aSelectorString knownAsSymbol 
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3657
                and:[ (global := Smalltalk at:aSelectorString asSymbol) notNil ])
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3658
                ifTrue:[
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3659
                    global isBehavior ifTrue:[ 
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3660
                        top20 := (OrderedCollection withAll:top20) addFirst:('>> Browse alias ',aSelectorString,' <<'); yourself.
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3661
                        but := '\But there exists a global alias by that name.'.
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3662
                        globalClass := global
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3663
                    ] ifFalse:[
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3664
                        top20 := (OrderedCollection withAll:top20) addFirst:('>> Browse class of ',aSelectorString,' <<'); yourself.
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3665
                        but := '\But there exists a global by that name.'.
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3666
                        globalClass := global class.
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3667
                    ]
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3668
                ].
12575
7fd56ce01f68 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12504
diff changeset
  3669
            ].
15499
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3670
            "/ for your convenience: look for any namespace class by that name, and offer browsing the class
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3671
            but isEmpty ifTrue:[
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3672
                globalName := Smalltalk keys  
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3673
                                detect:[:nm | (nm includesString:'::')
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3674
                                               and:[ (nm includesString:aSelectorString) 
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3675
                                               and:[ (nm endsWith:('::',aSelectorString)) ]]] 
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3676
                                ifNone:nil. 
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3677
                globalName notNil ifTrue:[
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3678
                    globalClass := Smalltalk at:globalName.
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3679
                    globalClass isBehavior ifTrue:[
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3680
                        top20 := (OrderedCollection withAll:top20) addFirst:('>> Browse class ',globalClass name,' <<'); yourself.
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3681
                        but := '\But there exists a class in some namespace by that name.'.
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3682
                    ].
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3683
                ].
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3684
            ].
387151a8648c class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15362
diff changeset
  3685
8678
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3686
            choice := Dialog 
18869
b2a1d8c43b95 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 18807
diff changeset
  3687
                choose:(title,(self resources string:' - none found.'),but,(self resources stringWithCRs:'\\Browse implementors of a similar selector or cancel:'))
8678
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3688
                fromList:top20 
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3689
                lines:10.
13128
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3690
8678
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3691
            choice notEmptyOrNil ifTrue:[
12575
7fd56ce01f68 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12504
diff changeset
  3692
                (choice startsWith:'>>') ifTrue:[
13128
6f770c1da3f5 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13071
diff changeset
  3693
                    self openInClass:globalClass selector:nil.
12575
7fd56ce01f68 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12504
diff changeset
  3694
                ] ifFalse:[
7fd56ce01f68 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12504
diff changeset
  3695
                    self browseImplementorsOf:choice in:aCollectionOfClasses ignoreCase:ignoreCase title:'Implementors of ',choice.
7fd56ce01f68 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12504
diff changeset
  3696
                ]
8678
7d5bb9de7f7d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8554
diff changeset
  3697
            ].
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3698
            ^ nil
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3699
        ].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3700
        rs := self classResources.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3701
        (Dialog confirm:((rs string:title) , 
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3702
                         (rs string:'...\\... none found.') ,
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3703
                         (rs string:'\\But I found %1 implementor(s) of the "%2" message (with colon).\\Browse those ?'
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3704
                             with:list2 size
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3705
                             with:selWithColon allBold)) withCRs) ifFalse:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3706
            ^ nil
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3707
        ].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3708
        list := list2.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3709
        title := title , ':'.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  3710
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3711
    ].
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3712
270
f97a37f5df7a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 256
diff changeset
  3713
    ^ self browseMethods:list asOrderedCollection title:title
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3714
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3715
    "
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3716
     SystemBrowser browseImplementorsOf:#+
270
f97a37f5df7a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 256
diff changeset
  3717
                                     in:(Array with:Number
f97a37f5df7a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 256
diff changeset
  3718
                                               with:Float
f97a37f5df7a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 256
diff changeset
  3719
                                               with:SmallInteger)
f97a37f5df7a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 256
diff changeset
  3720
                                  title:'some implementors of +'
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3721
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3722
     NewSystemBrowser browseImplementorsOf:#+
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3723
                                     in:(Array with:Number
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3724
                                               with:Float
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3725
                                               with:SmallInteger)
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3726
                                  title:'some implementors of +'
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3727
    "
132
claus
parents: 118
diff changeset
  3728
9685
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3729
    "Modified: / 04-09-1995 / 17:33:39 / claus"
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3730
    "Modified: / 19-06-1996 / 14:19:02 / stefan"
629e1d789a2d changed: #browseImplementorsOf:in:ignoreCase:title:
Claus Gittinger <cg@exept.de>
parents: 9660
diff changeset
  3731
    "Modified: / 15-01-2011 / 14:35:56 / cg"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3732
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3733
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3734
browseImplementorsOf:aSelectorString in:aCollectionOfClasses title:title
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3735
    "launch a browser for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  3736
     the classes contained in aCollectionOfClasses and their metaclasses"
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3737
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3738
    ^ self
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3739
        browseImplementorsOf:aSelectorString 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3740
        in:aCollectionOfClasses 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3741
        ignoreCase:false
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3742
        title:title
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3743
!
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3744
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3745
browseImplementorsOf:aSelectorString under:aClass
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3746
    "launch a browser for all implementors of aSelector in aClass
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3747
     and its subclasses"
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3748
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3749
    ^ self 
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3750
        browseImplementorsOf:aSelectorString
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3751
        in:(aClass withAllSubclasses)
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3752
        title:(self classResources 
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  3753
                string:'Implementors of: %1 (in and below %2)' 
2623
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3754
                with:aSelectorString
9e488daf53da allow for senders/implementors to be searched with caseIgnore
Claus Gittinger <cg@exept.de>
parents: 2551
diff changeset
  3755
                with:aClass name)
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3756
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3757
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3758
     SystemBrowser browseImplementorsOf:#+ under:Integer
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3759
     NewSystemBrowser browseImplementorsOf:#+ under:Integer
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3760
    "
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  3761
3360
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3762
    "Created: / 9.12.1995 / 18:06:09 / cg"
2eab40d1a498 isMeta/soleInstance -> theNonMetaclass
Claus Gittinger <cg@exept.de>
parents: 3354
diff changeset
  3763
    "Modified: / 5.11.2001 / 17:30:15 / cg"
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3764
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3765
3663
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3766
browseImplementorsOfAny:setOfSelectors 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3767
    "launch a browser for all implementors of aSelector"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3768
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3769
    ^ self 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3770
        browseImplementorsOfAny:setOfSelectors
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3771
        in:(Smalltalk allClasses)
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3772
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3773
    "
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3774
     SystemBrowser browseImplementorsOfAny:#( #+ #- )
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3775
     NewSystemBrowser browseImplementorsOfAny:#( #+ #- )
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3776
    "
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3777
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3778
    "Created: / 9.12.1995 / 18:01:18 / cg"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3779
    "Modified: / 5.11.2001 / 17:31:11 / cg"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3780
!
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3781
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3782
browseImplementorsOfAny:setOfSelectors in:aSetOfClasses
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3783
    "launch a browser for all implementors of aSelector"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3784
8047
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3785
    |title|
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3786
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3787
    setOfSelectors size == 1 ifTrue:[
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3788
        title := self classResources 
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3789
                string:'Implementors of %1' 
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3790
                with:(setOfSelectors asOrderedCollection first).
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3791
    ] ifFalse:[
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3792
        setOfSelectors size == 2 ifTrue:[
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3793
            title := self classResources 
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3794
                    string:'Implementors of %1 or %2' 
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3795
                    with:(setOfSelectors asOrderedCollection first)
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3796
                    with:(setOfSelectors asOrderedCollection second).
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3797
        ] ifFalse:[
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3798
            title := self classResources string:'Implementors of some'.
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3799
        ].
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3800
    ].
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3801
3663
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3802
    ^ self 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3803
        browseImplementorsOfAny:setOfSelectors
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3804
        in:aSetOfClasses
8047
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  3805
        title:title
3663
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3806
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3807
    "
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3808
     SystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3809
     NewSystemBrowser browseImplementorsOf:#+ in:(Number withAllSubclasses)
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3810
    "
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3811
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3812
    "Created: / 10.7.1996 / 10:20:59 / cg"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3813
    "Modified: / 5.11.2001 / 17:30:57 / cg"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3814
!
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3815
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3816
browseImplementorsOfAny:setOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase title:title
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3817
    "launch a browser for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  3818
     the classes contained in aCollectionOfClasses and their metaclasses"
3663
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3819
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3820
    |list|
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3821
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3822
    list := self 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3823
                findImplementorsOfAny:setOfSelectors 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3824
                in:aCollectionOfClasses 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3825
                ignoreCase:ignoreCase.
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3826
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3827
    list size == 0 ifTrue:[
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3828
        self showNoneFound:title.
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3829
        ^ nil
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3830
    ].
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3831
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3832
    ^ self browseMethods:list asOrderedCollection title:title
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3833
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3834
    "
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3835
     SystemBrowser browseImplementorsOf:#+
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3836
                                     in:(Array with:Number
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3837
                                               with:Float
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3838
                                               with:SmallInteger)
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3839
                                  title:'some implementors of +'
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3840
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3841
     NewSystemBrowser browseImplementorsOf:#+
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3842
                                     in:(Array with:Number
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3843
                                               with:Float
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3844
                                               with:SmallInteger)
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3845
                                  title:'some implementors of +'
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3846
    "
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3847
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3848
    "Modified: / 4.9.1995 / 17:33:39 / claus"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3849
    "Modified: / 19.6.1996 / 14:19:02 / stefan"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3850
    "Modified: / 5.11.2001 / 17:30:38 / cg"
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3851
!
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3852
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3853
browseImplementorsOfAny:setOfSelectors in:aCollectionOfClasses title:title
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3854
    "launch a browser for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  3855
     the classes contained in aCollectionOfClasses and their metaclasses"
3663
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3856
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3857
    ^ self
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3858
        browseImplementorsOfAny:setOfSelectors 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3859
        in:aCollectionOfClasses 
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3860
        ignoreCase:false
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3861
        title:title
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3862
!
5163f3c2d560 findImplementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 3626
diff changeset
  3863
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3864
browseInstRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3865
    "launch a browser for all methods in aClass where the instVar named
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3866
     aString is referenced; if modsOnly is true, browse only methods where the
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3867
     instvar is modified"
45
950b84ba89e6 *** empty log message ***
claus
parents: 41
diff changeset
  3868
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3869
    ^ self browseRefsTo:aString classVars:false in:aCollectionOfClasses modificationsOnly:modsOnly
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3870
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3871
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3872
browseInstRefsTo:varName in:aCollectionOfClasses modificationsOnly:modsOnly title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3873
    "launch a browser for all methods in aClass where the instVar named
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3874
     varName is referenced; if modsOnly is true, browse only methods where the
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3875
     instvar is modified"
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3876
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3877
    ^ self browseRefsTo:varName classVars:false in:aCollectionOfClasses modificationsOnly:modsOnly title:title
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3878
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  3879
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3880
browseInstRefsTo:aString under:aClass modificationsOnly:modsOnly
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3881
    "launch a browser for all methods in aClass and subclasses
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3882
     where the instVar named aString is referenced; 
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3883
     if modsOnly is true, browse only methods where the instvar is modified"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3884
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  3885
    ^ self browseInstRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3886
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3887
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3888
browseReferendsOf:aGlobalName
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3889
    "launch a browser for all methods referencing a global
1367
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  3890
     named aGlobalName. The argument may be a symbol, a string or
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  3891
     a matchPattern.
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3892
    "
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3893
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3894
    ^ self browseReferendsOf:aGlobalName warnIfNone:true 
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3895
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3896
   "
14944
5893ae3af14b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14653
diff changeset
  3897
    UserPreferences current systemBrowserClass browseReferendsOf:#Transcript
5893ae3af14b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14653
diff changeset
  3898
    UserPreferences current systemBrowserClass browseReferendsOf:'Tr*'
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3899
   "
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
  3900
1367
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  3901
    "Modified: / 30.10.1997 / 23:45:52 / cg"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3902
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  3903
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3904
browseReferendsOf:aGlobalName ifNone:actionIfNone
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3905
    "launch a browser for all methods referencing a global
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3906
     named aGlobalName.
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3907
    "
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3908
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3909
    ^ self
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3910
        browseReferendsOf:aGlobalName 
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  3911
        title:(self classResources string:'Users of: %1' with:aGlobalName)
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3912
        ifNone:actionIfNone
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3913
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3914
    "Modified: / 31.10.1997 / 15:42:05 / cg"
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3915
!
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3916
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3917
browseReferendsOf:aGlobalName in:aSetOfClasses
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3918
    "launch a browser for all methods referencing a global
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3919
     named aGlobalName.
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3920
    "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3921
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3922
    ^ self browseReferendsOf:aGlobalName in:aSetOfClasses warnIfNone:true 
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3923
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3924
   "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3925
    Browser browseReferendsOf:#Transcript
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3926
   "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3927
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3928
    "Created: 10.7.1996 / 10:37:30 / cg"
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3929
!
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3930
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3931
browseReferendsOf:aGlobalName in:aSetOfClasses warnIfNone:doWarn
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3932
    "launch a browser for all methods referencing a global
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3933
     named aGlobalName.
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3934
    "
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3935
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3936
    |globalsPlainName idx|
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3937
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3938
    globalsPlainName := aGlobalName.
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3939
    (idx := globalsPlainName lastIndexOf:$:) ~~ 0 ifTrue:[
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3940
        globalsPlainName := globalsPlainName copyFrom:idx+1
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3941
    ].
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3942
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3943
    ^ self browseForSymbol:aGlobalName
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3944
                        in:aSetOfClasses
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  3945
                     title:(self classResources string:'Users of: %1' with:aGlobalName) 
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3946
                warnIfNone:doWarn
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3947
                 searchFor:globalsPlainName
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3948
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3949
    "Created: 10.7.1996 / 10:37:02 / cg"
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  3950
    "Modified: 31.10.1996 / 14:56:38 / cg"
666
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3951
!
c349555a5550 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 653
diff changeset
  3952
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3953
browseReferendsOf:aGlobalName title:title ifNone:actionIfNone
17967
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  3954
    "launch a browser for all methods referencing a global named aGlobalName.
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  3955
     If aGlobalName is inside a namespace (a private or namespace-global),
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  3956
     the search should be for a global named <namespace>::<aGlobalName>"
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3957
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3958
    |searchBlock browser|
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3959
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3960
    searchBlock := self searchBlockForReferendsOf:aGlobalName.
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3961
    browser := self 
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3962
                browseMethodsWhere:searchBlock 
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3963
                title:title 
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3964
                ifNone:[
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3965
                    actionIfNone value. 
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3966
                    ^ nil
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3967
                ].
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3968
2828
6e54ebb9b75e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  3969
    browser isNil ifTrue:[
6e54ebb9b75e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  3970
        actionIfNone value
6e54ebb9b75e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  3971
    ] ifFalse:[
9010
fa5c1fef4aef changed: #browseReferendsOf:title:ifNone:
Claus Gittinger <cg@exept.de>
parents: 9007
diff changeset
  3972
        browser autoSearchVariable:aGlobalName.
2828
6e54ebb9b75e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  3973
    ].
6e54ebb9b75e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2826
diff changeset
  3974
    ^ browser
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3975
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3976
    "
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3977
     Tools::NewSystemBrowser browseReferendsOf:'SortedCollection' title:'foo' ifNone:[ self halt ]
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  3978
    "
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3979
!
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3980
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3981
browseReferendsOf:aGlobalName title:title warnIfNone:doWarn
17967
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  3982
    "launch a browser for all methods referencing a global named aGlobalName.
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  3983
     If aGlobalName is inside a namespace (a private or namespace-global),
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  3984
     the search should be for a global named <namespace>::<aGlobalName>"
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3985
2414
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3986
    |b|
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3987
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3988
    doWarn ifTrue: [
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  3989
        b := [self showNoneFound:title]
2414
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3990
    ].
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3991
2409
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3992
    ^ self
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3993
        browseReferendsOf:aGlobalName 
656eeb7197fa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2398
diff changeset
  3994
        title:title 
2414
a84eac935500 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2412
diff changeset
  3995
        ifNone:b
1367
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  3996
!
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  3997
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  3998
browseReferendsOf:aGlobalName warnIfNone:doWarn
17967
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  3999
    "launch a browser for all methods referencing a global named aGlobalName.
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  4000
     If aGlobalName is inside a namespace (a private or namespace-global),
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  4001
     the search should be for a global named <namespace>::<aGlobalName>"
1367
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  4002
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  4003
    ^ self
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  4004
        browseReferendsOf:aGlobalName 
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  4005
        title:(self classResources string:'Users of: %1' with:aGlobalName)
1367
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  4006
        warnIfNone:doWarn
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  4007
80e92dd370c8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1356
diff changeset
  4008
    "Modified: / 31.10.1997 / 15:42:05 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4009
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4010
4198
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4011
browseReferendsOfUnboundGlobalsWithTitle:title ifNone:actionIfNone
12844
2a189ba77e75 Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 12837
diff changeset
  4012
    "launch a browser for all methods referencing an unbound global."
2a189ba77e75 Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 12837
diff changeset
  4013
2a189ba77e75 Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 12837
diff changeset
  4014
    |searchBlock browser|
4198
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4015
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4016
    searchBlock := [:cls :mthd :sel | 
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4017
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4018
                    |mSource globals potentialNames|
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4019
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4020
                    "/ kludge: Lazy methods do not include symbols in the literal array - sigh
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4021
                    mthd isLazyMethod ifTrue:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4022
                        mSource := mthd source.
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4023
                        mSource notNil ifTrue:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4024
                            globals := mthd usedGlobals.
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4025
                        ].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4026
                    ] ifFalse:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4027
                        "/ try hard to avoid the usedGlobals - its expensive
6640
326360e94271 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6581
diff changeset
  4028
                        potentialNames := mthd literals select:[:lit | lit isSymbol and:[lit size > 0 and:[lit isUppercaseFirst]]].
4198
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4029
                        potentialNames notEmpty ifTrue:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4030
                            potentialNames := potentialNames select:[:lit | (Smalltalk at:lit) isNil].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4031
                            potentialNames notEmpty ifTrue:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4032
                                globals := mthd usedGlobals.
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4033
                            ]
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4034
                        ]
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4035
                    ].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4036
                    globals notNil ifTrue:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4037
                        globals contains:[:aGlobalKey | (Smalltalk at:aGlobalKey asSymbol) isNil].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4038
                    ] ifFalse:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4039
                        false
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4040
                    ]
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4041
                  ].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4042
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4043
    browser := self browseMethodsWhere:searchBlock title:title ifNone:[actionIfNone value. ^ nil].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4044
    browser isNil ifTrue:[
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4045
        actionIfNone value
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4046
    ].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4047
    ^ browser
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4048
!
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4049
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4050
browseReferendsOfUnboundGlobalsWithTitle:title warnIfNone:doWarn
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4051
    "launch a browser for all methods referencing an unbound global.
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4052
    "
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4053
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4054
    |b|
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4055
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4056
    doWarn ifTrue: [
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4057
        b := [self showNoneFound:title]
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4058
    ].
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4059
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4060
    ^ self
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4061
        browseReferendsOfUnboundGlobalsWithTitle:title 
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4062
        ifNone:b
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4063
!
de8b73b42e1e added browse refs to unbound globals.
Claus Gittinger <cg@exept.de>
parents: 4167
diff changeset
  4064
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4065
browseRefsTo:aString classVars:classVars in:aCollectionOfClasses modificationsOnly:modsOnly
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4066
    "launch a browser for all methods in aClass where the instVar/classVar named
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4067
     aString is referenced; if modsOnly is true, browse only methods where the
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4068
     instvar is modified"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4069
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4070
    |title|
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4071
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4072
    modsOnly ifTrue:[
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  4073
        title := 'Modifications of: %1'
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4074
    ] ifFalse:[
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  4075
        title := 'References to: %1 '
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4076
    ].
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4077
    ^ self 
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4078
        browseRefsTo:aString 
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4079
        classVars:classVars 
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4080
        in:aCollectionOfClasses 
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4081
        modificationsOnly:modsOnly 
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4082
        title:(self classResources string:title with:aString)
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4083
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4084
    "Created: 9.12.1995 / 18:07:05 / cg"
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4085
    "Modified: 9.12.1995 / 18:11:49 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4086
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4087
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4088
browseRefsTo:varName classVars:classVars in:aCollectionOfClasses modificationsOnly:modsOnly title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4089
    "launch a browser for all methods in aClass where the instVar/classVar named
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4090
     varName is referenced; if modsOnly is true, browse only methods where the
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4091
     instvar is modified"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4092
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4093
    |filter browser pattern|
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4094
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4095
    filter := self filterToSearchRefsTo:varName classVars:classVars modificationsOnly:modsOnly.
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4096
    browser := self browseMethodsIn:aCollectionOfClasses inst:true class:classVars where:filter title:title.
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4097
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4098
    browser notNil ifTrue:[
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4099
        modsOnly ifTrue:[
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4100
            pattern := varName , ' :='
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4101
        ] ifFalse:[
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4102
            pattern := varName
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4103
        ].
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4104
        browser autoSearch:pattern 
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4105
    ].
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4106
    ^ browser
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4107
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4108
3407
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4109
browseSendersOf:aSelectorString
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4110
    "launch a browser for all senders of aSelector"
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4111
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4112
    ^ self browseAllCallsOn:aSelectorString
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4113
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4114
    "
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4115
     SystemBrowser browseSendersOf:#+
7914
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4116
     UserPreferences current systemBrowserClass browseSendersOf:#+
3407
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4117
    "
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4118
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4119
    "Modified: / 10.7.1996 / 10:26:15 / cg"
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4120
    "Created: / 13.11.2001 / 13:52:12 / cg"
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4121
!
7813f46be17f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3360
diff changeset
  4122
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4123
browseSuperCallsIn:aCollectionOfClasses title:title
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4124
    "launch a browser for all super sends in aCollectionOfClasses"
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4125
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 675
diff changeset
  4126
    |browser searchBlock|
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4127
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4128
    searchBlock := [:class :method :s | 
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4129
        |src parser|
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4130
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4131
        src := method source.
15334
8a75c5cb07b1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15327
diff changeset
  4132
        (src notNil and:[ (src findString:'super') ~~ 0 ])  ifTrue:[
8a75c5cb07b1 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15327
diff changeset
  4133
             parser := Parser 
2208
e077aa992f7a check for nil source in #allCallsOn: (for methods where src in not available)
Claus Gittinger <cg@exept.de>
parents: 1937
diff changeset
  4134
                        parseMethod:src 
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4135
                        in:class 
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4136
                        ignoreErrors:true 
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4137
                        ignoreWarnings:true.
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4138
7711
7e8881bccf72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7524
diff changeset
  4139
            (parser notNil and:[parser ~~ #Error and:[parser usesSuper]])
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4140
        ] ifFalse:[
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4141
            false
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4142
        ]
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4143
    ].
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4144
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4145
    browser := self browseMethodsIn:aCollectionOfClasses
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4146
                              where:searchBlock
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4147
                              title:title.
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4148
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4149
    browser notNil ifTrue:[
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4150
        browser autoSearch:'super' 
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4151
    ].
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4152
    ^ browser
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4153
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4154
    "
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4155
     SystemBrowser
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4156
         browseSuperCallsIn:(Array with:SortedCollection)
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4157
                      title:'superSends in SortedCollection'
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4158
    "
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4159
7711
7e8881bccf72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7524
diff changeset
  4160
    "Created: / 23-11-1995 / 14:08:55 / cg"
7e8881bccf72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7524
diff changeset
  4161
    "Modified: / 06-03-2007 / 14:00:12 / cg"
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4162
!
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4163
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4164
browseSuperCallsUnder:aClass
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4165
    "launch a browser for all supersends in aClass and subclasses"
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4166
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4167
    ^ self browseSuperCallsIn:(aClass withAllSubclasses)
6476
01f8b6dfd829 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6368
diff changeset
  4168
                        title:(self classResources string:'Supersends (in and below %1)' with:aClass name)
256
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4169
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4170
    "
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4171
     SystemBrowser browseSuperCallsUnder:Number
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4172
    "
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4173
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4174
    "Created: 23.11.1995 / 12:06:06 / cg"
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4175
    "Modified: 9.12.1995 / 18:11:59 / cg"
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4176
!
5ae592de1b4f national strings
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
  4177
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4178
browseUsesOf:aClass
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4179
    |dict owners offsets
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4180
     sz  "{ Class: SmallInteger }"
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4181
     n   "{ Class: SmallInteger }"
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4182
     removeSet newDict|
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4183
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4184
    owners := ObjectMemory whoReferencesInstancesOf:aClass.
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4185
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4186
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4187
     collect set of offsets in dict; key is class
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4188
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4189
    dict := IdentityDictionary new.
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4190
    owners do:[:someObject |
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4191
        |cls create|
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4192
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4193
        someObject isContext ifFalse:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4194
            "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4195
             someObject refers to an instance of aClass;
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4196
             find out, which instVar(s)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4197
            "
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4198
            cls := someObject class.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4199
            cls ~~ Array ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4200
                n := cls instSize.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4201
                create := [|s| s := Set new. dict at:cls put:s. s].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4202
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4203
                1 to:n do:[:i |
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4204
                    |ref|
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4205
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4206
                    ref := someObject instVarAt:i.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4207
                    (ref isMemberOf:aClass) ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4208
                        offsets := dict at:cls ifAbsent:create.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4209
                        offsets add:i.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4210
                    ]
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4211
                ].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4212
                cls isVariable ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4213
                    cls isPointers ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4214
                        | idx "{ Class: SmallInteger }" |
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4215
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4216
                        sz := someObject basicSize.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4217
                        idx := 1.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4218
                        [idx <= sz] whileTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4219
                            |ref|
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4220
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4221
                            ref := someObject basicAt:idx.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4222
                            (ref isMemberOf:aClass) ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4223
                                offsets := dict at:cls ifAbsent:create.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4224
                                offsets add:0.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4225
                                idx := sz
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4226
                            ].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4227
                            idx := idx + 1
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4228
                        ]
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4229
                    ]        
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4230
                ]
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4231
            ]
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4232
        ]
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4233
    ].
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4234
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4235
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4236
     merge with superclass refs
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4237
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4238
    dict keysAndValuesDo:[:cls :set |
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4239
        cls allSuperclasses do:[:aSuperclass |
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4240
            |superSet|
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4241
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4242
            superSet := dict at:aSuperclass ifAbsent:[].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4243
            superSet notNil ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4244
                superSet := dict at:aSuperclass.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4245
                removeSet := Set new.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4246
                set do:[:offset |
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4247
                    (superSet includes:offset) ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4248
                        removeSet add:offset
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4249
                    ]
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4250
                ].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4251
                set removeAll:removeSet
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4252
            ]
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4253
        ]
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4254
    ].
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4255
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4256
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4257
     remove empty ones
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4258
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4259
    removeSet := Set new.
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4260
    dict keysAndValuesDo:[:cls :set |
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4261
        set isEmpty ifTrue:[
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4262
            removeSet add:cls
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4263
        ]
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4264
    ].
9334
ed9742f1a717 changed: #browseUsesOf:
Claus Gittinger <cg@exept.de>
parents: 9313
diff changeset
  4265
    dict removeAllKeys:removeSet.
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4266
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4267
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4268
     replace the indices by real names
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4269
    "
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4270
    newDict := IdentityDictionary new.
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4271
    dict keysAndValuesDo:[:cls :set |
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4272
        |newSet names|
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4273
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4274
        names := cls allInstVarNames.
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4275
        newSet := set collect:[:index | 
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4276
                index == 0 ifTrue:['*indexed*'] ifFalse:[names at:index].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4277
        ].
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  4278
        newDict at:cls put:newSet
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4279
    ].
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4280
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4281
    newDict inspect
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4282
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  4283
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4284
filterToSearchRefsTo:varName classVars:classVars access:accessType
7914
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4285
    "return a searchblock for variable references (obsolete)"
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4286
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4287
    ^ self
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4288
        filterToSearchRefsTo:varName 
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4289
        instVars:(classVars not) 
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4290
        classVars:classVars 
11934
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4291
        globals:false
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4292
        poolVars:false 
7914
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4293
        access:accessType
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4294
!
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4295
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4296
filterToSearchRefsTo:varName classVars:classVars modificationsOnly:modsOnly
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4297
    "return a searchblock for variable references"
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4298
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4299
    ^ self
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4300
        filterToSearchRefsTo:varName 
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4301
        classVars:classVars 
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4302
        access:(modsOnly ifTrue:#write ifFalse:#readWrite)
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4303
!
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4304
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4305
filterToSearchRefsTo:varName instVars:doInstVars classVars:doClassVars globals:doGlobals access:accessType
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4306
    "return a searchblock for variable references"
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4307
11934
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4308
    ^ self
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4309
        filterToSearchRefsTo:varName instVars:doInstVars classVars:doClassVars globals:doGlobals 
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4310
        poolVars:false access:accessType
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4311
!
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4312
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4313
filterToSearchRefsTo:varName instVars:doInstVars classVars:doClassVars globals:doGlobals poolVars:doPoolVars access:accessType
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4314
    "return a searchblock for variable references"
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4315
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4316
    |searchBlock needMatch baseVarName|
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4317
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4318
    needMatch := varName includesMatchCharacters.
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4319
    (varName includes:$:) ifTrue:[
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4320
        baseVarName := varName copyFrom:(varName lastIndexOf:$:)+1
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4321
    ] ifFalse:[
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4322
        baseVarName := varName
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4323
    ].
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4324
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4325
    searchBlock := [:c :m :s |
11934
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4326
        |src result parser vars instVars classVars poolVars globals|
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4327
7914
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4328
        result := false.
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4329
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4330
        "/ JV Following code is bad. It assumes that method is a Smalltalk method.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4331
        "/ But it may not, it could be JavaScript method, Java method or whatever fancy language 
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4332
        "/ method. Should be actually delegated to the method itself.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4333
17596
306cffcfa1a0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17543
diff changeset
  4334
        (m programmingLanguage isSmalltalk 
306cffcfa1a0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17543
diff changeset
  4335
        or:[ m programmingLanguage isSTXJavaScript ]) ifTrue:[
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4336
            "/ For Smalltalk, use parser...
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4337
            src := m source.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4338
            src notNil ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4339
                needMatch ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4340
                    "
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4341
                     before doing a slow parse, quickly scan the
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4342
                     method's source for the variable's name ...
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4343
                    "
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4344
                    result := (src findString:baseVarName) ~~ 0.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4345
                ] ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4346
                    result := true.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4347
                ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4348
                result ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4349
                    result := false.
17596
306cffcfa1a0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17543
diff changeset
  4350
                    parser := (m parserClass)
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4351
                                    parseMethod:src 
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4352
                                    in:c 
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4353
                                    ignoreErrors:true 
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4354
                                    ignoreWarnings:true.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4355
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4356
                    (parser notNil and:[parser ~~ #Error]) ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4357
                        vars := Set new.    
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4358
                        doInstVars ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4359
                            accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4360
                                instVars := parser readInstVars
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4361
                            ] ifFalse:[
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4362
                                accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4363
                                    instVars := parser modifiedInstVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4364
                                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4365
                                    instVars := parser usedInstVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4366
                                ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4367
                            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4368
                            vars addAll:instVars.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4369
                        ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4370
                        doClassVars ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4371
                            accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4372
                                classVars := parser readClassVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4373
                            ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4374
                                accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4375
                                    classVars := parser modifiedClassVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4376
                                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4377
                                    classVars := parser usedClassVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4378
                                ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4379
                            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4380
                            vars addAll:classVars.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4381
                        ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4382
                        doPoolVars ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4383
                            accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4384
                                poolVars := parser readPoolVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4385
                            ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4386
                                accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4387
                                    poolVars := parser modifiedPoolVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4388
                                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4389
                                    poolVars := parser usedPoolVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4390
                                ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4391
                            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4392
                            vars addAll:poolVars.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4393
                        ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4394
                        doGlobals ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4395
                            accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4396
                                globals := parser readGlobals
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4397
                            ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4398
                                accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4399
                                    globals := parser modifiedGlobals
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4400
                                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4401
                                    globals := parser usedGlobals
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4402
                                ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4403
                            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4404
                            vars addAll:globals.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4405
                        ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4406
                        vars size > 0 ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4407
                            needMatch ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4408
                                result := vars contains:[:cv | (varName match:cv)]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4409
                            ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4410
                                result := vars includes:varName
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4411
                            ]
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4412
                        ]
7914
d8fa35236729 refactoring
Claus Gittinger <cg@exept.de>
parents: 7847
diff changeset
  4413
                    ].
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4414
                ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4415
            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4416
        ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4417
            "/ For all other languages, ask method.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4418
            vars := Set new.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4419
            doInstVars ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4420
                accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4421
                    instVars := m readInstVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4422
                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4423
                    accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4424
                        instVars := m modifiedInstVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4425
                    ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4426
                        instVars := m usedInstVars
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4427
                    ]
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4428
                ].
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4429
                vars addAll:instVars.
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4430
            ].
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4431
            doClassVars ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4432
                accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4433
                    classVars := m readClassVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4434
                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4435
                    accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4436
                        classVars := m modifiedClassVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4437
                    ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4438
                        classVars := m usedClassVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4439
                    ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4440
                ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4441
                vars addAll:classVars.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4442
            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4443
            doPoolVars ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4444
                accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4445
                    poolVars := m readPoolVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4446
                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4447
                    accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4448
                        poolVars := m modifiedPoolVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4449
                    ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4450
                        poolVars := m usedPoolVars
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4451
                    ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4452
                ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4453
                vars addAll:poolVars.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4454
            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4455
            doGlobals ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4456
                accessType == #read ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4457
                    globals := m readGlobals
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4458
                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4459
                    accessType == #write ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4460
                        globals := m modifiedGlobals
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4461
                    ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4462
                        globals := m usedGlobals
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4463
                    ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4464
                ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4465
                vars addAll:globals.
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4466
            ].
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4467
            vars size > 0 ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4468
                needMatch ifTrue:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4469
                    result := vars contains:[:cv | (varName match:cv)]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4470
                ] ifFalse:[
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4471
                    result := vars includes:varName
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4472
                ]
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4473
            ]
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4474
        ].
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4475
        Processor yield.
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4476
        result
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  4477
    ].
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  4478
    ^ searchBlock
504
1bb5e6002ebb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
  4479
13525
a8195f61d4f2 Fixes required by Java class browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13438
diff changeset
  4480
    "Modified: / 06-09-2013 / 18:02:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17596
306cffcfa1a0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17543
diff changeset
  4481
    "Modified: / 23-07-2017 / 13:47:40 / cg"
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4482
!
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4483
2743
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4484
findAnyResourceIn:aCollectionOfClasses 
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4485
    "return a collection of all methods in aCollectionOfClasses containing any resource."
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4486
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4487
    ^ self findMethodsIn:aCollectionOfClasses where:[:c :m :sel | m hasResource ].
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4488
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4489
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4490
     SystemBrowser findAnyResourceIn:(ApplicationModel withAllSubclasses)
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4491
    "
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4492
!
4fa5e36bef74 code cleanup: moved iconMethods from BrowserView to SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 2741
diff changeset
  4493
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4494
findClassRefsTo:aString in:aCollectionOfClasses access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4495
    "return all methods in aCollectionOfClasses where the classVar named
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4496
     aString is referenced; 
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4497
     if modsOnly is true, browse only methods where the classvar is modified"
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4498
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4499
    ^ self findRefsTo:aString classVars:true in:aCollectionOfClasses access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4500
!
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4501
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4502
findClassRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly
2728
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4503
    "return all methods in aCollectionOfClasses where the classVar named
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4504
     aString is referenced; 
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4505
     if modsOnly is true, browse only methods where the classvar is modified"
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4506
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4507
    ^ self findRefsTo:aString classVars:true in:aCollectionOfClasses modificationsOnly:modsOnly
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4508
!
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4509
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4510
findClassRefsTo:aString inClass:aClass access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4511
    "return all methods in aClass where the classVar named
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4512
     aString is referenced; 
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4513
     if modsOnly is true, browse only methods where the classvar is modified"
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4514
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4515
    ^ self findRefsTo:aString classVars:true in:(Array with:aClass) access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4516
!
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4517
2728
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4518
findClassRefsTo:aString inClass:aClass modificationsOnly:modsOnly
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4519
    "return all methods in aClass where the classVar named
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4520
     aString is referenced; 
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4521
     if modsOnly is true, browse only methods where the classvar is modified"
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4522
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4523
    ^ self findRefsTo:aString classVars:true in:(Array with:aClass) modificationsOnly:modsOnly
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4524
!
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4525
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4526
findClassRefsTo:aString under:aClass access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4527
    "return all methods in aClass and subclasses
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4528
     where the classVar named aString is referenced; 
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4529
     if modsOnly is true, browse only methods where the classvar is modified"
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4530
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4531
    ^ self findClassRefsTo:aString in:(aClass withAllSubclasses) access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4532
!
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4533
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4534
findClassRefsTo:aString under:aClass modificationsOnly:modsOnly
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4535
    "return all methods in aClass and subclasses
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4536
     where the classVar named aString is referenced; 
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4537
     if modsOnly is true, browse only methods where the classvar is modified"
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4538
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4539
    ^ self findClassRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4540
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4541
!
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4542
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4543
findCode:aCodeString in:aCollectionOfClasses isMethod:isMethod 
5243
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4544
    "return a collection of all methods in aCollectionOfClasses  
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4545
     containing a matching piece of code.
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4546
     This may be slow, since source-code has to be scanned."
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4547
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4548
    |searchBlock|
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4549
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  4550
    searchBlock := self searchBlockForCode:aCodeString in:aCollectionOfClasses isMethod:isMethod.
5226
35a9709e73ee code search
Claus Gittinger <cg@exept.de>
parents: 5135
diff changeset
  4551
    searchBlock isNil ifTrue:[ ^ nil].
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4552
    ^ self findMethodsIn:aCollectionOfClasses where:searchBlock.
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  4553
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  4554
    "Modified: / 02-05-2011 / 13:25:15 / sr"
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4555
!
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  4556
5243
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4557
findCode:aCodeString inMethods:aCollectionOfMethods isMethod:isMethod 
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4558
    "return a collection of all methods in aCollectionOfMethods  
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4559
     containing a matching piece of code."
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4560
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4561
    |searchBlock|
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4562
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  4563
    searchBlock := self searchBlockForCode:aCodeString in:(aCollectionOfMethods collect:[:each | each mclass]) isMethod:isMethod.
5243
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4564
    searchBlock isNil ifTrue:[ ^ nil].
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4565
    ^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector].
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  4566
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  4567
    "Modified: / 02-05-2011 / 13:25:39 / sr"
5243
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4568
!
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  4569
9482
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4570
findExceptionHandlersIn:aCollectionOfClasses
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4571
    "return a collection of all methods in aCollectionOfClasses  
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4572
     containing an exception raiser.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4573
     This may be slow, since source-code has to be scanned."
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4574
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4575
    ^ self findUsingParseTreeSearcher:(ParseTreeSearcher handlesException) in:aCollectionOfClasses
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4576
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4577
    "Modified: / 11-05-2010 / 16:18:55 / cg"
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4578
!
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4579
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4580
findExceptionHandlersInMethods:aCollectionOfMethods
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4581
    "return a collection of all methods in aCollectionOfClasses  
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4582
     containing an exception raiser.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4583
     This may be slow, since source-code has to be scanned."
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4584
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4585
    ^ self findUsingParseTreeSearcher:(ParseTreeSearcher handlesException) inMethods:aCollectionOfMethods
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4586
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4587
    "Created: / 11-05-2010 / 16:20:48 / cg"
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4588
!
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4589
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4590
findExceptionRaisersIn:aCollectionOfClasses
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4591
    "return a collection of all methods in aCollectionOfClasses  
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4592
     containing an exception raiser.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4593
     This may be slow, since source-code has to be scanned."
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4594
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4595
    ^ self findUsingParseTreeSearcher:(ParseTreeSearcher raisesException) in:aCollectionOfClasses
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4596
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4597
    "Modified: / 11-05-2010 / 16:18:48 / cg"
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4598
!
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4599
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4600
findExceptionRaisersInMethods:aCollectionOfMethods
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4601
    "return a collection of all methods in aCollectionOfClasses  
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4602
     containing an exception raiser.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4603
     This may be slow, since source-code has to be scanned."
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4604
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4605
    ^ self findUsingParseTreeSearcher:(ParseTreeSearcher raisesException) inMethods:aCollectionOfMethods
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4606
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4607
    "Created: / 11-05-2010 / 16:20:36 / cg"
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4608
!
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  4609
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4610
findHelpSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase 
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4611
    "return a collection of all help-spec methods in aCollectionOfClasses  
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4612
     containing a string in their source.
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4613
     This may be slow, since source-code has to be scanned."
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4614
    
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4615
    ^ self 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4616
        findSpecMethodsFor:#help
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4617
        withString:aString
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4618
        in:aCollectionOfClasses
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4619
        ignoreCase:ignoreCase
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4620
!
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4621
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4622
findHelpSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4623
    "return a collection of all help-spec methods in aCollectionOfClasses  
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4624
     containing a string in their source.
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4625
     This may be slow, since source-code has to be scanned."
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4626
    
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4627
    ^ self 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4628
        findSpecMethodsFor:#help
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4629
        withString:aString
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4630
        in:aCollectionOfClasses
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4631
        ignoreCase:ignoreCase
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4632
        match:doMatch
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4633
!
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4634
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4635
findImplementors:aSelectorMatchString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4636
    "search for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  4637
     the classes contained in aCollectionOfClasses and their metaclasses.
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4638
     Return a collection of methods"
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4639
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  4640
    |lcSelector list compare testST testJava srchBlockST srchBlockJava collectionOfClasses|
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4641
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4642
    list := IdentitySet new.
6051
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4643
    aSelectorMatchString size == 0 ifTrue:[ ^ list ].
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4644
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4645
    (doMatch and:[aSelectorMatchString includesMatchCharacters]) ifTrue:[
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4646
        compare := [:sel :search | sel match:search].
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4647
    ] ifFalse:[
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4648
        compare := [:sel :search | sel = search].
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4649
    ].
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4650
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4651
    ignoreCase == true ifTrue:[
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4652
        lcSelector := aSelectorMatchString asLowercase.
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4653
15075
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4654
        testST := [:mthdSelector :aMethod | (compare value:lcSelector value:mthdSelector asLowercase) ].
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4655
        testJava := [:mthdSelector :aMethod | (compare value:lcSelector value:aMethod name asLowercase) ].
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4656
    ] ifFalse:[
15075
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4657
        testST := [:mthdSelector :aMethod | (compare value:aSelectorMatchString value:mthdSelector) ].
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4658
        testJava := [:mthdSelector :aMethod | (compare value:aSelectorMatchString value:aMethod name) ].
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4659
    ].
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4660
15075
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4661
    srchBlockST := [:mthdSelector :mthd | (testST value:mthdSelector value:mthd) ifTrue:[ list add:mthd]].
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4662
    srchBlockJava := [:mthdSelector :mthd | (testJava value:mthdSelector value:mthd) ifTrue:[ list add:mthd]].
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4663
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  4664
    (collectionOfClasses := aCollectionOfClasses) isNil ifTrue:[
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  4665
        collectionOfClasses := Smalltalk allClasses
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  4666
    ].    
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  4667
    collectionOfClasses do:[:aClass |
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4668
        |srchBlock|
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4669
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4670
        aClass isObsolete ifFalse:[
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4671
            srchBlock := aClass isJavaClass 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4672
                            ifTrue:[ srchBlockJava ]
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4673
                            ifFalse:[ srchBlockST ].
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4674
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4675
            aClass methodDictionary keysAndValuesDo:srchBlock.
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4676
            aClass isMeta ifFalse:[
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4677
                aClass class methodDictionary keysAndValuesDo:srchBlock
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4678
            ]
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4679
        ]
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4680
    ].
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4681
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4682
    ^ list
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4683
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4684
    "
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4685
     SystemBrowser 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4686
        findImplementorsOf:#+
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4687
        in: { Number . Float . SmallInteger }
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4688
        ignoreCase: false
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4689
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4690
     Time millisecondsToRun:[    
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4691
         SystemBrowser 
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4692
            findImplementorsOf:#add:
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4693
            in: (Smalltalk allClasses)
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4694
            ignoreCase: false
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4695
     ]
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4696
    "
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4697
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4698
    "Modified (format): / 22-03-2012 / 07:28:50 / cg"
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4699
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4700
6776
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4701
findImplementors:aSelectorMatchString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4702
    "search for all implementors of aSelector in
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  4703
     the classes contained in aCollectionOfClasses and their metaclasses.
6776
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4704
     Return a collection of methods"
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4705
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4706
    |list compare testST testJava lcSelector|
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4707
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4708
    list := IdentitySet new.
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4709
    aSelectorMatchString size == 0 ifTrue:[ ^ list ].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4710
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4711
    doMatch ifTrue:[
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4712
        compare := [:sel :search | sel match:search].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4713
    ] ifFalse:[
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4714
        compare := [:sel :search | sel = search].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4715
    ].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4716
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4717
    ignoreCase == true ifTrue:[
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4718
        lcSelector := aSelectorMatchString asLowercase.
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4719
15075
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4720
        testST := [:mthdSelector :aMethod | (compare value:lcSelector value:mthdSelector asLowercase) ].
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4721
        testJava := [:mthdSelector :aMethod | (compare value:lcSelector value:aMethod name asLowercase) ].
6776
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4722
    ] ifFalse:[
15075
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4723
        testST := [:mthdSelector :aMethod | (compare value:aSelectorMatchString value:mthdSelector) ].
8ee8b91f6c69 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 14944
diff changeset
  4724
        testJava := [:mthdSelector :aMethod | (compare value:aSelectorMatchString value:aMethod name) ].
6776
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4725
    ].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4726
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4727
    aCollectionOfMethods do:[:eachMethod |
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4728
        |cls sel testBlock|
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4729
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4730
        cls := eachMethod mclass.
7066
43640ba63db6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6955
diff changeset
  4731
        (cls isNil or:[cls isObsolete]) ifFalse:[
6776
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4732
            cls isJavaClass ifTrue:[
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4733
                testBlock := testJava
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4734
            ] ifFalse:[
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4735
                testBlock := testST
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4736
            ].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4737
            sel := eachMethod selector.    
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4738
            (testBlock value:sel value:eachMethod) ifTrue:[
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4739
                list add:eachMethod
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4740
            ].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4741
        ]
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4742
    ].
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4743
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4744
    ^ list
7066
43640ba63db6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6955
diff changeset
  4745
43640ba63db6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6955
diff changeset
  4746
    "Modified: / 29-08-2006 / 14:33:42 / cg"
6776
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4747
!
5f5fd533b1f4 implementors of from implementors of-list
Claus Gittinger <cg@exept.de>
parents: 6705
diff changeset
  4748
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4749
findImplementorsMatching:aSelectorMatchString in:aCollectionOfClasses ignoreCase:ignoreCase
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4750
    "search for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  4751
     the classes contained in aCollectionOfClasses and their metaclasses.
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4752
     Return a collection of methods"
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4753
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4754
    ^ self 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4755
        findImplementors:aSelectorMatchString 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4756
        in:aCollectionOfClasses 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4757
        ignoreCase:ignoreCase 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4758
        match:true
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4759
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4760
    "
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4761
     SystemBrowser 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4762
        findImplementorsOf:#+
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4763
        in:{ Number . Float . SmallInteger }
16443
7ce9ab5ce5e2 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16395
diff changeset
  4764
        ignoreCase:false
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4765
    "
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4766
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  4767
    "Modified (comment): / 22-03-2012 / 07:20:42 / cg"
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4768
!
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4769
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4770
findImplementorsMatchingAny:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4771
    "search for all implementors of any in aCollectionOfSelectors in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  4772
     the classes contained in aCollectionOfClasses and their metaclasses.
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4773
     Return a collection of methods.
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4774
     CAVEAT: searches multiple times (could be tuned alot if heavily used)"
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4775
6052
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4776
    ^ aCollectionOfSelectors 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4777
        collectAll:[:eachSelector |
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4778
            self findImplementorsMatching:eachSelector 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4779
                 in:aCollectionOfClasses 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4780
                 ignoreCase:ignoreCase.
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4781
        ].
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4782
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4783
"/    |implementors|
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4784
"/
6051
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4785
"/    implementors := IdentitySet new.
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4786
"/    aCollectionOfSelectors do:[:eachSelector |
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4787
"/        implementors addAll:(self findImplementorsMatching:eachSelector in:aCollectionOfClasses ignoreCase:ignoreCase).
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4788
"/    ].
6052
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4789
"/    ^ implementors
6051
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4790
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4791
    "
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4792
     self
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4793
        findImplementorsMatchingAny:#( 'at*:' '*size')
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4794
        in:(Smalltalk allClasses) 
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4795
        ignoreCase:true
adc2da07dfe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5997
diff changeset
  4796
    "
3675
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4797
!
5208ac7b25a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3666
diff changeset
  4798
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4799
findImplementorsOf:aSelectorMatchString in:aCollectionOfClasses ignoreCase:ignoreCase
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4800
    "search for all implementors of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  4801
     the classes contained in aCollectionOfClasses and their metaclasses.
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4802
     Return a collection of methods"
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4803
6480
a84b7a241f0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6476
diff changeset
  4804
    ^ self 
a84b7a241f0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6476
diff changeset
  4805
        findImplementors:aSelectorMatchString 
a84b7a241f0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6476
diff changeset
  4806
        in:aCollectionOfClasses 
a84b7a241f0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6476
diff changeset
  4807
        ignoreCase:ignoreCase 
a84b7a241f0a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6476
diff changeset
  4808
        match:false
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4809
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4810
    "
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4811
     SystemBrowser findImplementorsOf:#+
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4812
                                   in:(Array with:Number
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4813
                                             with:Float
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  4814
                                             with:SmallInteger)
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4815
    "
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4816
!
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  4817
2811
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  4818
findImplementorsOfAny:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  4819
    "search for all implementors of any in aCollectionOfSelectors in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  4820
     the classes contained in aCollectionOfClasses and their metaclasses.
2811
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  4821
     Return a collection of methods.
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  4822
     CAVEAT: searches multiple times (could be tuned alot if heavily used)"
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  4823
6052
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4824
    ^ aCollectionOfSelectors 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4825
        collectAll:[:eachSelector |
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4826
            self findImplementorsOf:eachSelector 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4827
                 in:aCollectionOfClasses 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4828
                 ignoreCase:ignoreCase.
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4829
        ].
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4830
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4831
"/    |implementors|
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4832
"/
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4833
"/    implementors := IdentitySet new.
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4834
"/    aCollectionOfSelectors do:[:eachSelector |
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4835
"/        implementors addAll:(self findImplementorsOf:eachSelector in:aCollectionOfClasses ignoreCase:ignoreCase).
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4836
"/    ].
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  4837
"/    ^ implementors
2811
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  4838
!
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  4839
2741
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4840
findInstRefsTo:aString in:aCollectionOfClasses access:accessType
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4841
    "return all methods in aCollectionOfClasses where the instVar named
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4842
     aString is referenced; 
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4843
     if modsOnly is true, browse only methods where the classvar is modified"
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4844
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4845
    ^ self findRefsTo:aString classVars:false in:aCollectionOfClasses access:accessType
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4846
!
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4847
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4848
findInstRefsTo:aString in:aCollectionOfClasses modificationsOnly:modsOnly
2728
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4849
    "return all methods in aCollectionOfClasses where the instVar named
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4850
     aString is referenced; if modsOnly is true, browse only methods where the
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4851
     instvar is modified"
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4852
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4853
    ^ self findRefsTo:aString classVars:false in:aCollectionOfClasses modificationsOnly:modsOnly
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4854
!
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4855
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4856
findInstRefsTo:aString inClass:aClass access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4857
    "return all methods in aClass where the instVar named
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4858
     aString is referenced; if modsOnly is true, browse only methods where the
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4859
     instvar is modified"
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4860
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4861
    ^ self findRefsTo:aString classVars:false in:(Array with:aClass) access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4862
!
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4863
2728
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4864
findInstRefsTo:aString inClass:aClass modificationsOnly:modsOnly
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4865
    "return all methods in aClass where the instVar named
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4866
     aString is referenced; if modsOnly is true, browse only methods where the
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4867
     instvar is modified"
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4868
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4869
    ^ self findRefsTo:aString classVars:false in:(Array with:aClass) modificationsOnly:modsOnly
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4870
!
5ba2a9de7472 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2692
diff changeset
  4871
2741
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4872
findInstRefsTo:aString under:aClass access:accessType
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4873
    "return all methods in aClass and subclasses
18705
dea38d56c6e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18615
diff changeset
  4874
     where the instVar named aString is referenced; 
2741
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4875
     if modsOnly is true, browse only methods where the classvar is modified"
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4876
18705
dea38d56c6e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18615
diff changeset
  4877
    ^ self 
dea38d56c6e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18615
diff changeset
  4878
        findInstRefsTo:aString 
dea38d56c6e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18615
diff changeset
  4879
        in:(aClass withAllSubclasses) 
dea38d56c6e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18615
diff changeset
  4880
        access:accessType
dea38d56c6e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18615
diff changeset
  4881
dea38d56c6e3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 18615
diff changeset
  4882
    "Modified (comment): / 20-03-2019 / 17:11:47 / Claus Gittinger"
2741
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4883
!
aedd23d595cd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2736
diff changeset
  4884
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4885
findInstRefsTo:aString under:aClass modificationsOnly:modsOnly
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4886
    "return all methods in aClass and subclasses
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4887
     where the instVar named aString is referenced; 
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4888
     if modsOnly is true, browse only methods where the instvar is modified"
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4889
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4890
    ^ self findInstRefsTo:aString in:(aClass withAllSubclasses) modificationsOnly:modsOnly
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4891
!
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4892
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4893
findMenuSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase 
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4894
    "return a collection of all menu-spec methods in aCollectionOfClasses  
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4895
     containing a string in their source.
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4896
     This may be slow, since source-code has to be scanned."
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4897
    
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4898
    ^ self 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4899
        findSpecMethodsFor:#menu
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4900
        withString:aString
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4901
        in:aCollectionOfClasses
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4902
        ignoreCase:ignoreCase
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4903
!
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4904
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4905
findMenuSpecMethodsWithString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4906
    "return a collection of all menu-spec methods in aCollectionOfClasses  
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4907
     containing a string in their source.
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4908
     This may be slow, since source-code has to be scanned."
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4909
    
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4910
    ^ self 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4911
        findSpecMethodsFor:#menu
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4912
        withString:aString
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4913
        in:aCollectionOfClasses
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4914
        ignoreCase:ignoreCase
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  4915
        match:doMatch
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4916
!
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  4917
11934
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4918
findPoolVarRefsTo:aString inClass:aClass access:accessType
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4919
    "return all methods in aClass where the pool variable named aString is referenced; 
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4920
     if modsOnly is true, browse only methods where the classvar is modified"
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4921
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4922
    |filter|
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4923
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4924
    filter := self 
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4925
                filterToSearchRefsTo:aString 
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4926
                instVars:false classVars:false globals:false poolVars:true 
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4927
                access:accessType.
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4928
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4929
    ^ self findMethodsIn:(Array with:aClass) inst:true class:true where:filter.
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4930
!
ffb94d7169cc pool variable search
Claus Gittinger <cg@exept.de>
parents: 11638
diff changeset
  4931
2736
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4932
findRefsTo:varName classVars:classVars in:aCollectionOfClasses access:accessType
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4933
    "return a list of all methods in aCollectionOfClasses where the instVar/classVar named
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4934
     varName is referenced; 
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4935
     if modsOnly is true, browse only methods where the instvar is modified"
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4936
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4937
    |filter|
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4938
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4939
    filter := self filterToSearchRefsTo:varName classVars:classVars access:accessType.
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4940
    ^ self findMethodsIn:aCollectionOfClasses inst:true class:classVars where:filter.
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4941
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4942
    "
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4943
     self
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4944
        findRefsTo:'x'
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4945
        classVars:false
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4946
        in:(Array with:Point)
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4947
        modificationsOnly:true
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4948
    "
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4949
!
5b585170e14a added search to find readers of an isntVar
Claus Gittinger <cg@exept.de>
parents: 2729
diff changeset
  4950
2677
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4951
findRefsTo:varName classVars:classVars in:aCollectionOfClasses modificationsOnly:modsOnly
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4952
    "return a list of all methods in aCollectionOfClasses where the instVar/classVar named
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4953
     varName is referenced; 
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4954
     if modsOnly is true, browse only methods where the instvar is modified"
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4955
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4956
    |filter|
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4957
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4958
    filter := self filterToSearchRefsTo:varName classVars:classVars modificationsOnly:modsOnly.
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4959
    ^ self findMethodsIn:aCollectionOfClasses inst:true class:classVars where:filter.
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4960
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4961
    "
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4962
     self
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4963
        findRefsTo:'x'
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4964
        classVars:false
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4965
        in:(Array with:Point)
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4966
        modificationsOnly:true
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4967
    "
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4968
!
a5ef0e288aae search protocol enhanced
Claus Gittinger <cg@exept.de>
parents: 2675
diff changeset
  4969
2692
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4970
findResource:aResourceSymbolOrCollectionOfSymbols in:aCollectionOfClasses 
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4971
    "return a collection of all methods in aCollectionOfClasses  
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4972
     containing a resource."
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4973
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4974
    |searchBlock|
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4975
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4976
    aResourceSymbolOrCollectionOfSymbols isSymbol ifTrue:[
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4977
        searchBlock := [:c :m :sel | |resources|
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4978
                            (resources := m resources) size > 0
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4979
                            and:[resources includesKey:aResourceSymbolOrCollectionOfSymbols]
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4980
                       ].
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4981
    ] ifFalse:[
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4982
        searchBlock := [:c :m :sel | |resources|
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4983
                            (resources := m resources) size > 0
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4984
                            and:[resources keys includesAny:aResourceSymbolOrCollectionOfSymbols]
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4985
                       ].
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4986
    ].
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4987
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4988
    ^ self findMethodsIn:aCollectionOfClasses where:searchBlock.
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4989
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4990
    "
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4991
     SystemBrowser findResource:#image in:(ApplicationModel withAllSubclasses)
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4992
     SystemBrowser findResource:#menu in:(ApplicationModel withAllSubclasses)
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4993
     SystemBrowser findResource:#(menu programMenu) in:(ApplicationModel withAllSubclasses)
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4994
    "
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4995
!
652bbda35217 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2677
diff changeset
  4996
10188
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  4997
findResource:aStringOrEmpty match:doMatch ignoreCase:ignoreCase in:aCollectionOfClasses 
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  4998
    "return a collection of all methods in aCollectionOfClasses containing a matching resource."
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  4999
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5000
    |matchCheck lcSearchString|
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5001
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5002
    aStringOrEmpty isEmptyOrNil ifTrue:[
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5003
        matchCheck := [:aResourceName | true ]
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5004
    ] ifFalse:[
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5005
        doMatch ifTrue:[
13438
06f6d5fc73ef class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13365
diff changeset
  5006
            matchCheck := [:aResourceName | aStringOrEmpty match:aResourceName caseSensitive:ignoreCase not]
10188
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5007
        ] ifFalse:[
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5008
            ignoreCase ifTrue:[
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5009
                lcSearchString := aStringOrEmpty asLowercase.
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5010
                matchCheck := [:aResourceName | aResourceName asLowercase = lcSearchString]
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5011
            ] ifFalse:[
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5012
                matchCheck := [:aResourceName | aResourceName = aStringOrEmpty ]
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5013
            ]
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5014
        ].
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5015
    ].
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5016
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5017
    ^ self 
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5018
        findMethodsIn:aCollectionOfClasses 
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5019
        where:[:c :m :sel | 
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5020
            m hasResource
12073
d63b17e5c9c8 class: SystemBrowser
Stefan Vogel <sv@exept.de>
parents: 12056
diff changeset
  5021
            and:[m resources notNil and:[m resources keys contains:matchCheck]]
10188
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5022
        ].
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5023
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5024
    "
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5025
     SystemBrowser findResource:'*debug*' match:true ignoreCase:true in:(GenericException withAllSubclasses)
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5026
    "
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5027
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5028
    "Created: / 06-07-2011 / 12:14:24 / cg"
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5029
!
95e82ec734ff added: #findResource:match:ignoreCase:in:
Claus Gittinger <cg@exept.de>
parents: 10173
diff changeset
  5030
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5031
findRespondersOfAll:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5032
    "search for all classes which respond to all of the selectors in aCollectionOfSelectors.
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5033
     Search within the classes contained in aCollectionOfClasses and their metaclasses.
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5034
     This will skip over unloaded classes.
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5035
     Return a collection of classes."
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5036
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5037
    ^ Smalltalk allClasses 
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5038
        select:[:cls |
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5039
            cls isLoaded 
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5040
            and:[ aCollectionOfSelectors conform:[:sel | cls canUnderstand:sel]]].
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5041
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5042
    "
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5043
     to find classes which respond to both indexOf: and replaceFromIndex:toIndex:,
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5044
     use:
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5045
        SystemBrowser 
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5046
            findRespondersOfAll:#( indexOf: removeFromIndex:toIndex: ) 
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5047
            in:nil 
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5048
            ignoreCase:false
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5049
    "
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5050
!
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5051
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5052
findSendersOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5053
    "search for all senders of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5054
     the classes contained in aCollectionOfClasses and their metaclasses.
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5055
     Return a collection of methods"
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5056
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5057
    ^ self allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:true
2642
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5058
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5059
    "
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5060
     SystemBrowser findSendersOf:#+
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5061
                   in:(Array with:Number
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5062
                             with:Float
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5063
                             with:SmallInteger)
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5064
                   ignoreCase:false
cab6366238a4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2631
diff changeset
  5065
    "
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5066
!
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5067
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5068
findSendersOf:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5069
    "search for all senders of aSelector in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5070
     the classes contained in aCollectionOfClasses and their metaclasses.
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5071
     Return a collection of methods"
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5072
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5073
    ^ self allCallsOn:aSelectorString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5074
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5075
    "
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5076
     SystemBrowser findSendersOf:#+
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5077
                   in:(Array with:Number
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5078
                             with:Float
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5079
                             with:SmallInteger)
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5080
                   ignoreCase:false
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5081
    "
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  5082
!
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  5083
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5084
findSendersOf:aSelectorString inMethods:aCollectionOfMethods ignoreCase:ignoreCase
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5085
    "search for all senders of aSelector in aCollectionOfMethods.
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5086
     Return a collection of methods"
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5087
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5088
    |searchBlock|
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5089
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5090
    searchBlock := self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase.
9313
44795fcbf414 changed: #findSendersOf:inMethods:ignoreCase:
Claus Gittinger <cg@exept.de>
parents: 9312
diff changeset
  5091
    searchBlock isNil ifTrue:[^ #() ].
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5092
    ^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector].
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5093
!
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5094
4350
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5095
findSendersOf:aSelectorString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5096
    "search for all senders of aSelector in aCollectionOfMethods.
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5097
     Return a collection of methods"
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5098
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5099
    |searchBlock|
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5100
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5101
    searchBlock := self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:doMatch.
9312
71f84182390a changed: #findSendersOf:inMethods:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents: 9189
diff changeset
  5102
    searchBlock isNil ifTrue:[^ #() ].
4350
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5103
    ^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector].
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5104
!
0283d657411b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4341
diff changeset
  5105
17624
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5106
findSendersOfAll:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5107
    "search for methods which send all selectors in aCollectionOfSelectors in
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5108
     the classes contained in aCollectionOfClasses and their metaclasses.
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5109
     Return a collection of methods."
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5110
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5111
    ^ (self allCallsOn:(aCollectionOfSelectors first) 
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5112
                 in:aCollectionOfClasses 
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5113
                 ignoreCase:ignoreCase
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5114
                 match:false
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5115
    ) select:[:mthd |
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5116
        mthd messagesSent includesAll:aCollectionOfSelectors
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5117
    ].
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5118
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5119
    "
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5120
     SystemBrowser 
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5121
        findSendersOfAll:#(#'+' #'-')
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5122
        in:(Smalltalk allClasses)
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5123
        ignoreCase:false  
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5124
    "
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5125
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5126
    "Created: / 24-08-2017 / 13:10:25 / cg"
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5127
!
241986474521 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 17605
diff changeset
  5128
2811
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5129
findSendersOfAny:aCollectionOfSelectors in:aCollectionOfClasses ignoreCase:ignoreCase
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5130
    "search for all senders of any selector in aCollectionOfSelectors in
16586
60dcd6ba7859 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16529
diff changeset
  5131
     the classes contained in aCollectionOfClasses and their metaclasses.
2811
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5132
     Return a collection of methods.
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5133
     CAVEAT: searches multiple times (could be tuned alot if heavily used)"
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5134
6052
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5135
    ^ aCollectionOfSelectors 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5136
        collectAll:[:eachSelector |
6184
bcb22487bc67 senders of any - duplicates
Claus Gittinger <cg@exept.de>
parents: 6134
diff changeset
  5137
            (self allCallsOn:eachSelector 
6052
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5138
                 in:aCollectionOfClasses 
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5139
                 ignoreCase:ignoreCase
6184
bcb22487bc67 senders of any - duplicates
Claus Gittinger <cg@exept.de>
parents: 6134
diff changeset
  5140
                 match:false) asSet.
6052
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5141
        ].
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5142
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5143
"/    |allSenders|
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5144
"/
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5145
"/    allSenders := IdentitySet new.
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5146
"/    aCollectionOfSelectors do:[:eachSelector |
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5147
"/        allSenders addAll:(self allCallsOn:eachSelector in:aCollectionOfClasses ignoreCase:ignoreCase match:true)
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5148
"/    ].
e9e1f68e0b2e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6051
diff changeset
  5149
"/    ^ allSenders
2811
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5150
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5151
    "
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5152
     SystemBrowser findSendersOfAny:#(#'+' #'-')
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5153
                   in:(Array with:Number
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5154
                             with:Float
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5155
                             with:SmallInteger)
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5156
                   ignoreCase:false  
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5157
    "
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5158
!
85f8454fbd26 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2770
diff changeset
  5159
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5160
findSpecMethodsFor:specSymbol withString:aString in:aCollectionOfClasses ignoreCase:ignoreCase
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5161
    "return a collection of all specSymbol-spec methods in aCollectionOfClasses  
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5162
     containing a string in their source.
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5163
     This may be slow, since source-code has to be scanned."
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5164
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5165
    self 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5166
        findSpecMethodsFor:specSymbol 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5167
        withString:aString 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5168
        in:aCollectionOfClasses 
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5169
        ignoreCase:ignoreCase match:true
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5170
!
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5171
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5172
findSpecMethodsFor:specSymbol withString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5173
    "return a collection of all specSymbol-spec methods in aCollectionOfClasses  
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5174
     containing a string in their source.
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5175
     This may be slow, since source-code has to be scanned."
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5176
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5177
    |searchBlock innerSearchBlock|
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5178
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5179
    innerSearchBlock := self searchBlockForString:aString ignoreCase:ignoreCase match:doMatch.
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5180
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5181
    searchBlock := [:c :m :sel | 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5182
                            |resources| 
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5183
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5184
                            ((resources := m resources) size > 0
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5185
                              and:[resources includesKey:specSymbol]
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5186
                            ) ifTrue:[
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5187
                                innerSearchBlock value:c value:m value:sel
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5188
                            ]
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5189
                       ].
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5190
3314
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5191
    ^ self findMethodsIn:aCollectionOfClasses where:searchBlock.
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5192
!
adb48690e31d more searches
Claus Gittinger <cg@exept.de>
parents: 3244
diff changeset
  5193
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5194
findString:aString in:aCollectionOfClasses ignoreCase:ignoreCase 
5243
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  5195
    "return a collection of all methods in aCollectionOfClasses  
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  5196
     containing a string in their source.
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  5197
     This may be slow, since source-code has to be scanned."
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5198
    
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5199
    ^ self 
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5200
        findString:aString
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5201
        in:aCollectionOfClasses
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5202
        ignoreCase:ignoreCase match:true fullWordsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5203
        resourceMethodsOnly:false
8129
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5204
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5205
    "
9bb5ca89393a find code cleanup
Claus Gittinger <cg@exept.de>
parents: 8047
diff changeset
  5206
     SystemBrowser findString:'should' in:(Array with:Object) ignoreCase:false
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  5207
    "
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  5208
!
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  5209
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  5210
findString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
5243
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  5211
    "return a collection of all methods in aCollectionOfClasses  
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  5212
     containing a string in their source.
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  5213
     This may be slow, since source-code has to be scanned."
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  5214
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5215
    ^ self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5216
        findString:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5217
        in:aCollectionOfClasses 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5218
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5219
        resourceMethodsOnly:false
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5220
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5221
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5222
     SystemBrowser 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5223
        findString:'should'   
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5224
        in:(Array with:Object) 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5225
        ignoreCase:false
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5226
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5227
!
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5228
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5229
findString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5230
    "return a collection of all methods in aCollectionOfClasses  
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5231
     containing a string in their source.
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5232
     This may be slow, since source-code has to be scanned."
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5233
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5234
    ^ self
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5235
        findString:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5236
        in:aCollectionOfClasses 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5237
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5238
        resourceMethodsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5239
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5240
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5241
     SystemBrowser findString:'should'   in:(Array with:Object) ignoreCase:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5242
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5243
!
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5244
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5245
findString:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly resourceMethodsOnly:resourceMethodsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5246
    "return a collection of all methods in aCollectionOfClasses  
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5247
     containing a string in their source.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5248
     This may be slow, since source-code has to be scanned."
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5249
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5250
    |searchBlock|
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5251
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5252
    searchBlock := 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5253
        self 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5254
            searchBlockForString:aString 
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5255
            ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5256
            resourceMethodsOnly:resourceMethodsOnly.
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5257
    ^ self findMethodsIn:aCollectionOfClasses where:searchBlock.
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5258
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5259
    "
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5260
     SystemBrowser findString:'should'   in:(Array with:Object) ignoreCase:false
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5261
    "
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5262
!
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5263
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5264
findString:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch
5243
6b84674b60f4 +findCode:inMethods:
Claus Gittinger <cg@exept.de>
parents: 5226
diff changeset
  5265
    "return a collection of all methods in aCollectionOfClasses  
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5266
     containing a string in their source.
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5267
     This may be slow, since source-code has to be scanned."
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5268
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5269
    ^ self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5270
        findString:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5271
        inMethods:aCollectionOfMethods 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5272
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5273
        resourceMethodsOnly:false
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5274
!
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5275
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5276
findString:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5277
    "return a collection of all methods in aCollectionOfClasses  
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5278
     containing a string in their source.
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5279
     This may be slow, since source-code has to be scanned."
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5280
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5281
    ^ self
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5282
        findString:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5283
        inMethods:aCollectionOfMethods 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5284
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5285
        resourceMethodsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5286
!
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5287
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5288
findString:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly resourceMethodsOnly:resourceMethodsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5289
    "return a collection of all methods in aCollectionOfClasses  
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5290
     containing a string in their source.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5291
     This may be slow, since source-code has to be scanned."
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5292
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5293
    |searchBlock|
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5294
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5295
    searchBlock := self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5296
                    searchBlockForString:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5297
                    ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5298
                    resourceMethodsOnly:resourceMethodsOnly.
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5299
    ^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector].
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5300
!
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5301
18896
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5302
findString:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch resourceMethodsOnly:resourceMethodsOnly
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5303
    "return a collection of all methods in aCollectionOfClasses  
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5304
     containing a string in their source.
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5305
     This may be slow, since source-code has to be scanned."
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5306
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5307
    ^ self
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5308
        findString:aString 
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5309
        inMethods:aCollectionOfMethods 
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5310
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:false 
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5311
        resourceMethodsOnly:resourceMethodsOnly
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5312
!
4c5933261741 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18890
diff changeset
  5313
5877
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5314
findStringLiteral:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5315
    "return a collection of all methods in aCollectionOfClasses  
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5316
     containing a string in any of their string-literals."
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5317
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5318
    ^ self 
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5319
        findStringLiteral:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5320
        in:aCollectionOfClasses 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5321
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:false 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5322
        resourceMethodsOnly:false
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5323
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5324
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5325
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5326
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5327
!
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5328
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5329
findStringLiteral:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5330
    "return a collection of all methods in aCollectionOfClasses  
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5331
     containing a string in any of their string-literals."
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5332
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5333
    ^ self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5334
        findStringLiteral:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5335
        in:aCollectionOfClasses 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5336
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5337
        resourceMethodsOnly:false.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5338
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5339
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5340
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5341
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5342
!
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5343
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5344
findStringLiteral:aString in:aCollectionOfClasses ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly resourceMethodsOnly:resourceMethodsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5345
    "return a collection of all methods in aCollectionOfClasses  
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5346
     containing a string in any of their string-literals."
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5347
5877
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5348
    |searchBlock|
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5349
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5350
    searchBlock := self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5351
                    searchBlockForStringLiteral:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5352
                    ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5353
                    resourceMethodsOnly:resourceMethodsOnly.
5877
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5354
    ^ self findMethodsIn:aCollectionOfClasses where:searchBlock.
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5355
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5356
    "
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5357
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5358
    "
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5359
!
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5360
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5361
findStringLiteral:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5362
    "return a collection of all methods in aCollectionOfClasses  
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5363
     containing a string in any of their string-literals."
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5364
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5365
    ^ self
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5366
        findStringLiteral:aString inMethods:aCollectionOfMethods
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5367
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:false
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5368
        resourceMethodsOnly:false
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5369
!
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5370
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5371
findStringLiteral:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5372
    "return a collection of all methods in aCollectionOfClasses  
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5373
     containing a string in any of their string-literals."
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5374
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5375
    ^ self
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5376
        findStringLiteral:aString inMethods:aCollectionOfMethods 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5377
        ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5378
        resourceMethodsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5379
!
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5380
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5381
findStringLiteral:aString inMethods:aCollectionOfMethods ignoreCase:ignoreCase match:doMatch fullWordsOnly:fullWordsOnly resourceMethodsOnly:resourceMethodsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5382
    "return a collection of all methods in aCollectionOfClasses  
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5383
     containing a string in any of their string-literals."
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5384
5877
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5385
    |searchBlock|
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5386
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5387
    searchBlock := self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5388
                    searchBlockForStringLiteral:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5389
                    ignoreCase:ignoreCase 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5390
                    match:doMatch 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5391
                    fullWordsOnly:fullWordsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5392
                    resourceMethodsOnly:resourceMethodsOnly.
5877
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5393
    ^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector].
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5394
!
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  5395
9482
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5396
findUsingParseTreeSearcher:searcher in:aCollectionOfClasses
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5397
    "return a collection of all methods in aCollectionOfClasses  
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5398
     containing an exception raiser.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5399
     This may be slow, since source-code has to be scanned."
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5400
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5401
    |searchBlock|
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5402
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5403
    searchBlock := self searchBlockForParseTreeSearcher:searcher isMethod:false.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5404
    searchBlock isNil ifTrue:[ ^ nil].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5405
    ^ self findMethodsIn:aCollectionOfClasses where:searchBlock.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5406
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5407
    "Created: / 11-05-2010 / 16:18:36 / cg"
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5408
!
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5409
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5410
findUsingParseTreeSearcher:searcher inMethods:aCollectionOfMethods
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5411
    "return a collection of all methods in aCollectionOfClasses  
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5412
     containing an exception raiser.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5413
     This may be slow, since source-code has to be scanned."
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5414
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5415
    |searchBlock|
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5416
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5417
    searchBlock := self searchBlockForParseTreeSearcher:searcher isMethod:false.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5418
    searchBlock isNil ifTrue:[ ^ nil].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5419
    ^ aCollectionOfMethods select:[:m | searchBlock value:m mclass value:m value:m selector].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5420
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5421
    "Created: / 11-05-2010 / 16:20:12 / cg"
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5422
!
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5423
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5424
resourceMethodSearchBlockFor:aStringSearchBlock
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5425
    ^ [:c :m :sel | 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5426
           |resources| 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5427
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5428
           (m hasAnyResource:Method resourceTypes) ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5429
               aStringSearchBlock value:c value:m value:sel
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5430
           ] ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5431
               false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5432
           ]
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5433
      ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5434
!
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5435
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5436
searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase
4270
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5437
    ^ self searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:true
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5438
!
edcb3dfb262d senders of refactored
Claus Gittinger <cg@exept.de>
parents: 4235
diff changeset
  5439
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5440
searchBlockForAllCallsOn:aSelectorString ignoreCase:ignoreCase match:doMatchArg
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5441
    "return an optimized search block for the senders search.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5442
     Because this highly affects the speed of the senders-search in the browser,
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5443
     specialized blocks are returned, depending on whether a selector-match or casesensitive
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5444
     search is wanted 
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5445
     (these operations are executed a zillion times in an inner loop,
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5446
      therefore, the speedup is noticable)"
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5447
     
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5448
    |doMatch sel quickSearch idx|
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5449
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5450
    doMatch := doMatchArg.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5451
    (doMatch and:[aSelectorString = '*']) ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5452
        "a trivial block, which matches everything"
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5453
        ^ [:class :method :s | true].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5454
    ].    
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5455
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5456
    aSelectorString includesMatchCharacters ifFalse:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5457
        doMatch := false
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5458
    ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5459
    
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5460
    (doMatch or:[ignoreCase]) ifTrue:[
8685
b39dc53c40ae dont be too lazy in senders-search (do not return all accesses to
Claus Gittinger <cg@exept.de>
parents: 8678
diff changeset
  5461
        "/ a matchString or ignoreCase - need string matching procedure
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5462
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5463
        quickSearch := aSelectorString.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5464
        (quickSearch startsWith:'*') ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5465
            quickSearch := quickSearch copyButFirst
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5466
        ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5467
        (quickSearch endsWith:'*') ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5468
            quickSearch := quickSearch copyButLast
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5469
        ].
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5470
        
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5471
        "/ for keyword selector searches, only look for the first KW-part in the quicksearch
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5472
        "/ for matches, only look for substrings up to the first match character
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5473
        (idx := quickSearch indexOfAny:'*#[:') ~~ 0 ifTrue:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5474
            quickSearch := quickSearch copyTo:idx-1.
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5475
        ].
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5476
        
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5477
        (ignoreCase and:[quickSearch includesMatchCharacters not]) ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5478
            doMatch ifFalse:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5479
                ^ [:class :methodArg :s |
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5480
                    |method src inLiterals skip|
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5481
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5482
                    inLiterals := skip := false.
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5483
                    method := methodArg originalMethodIfWrapped.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5484
                    method isLazyMethod ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5485
                        src := method source.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5486
                        (src notNil and:[src includesString:aSelectorString caseSensitive:false]) ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5487
                            method makeRealMethod.
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5488
                        ] ifFalse:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5489
                            skip := true
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5490
                        ].    
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5491
                    ].
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5492
                    skip ifFalse:[
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5493
                        inLiterals := 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5494
                            (method 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5495
                                literalsDetect:[:aLiteral|
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5496
                                    (aLiteral isMemberOf:Symbol) 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5497
                                    and:[(aLiteral sameAs:aSelectorString)]] 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5498
                                ifNone:nil) notNil
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5499
                    ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5500
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5501
                    inLiterals 
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5502
                    and:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5503
                        method messagesSent contains:[:msg | msg sameAs:aSelectorString ]
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5504
                    ]
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5505
               ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5506
            ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5507
            
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5508
            ^ [:class :methodArg :s |
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5509
                |method src inLiterals skip|
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5510
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5511
                inLiterals := skip := false.
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5512
                method := methodArg originalMethodIfWrapped.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5513
                method isLazyMethod ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5514
                    src := method source.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5515
                    (src notNil and:[src includesString:quickSearch caseSensitive:false]) ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5516
                        method makeRealMethod.
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5517
                    ] ifFalse:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5518
                        skip := true
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5519
                    ].
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5520
                ].    
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5521
                skip ifFalse:[
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5522
                    inLiterals := 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5523
                        (method 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5524
                            literalsDetect:[:aLiteral|
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5525
                                (aLiteral isMemberOf:Symbol) 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5526
                                and:[(aLiteral includesString:quickSearch caseSensitive:false)
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5527
                                and:[(aSelectorString match:aLiteral caseSensitive:false)]]] 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5528
                            ifNone:nil) notNil
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5529
                ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5530
      
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5531
                inLiterals 
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5532
                and:[
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5533
                    method messagesSent 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5534
                        contains:[:sel | aSelectorString match:aSelectorString caseSensitive:false]
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5535
                ]
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5536
           ].
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5537
        ].
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5538
        
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5539
        (ignoreCase or:[quickSearch includesMatchCharacters]) ifFalse:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5540
            ^ [:class :methodArg :s |
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5541
                |method src inLiterals skip|
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5542
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5543
                inLiterals := skip := false.
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5544
                method := methodArg originalMethodIfWrapped.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5545
                method isLazyMethod ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5546
                    src := method source.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5547
                    (src notNil and:[src includesString:quickSearch]) ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5548
                        method makeRealMethod.
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5549
                    ] ifFalse:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5550
                        skip := true
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5551
                    ].    
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5552
                ].    
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5553
                skip ifFalse:[
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5554
                    inLiterals := 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5555
                        (method 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5556
                            literalsDetect:[:aLiteral|
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5557
                                (aLiteral isMemberOf:Symbol) 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5558
                                and:[(aLiteral includesString:quickSearch)
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5559
                                and:[(aSelectorString match:aLiteral)]]] 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5560
                            ifNone:nil) notNil
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5561
                ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5562
                inLiterals and:[ method messagesSent includes:aSelectorString]
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5563
           ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5564
        ]. 
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5565
        ^ [:class :methodArg :s |
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5566
            |method src inLiterals skip|
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5567
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5568
            method := methodArg originalMethodIfWrapped.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5569
            "/ expensive search
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5570
            inLiterals := skip := false.
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5571
            method isLazyMethod ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5572
                src := method source.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5573
                (src notNil and:[src includesMatchString:aSelectorString]) ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5574
                    method makeRealMethod.
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5575
                ] ifFalse:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5576
                    skip := true.
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5577
                ].
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5578
            ].    
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5579
            skip ifFalse:[
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5580
                inLiterals := 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5581
                    (method literalsDetect:[:aLiteral|
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5582
                        (aLiteral isMemberOf:Symbol) 
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5583
                        and:[ aSelectorString match:aLiteral asLowercase caseSensitive:ignoreCase not]
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  5584
                    ] ifNone:nil) notNil
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5585
            ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5586
            inLiterals 
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5587
            and:[ 
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5588
                method messagesSent 
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5589
                    contains:[:anySelector | 
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5590
                        aSelectorString match:anySelector caseSensitive:ignoreCase not
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5591
                    ] 
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5592
            ]
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5593
       ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5594
    ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5595
    
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5596
    "/ no matchString and not ignoring case - can do it much faster
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5597
    sel := aSelectorString asSymbolIfInterned.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5598
    sel isNil ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5599
        ^ nil     "/ none
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5600
    ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5601
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5602
    quickSearch := sel.
16395
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5603
    "/ for keyword selector searches, only look for the first KW-part in the quicksearch
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5604
    (idx := quickSearch indexOf:$:) ~~ 0 ifTrue:[
cf67c42049ec #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16384
diff changeset
  5605
        quickSearch := quickSearch copyTo:idx-1.
16337
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5606
    ].
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5607
    
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5608
    ^ [:class :methodArg :s |
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5609
        |method src|
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5610
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5611
        method := methodArg originalMethodIfWrapped.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5612
        method isLazyMethod ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5613
            src := method source.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5614
            (src notNil and:[src includesString:quickSearch]) ifTrue:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5615
                method makeRealMethod.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5616
                method referencesLiteral: "sends:" sel.
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5617
            ] ifFalse:[
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5618
                false
7a86c38773bd #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16238
diff changeset
  5619
            ]
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5620
        ] ifFalse:[
17328
e110bd817e78 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17180
diff changeset
  5621
            method sendsSelector:sel
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5622
        ]
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5623
    ].
10416
82d17ccb68ad changed: #searchBlockForAllCallsOn:ignoreCase:match:
Claus Gittinger <cg@exept.de>
parents: 10386
diff changeset
  5624
17328
e110bd817e78 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17180
diff changeset
  5625
    "Modified: / 05-02-2017 / 01:25:14 / cg"
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5626
!
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5627
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5628
searchBlockForCode:aCodeString in:aCollectionOfClasses isMethod:isMethod
10546
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5629
    "return a block to search for a piece of code.
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5630
     intelligent search: because parsing and the parseTree-match is a relatively
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5631
     expensive operation, we try hard to reduce the amount of searched methods by:
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5632
        - extracting sent messages from the pattern, and limiting the search to
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5633
          methods which also send all those messages,
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5634
        - extracting accessed globals from the pattern, and limiting the search to
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5635
          methods which also refer to those globals"
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5636
11638
344d7d06f1d2 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 11506
diff changeset
  5637
    |errAction searchTree searcher globalVariablesUsed usedSymbols usedStrings
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5638
     sentMessages searchBlock foundMatch numMethodArgs methodSelector nameSpacesForGlobals|
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5639
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5640
"/self halt.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5641
"/rule := ParseTreeLintRule 
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5642
"/    createParseTreeRule: (Array with: aCodeString)
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5643
"/    method: isMethod
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5644
"/    name: 'Search for: ' , aCodeString.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5645
"/self halt.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5646
"/
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5647
"/    searchBlock := [:c :m :sel | 
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5648
"/        rslt := SmalllintChecker
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5649
"/            runRule:rule
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5650
"/            onEnvironment: (ClassEnvironment onEnvironment:(BrowserEnvironment new) classes:(Array with:c)).
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5651
"/        
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5652
"/        self halt.
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5653
"/    ].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5654
"/^ searchBlock.
5226
35a9709e73ee code search
Claus Gittinger <cg@exept.de>
parents: 5135
diff changeset
  5655
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5656
    errAction := 
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5657
        [:errMsg :pos | 
18882
78328ddb6f7b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18869
diff changeset
  5658
            Dialog warn:'Error during pattern parse: %1 (position %2)'
78328ddb6f7b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18869
diff changeset
  5659
                   with:errMsg with:pos.
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5660
           ^ nil
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5661
        ].
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5662
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5663
    isMethod ifTrue:[
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5664
        searchTree := RBParser 
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5665
                    parseRewriteMethod:aCodeString 
5226
35a9709e73ee code search
Claus Gittinger <cg@exept.de>
parents: 5135
diff changeset
  5666
                    onError: errAction.
8281
67f0cd20adf0 method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents: 8158
diff changeset
  5667
        numMethodArgs := searchTree arguments size.
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5668
        (searchTree selectorParts contains:[:part | part isPatternVariable]) ifFalse:[
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5669
            methodSelector := searchTree selector.
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5670
        ].    
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5671
    ] ifFalse:[
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5672
        searchTree := RBParser 
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5673
                    parseRewriteExpression:aCodeString 
5226
35a9709e73ee code search
Claus Gittinger <cg@exept.de>
parents: 5135
diff changeset
  5674
                    onError: errAction.
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5675
    ].
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  5676
    
10546
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5677
    "/ extract messages sent by the pattern
6368
ef36274cbbf1 faster code-search
Claus Gittinger <cg@exept.de>
parents: 6353
diff changeset
  5678
    Error handle:[:ex |
12837
80c40ce2cd56 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12831
diff changeset
  5679
        self halt:'check this, please'.
6368
ef36274cbbf1 faster code-search
Claus Gittinger <cg@exept.de>
parents: 6353
diff changeset
  5680
    ] do:[
6549
cd47faed29f6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6546
diff changeset
  5681
        sentMessages := searchTree sentMessages.         
5135
d844ec803124 improved code search
Claus Gittinger <cg@exept.de>
parents: 5112
diff changeset
  5682
    ].
6581
ae69dc905971 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6560
diff changeset
  5683
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5684
    nameSpacesForGlobals := Set with:Smalltalk.
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5685
    aCollectionOfClasses do:[:eachClass |
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5686
        nameSpacesForGlobals add:eachClass topNameSpace
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5687
    ].
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5688
10546
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5689
    "/ extract globals used by the pattern
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5690
    globalVariablesUsed := OrderedCollection new.
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5691
    searchTree referencedVariables do:[:node |
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5692
        |nm ns alternatives|
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5693
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5694
        node isPatternNode ifFalse:[
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5695
            nm := node name.
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5696
            ns := nameSpacesForGlobals detect:[:ns | ns includesKey: nm asSymbol] ifNone:nil.
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5697
            ns notNil ifTrue:[
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5698
                alternatives := OrderedCollection new.
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5699
                nm asSymbolIfInterned notNil ifTrue:[ alternatives add: nm asSymbol ].
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5700
                ('Smalltalk::',nm) asSymbolIfInterned notNil ifTrue:[ alternatives add: ('Smalltalk::',nm) asSymbol ].
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5701
                (ns name,'::',nm) asSymbolIfInterned notNil ifTrue:[ alternatives add: (ns name,'::',nm) asSymbol ].
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5702
                nm asSymbolIfInterned notNil ifTrue:[ alternatives add: nm asSymbol ].
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5703
                globalVariablesUsed add:alternatives
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5704
            ].
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5705
        ]
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5706
    ].
5135
d844ec803124 improved code search
Claus Gittinger <cg@exept.de>
parents: 5112
diff changeset
  5707
10546
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5708
    "/ sorry: 
174df6f8a170 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 10416
diff changeset
  5709
    "/      cannot use literals to speedup the search, because stc does not store
12056
28e46bad9ca9 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12040
diff changeset
  5710
    "/      constants in the literal-array. However, we can do a string search on
28e46bad9ca9 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12040
diff changeset
  5711
    "/      them, to avoid parsing.
28e46bad9ca9 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12040
diff changeset
  5712
    usedSymbols := searchTree usedSymbols.
28e46bad9ca9 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12040
diff changeset
  5713
    usedStrings := searchTree usedLiterals select:[:lit | lit isString].
7395
4aa4c6b9a161 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7361
diff changeset
  5714
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5715
    searcher := ParseTreeSearcher new.
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5716
    isMethod ifTrue:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5717
        searcher 
8281
67f0cd20adf0 method-code search tuned: filter by number of methodArgs, if known.
Claus Gittinger <cg@exept.de>
parents: 8158
diff changeset
  5718
            matchesMethod:aCodeString
5256
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5719
            do:[:aNode :answer | foundMatch := true].
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5720
    ] ifFalse:[
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5721
        searcher 
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5722
            matchesTree:searchTree
c37bc91f2460 better none-found behavior for unary messages
Claus Gittinger <cg@exept.de>
parents: 5254
diff changeset
  5723
            do:[:aNode :answer | foundMatch := true].
6303
47c12063b000 Fix BC-Compile error
Stefan Vogel <sv@exept.de>
parents: 6184
diff changeset
  5724
    ].
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  5725
    searcher computeQuickSearchStrings.
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5726
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5727
    searchBlock := 
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5728
        [:c :m :sel | 
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5729
            |isSTCCompiled allSelectorsInLiteralArray allMessagesSent 
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5730
             allGlobalsReferenced allUsedSymbolsInLiteralArray allStringsInLiteralArray
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5731
             allSent src rslt parseTree
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5732
             literalsInMethod skipMethod|       
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5733
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5734
            foundMatch := false.
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5735
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5736
            "/ can speedup the search, 
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5737
            "/ by filtering for number of message-args or method selector first...
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5738
            skipMethod := false.
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5739
            isMethod ifTrue:[ 
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5740
                (numMethodArgs notNil and:[ numMethodArgs ~= m numArgs ]) ifTrue:[ skipMethod := true ].
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5741
                (methodSelector notNil and:[ methodSelector ~= sel ]) ifTrue:[ skipMethod := true ].
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5742
            ].  
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5743
            skipMethod ifFalse:[
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5744
                m isLazyMethod ifTrue:[
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5745
                    src := m source.
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5746
                    src notNil ifTrue:[
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5747
                        m makeRealMethod.
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5748
                    ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5749
                ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5750
                "/ can speedup the search, by quickly filtering for sent messages...
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5751
                literalsInMethod := m literals.
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5752
                allSelectorsInLiteralArray := sentMessages isEmptyOrNil or:[ literalsInMethod includesAll:sentMessages ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5753
                allSelectorsInLiteralArray ifTrue:[
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5754
                    "/ and used symbols/globals first...
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5755
                    allUsedSymbolsInLiteralArray := usedSymbols isEmptyOrNil or:[ literalsInMethod includesAll:usedSymbols ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5756
                    allUsedSymbolsInLiteralArray ifTrue:[
16600
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5757
                        "/ if ANY string is in match, ANY string must be in method (not true, but I am lazy)
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5758
                        "/ that does not work for stc compiled code, because it does not put strings into the literal array
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5759
                        isSTCCompiled := m byteCode isNil.
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5760
                        isSTCCompiled ifTrue:[
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5761
                            allStringsInLiteralArray := true.   "/ stc-compiled: don't know    
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5762
                        ] ifFalse:[
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5763
                            allStringsInLiteralArray := usedStrings isEmptyOrNil
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5764
                                                        or:[ literalsInMethod includesAll:usedStrings "literalsInMethod contains:[:lit | lit isString]" ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5765
                        ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5766
                        allStringsInLiteralArray ifTrue:[
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5767
                            allGlobalsReferenced := globalVariablesUsed conform:[:varNames | varNames contains:[:varName | m referencesGlobal:varName]].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5768
                            allGlobalsReferenced ifTrue:[
16600
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5769
                                allMessagesSent := sentMessages isEmptyOrNil 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5770
                                                   or:[ m messagesSent includesAll:sentMessages ].
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5771
                                allMessagesSent ifTrue:[
16600
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5772
                                    src := m source.
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5773
                                    src isNil ifTrue:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5774
                                        ('Browser [info]: no source for ' , m printString) infoPrintCR.
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5775
                                    ] ifFalse:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5776
                                        isSTCCompiled ifTrue:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5777
                                            usedStrings notEmptyOrNil ifTrue:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5778
                                                "/ now that we have the source, scan the source for the literal strings,
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5779
                                                "/ before doing a slow parse
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5780
                                                allStringsInLiteralArray := usedStrings conform:[:eachString | src includesString:eachString].
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5781
                                            ]
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5782
                                        ].
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5783
                                        allStringsInLiteralArray ifTrue:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5784
                                            (searcher canQuicklyReject:src) ifTrue:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5785
                                                "/ Transcript show:'qReject: '; showCR:m whoString.
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5786
                                            ] ifFalse:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5787
                                                "/ the rest is done by the slower RB-match process...
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5788
                                                parseTree := 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5789
                                                    RBParser 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5790
                                                        parseSearchMethod:src 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5791
                                                        onError: [:str :pos | 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5792
                                                            "/ self halt.
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5793
                                                            Transcript show:'Error during search in '; showCR:m. 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5794
                                                            Transcript showCR:str. 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5795
                                                            Transcript showCR:pos. 
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5796
                                                            nil
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5797
                                                        ].
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5798
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5799
                                                parseTree notNil ifTrue:[
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5800
                                                    searcher executeTree:parseTree.
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5801
                                                    "/ notice: searcher sets foundMatch !!
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5802
                                                ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5803
                                            ].
16600
2c71384ebdc4 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16597
diff changeset
  5804
                                        ].
5251
847d633792ce tuned code search if global vars are involved
Claus Gittinger <cg@exept.de>
parents: 5243
diff changeset
  5805
                                    ]
5135
d844ec803124 improved code search
Claus Gittinger <cg@exept.de>
parents: 5112
diff changeset
  5806
                                ]
6581
ae69dc905971 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6560
diff changeset
  5807
                            ]
16597
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5808
                        ]
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5809
                    ]
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5810
                ]
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5811
            ].
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5812
            foundMatch.
fb8d01e7020f #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16586
diff changeset
  5813
       ].
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5814
    ^ searchBlock.
7395
4aa4c6b9a161 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7361
diff changeset
  5815
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5816
    "Created: / 02-05-2011 / 13:25:01 / sr"
11638
344d7d06f1d2 changed: #searchBlockForCode:in:isMethod:
Claus Gittinger <cg@exept.de>
parents: 11506
diff changeset
  5817
    "Modified: / 20-07-2012 / 19:07:36 / cg"
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  5818
    "Modified: / 15-07-2019 / 15:27:48 / Claus Gittinger"
9879
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5819
!
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5820
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5821
searchBlockForCode:aCodeString isMethod:isMethod
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5822
    "return a block to search for a piece of code (intelligent search)."
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5823
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5824
    ^ self searchBlockForCode:aCodeString in:#() isMethod:isMethod
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5825
5109d9da29eb added: #searchBlockForCode:in:isMethod:
sr
parents: 9685
diff changeset
  5826
    "Modified: / 02-05-2011 / 13:26:18 / sr"
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5827
!
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5828
9482
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5829
searchBlockForParseTreeSearcher:searcher isMethod:isMethod
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5830
    "return a block to search for a piece of code (intelligent search)."
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5831
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5832
    |errAction searchBlock foundMatch|
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5833
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5834
    errAction := [:str :pos | 
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5835
                    Dialog warn:'Error during parse: ' , str , ' (position ' , pos printString , ')'.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5836
                    ^ nil
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5837
                 ].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5838
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5839
    searchBlock := [:c :m :sel | 
9483
eead021c9729 changed: #searchBlockForParseTreeSearcher:isMethod:
Claus Gittinger <cg@exept.de>
parents: 9482
diff changeset
  5840
                        |src parseTree|       
9482
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5841
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5842
                        foundMatch := false.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5843
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5844
                        m isLazyMethod ifTrue:[
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5845
                            src := m source.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5846
                            src notNil ifTrue:[
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5847
                                m makeRealMethod.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5848
                            ].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5849
                        ].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5850
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5851
                        src := m source.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5852
                        src isNil ifTrue:[
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5853
                            ('Browser [info]: no source for ' , m printString) infoPrintCR.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5854
                        ] ifFalse:[
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5855
                            parseTree := RBParser 
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5856
                                            parseSearchMethod:src 
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5857
                                            onError: [:str :pos | 
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5858
                                                Transcript show:'Error in '; showCR:m. 
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5859
                                                Transcript showCR:str. 
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5860
                                                Transcript showCR:pos. 
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5861
                                                nil].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5862
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5863
                            parseTree notNil ifTrue:[
9483
eead021c9729 changed: #searchBlockForParseTreeSearcher:isMethod:
Claus Gittinger <cg@exept.de>
parents: 9482
diff changeset
  5864
                                foundMatch := searcher executeTree:parseTree initialAnswer:false.
9482
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5865
                            ]
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5866
                        ].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5867
                        foundMatch.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5868
                   ].
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5869
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5870
    ^ searchBlock.
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5871
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5872
    "Created: / 11-05-2010 / 16:14:25 / cg"
9483
eead021c9729 changed: #searchBlockForParseTreeSearcher:isMethod:
Claus Gittinger <cg@exept.de>
parents: 9482
diff changeset
  5873
    "Modified: / 11-05-2010 / 22:05:09 / cg"
9482
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5874
!
542a208d6273 added:7 methods
Claus Gittinger <cg@exept.de>
parents: 9334
diff changeset
  5875
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5876
searchBlockForReferendsOf:aGlobalName
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5877
    "return a block which searches for all methods which reference a global named aGlobalName,
17967
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  5878
     which may be a matchpattern.
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  5879
     If aGlobalName is inside a namespace (a private or namespace-global),
65b7e94f77a7 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17775
diff changeset
  5880
     the name should be <namespace>::<aGlobalName>"
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5881
12844
2a189ba77e75 Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 12837
diff changeset
  5882
    |globalsPlainName idx sym1 sym2|
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5883
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5884
    globalsPlainName := aGlobalName.
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5885
    (idx := globalsPlainName lastIndexOf:$:) ~~ 0 ifTrue:[
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5886
        globalsPlainName := globalsPlainName copyFrom:idx+1.
11964
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5887
        (globalsPlainName size == 0 or:[globalsPlainName = '*']) ifTrue:[
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5888
            globalsPlainName := aGlobalName
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5889
        ]
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5890
    ].
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5891
9660
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5892
    "/ matchingGlobalNames := OrderedCollection new.
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5893
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5894
    aGlobalName includesMatchCharacters ifFalse:[
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5895
        sym1 := aGlobalName asSymbolIfInterned. 
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5896
        sym2 := globalsPlainName asSymbolIfInterned.
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5897
        (sym1 isNil and:[ sym2 isNil ]) ifTrue:[
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5898
            ^ [:cls :mthd :sel | false ].
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5899
        ].
11964
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5900
        "/ if any is nil, search for the same
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5901
        sym1 := sym1 ? sym2.
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5902
        sym2 := sym2 ? sym1.
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5903
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5904
        ^ [:cls :mthd :sel |
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5905
            |mSource ok m usedGlobals|
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5906
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5907
            ok := false.
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5908
            "/ kludge: Lazy methods do not include symbols in the literal array - sigh
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5909
            mthd isLazyMethod ifTrue:[
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5910
                mSource := mthd source.
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5911
                (mSource notNil) ifTrue:[
11964
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5912
                    (mSource includesString:(sym2)) ifTrue:[
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5913
                        usedGlobals := mthd usedGlobals.
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5914
                        (usedGlobals includes:sym1) ifTrue:[
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5915
                            ok := true
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5916
                        ] ifFalse:[
11964
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5917
                            (sym1 ~= sym2 and:[usedGlobals includes:sym2]) ifTrue:[
9660
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5918
                                ok := true
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5919
                            ]
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5920
                        ]
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5921
                    ]
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5922
                ]
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5923
            ] ifFalse:[
13071
33d05d455513 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13046
diff changeset
  5924
                m := mthd originalMethodIfWrapped.
11964
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5925
                ((m refersToLiteral:sym1) or:[ sym1 ~= sym2 and:[m refersToLiteral:sym2] ]) ifTrue:[
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5926
                    usedGlobals := m usedGlobals.
11964
8670bf08f225 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 11941
diff changeset
  5927
                    ok := (usedGlobals includes:sym1) or:[ sym1 ~= sym2 and:[usedGlobals includes:sym2] ]
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5928
                ].
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5929
            ].
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5930
            ok
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5931
        ].
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5932
    ].
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5933
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5934
    ^ [:cls :mthd :sel | 
9660
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5935
        |mSource usedGlobals global m|
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5936
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5937
        "/ kludge: Lazy methods do not include symbols in the literal array - sigh
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5938
        mthd isLazyMethod ifTrue:[
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5939
            mSource := mthd source.
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5940
            mSource notNil ifTrue:[
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5941
                usedGlobals := mthd usedGlobals
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5942
            ]
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5943
        ] ifFalse:[
13071
33d05d455513 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13046
diff changeset
  5944
            m := mthd originalMethodIfWrapped.
9660
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5945
            (m literals contains:[:lit | (aGlobalName match:lit) or:[globalsPlainName match:lit]]) ifTrue:[
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5946
                usedGlobals := m usedGlobals
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5947
            ].
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5948
        ].
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5949
        usedGlobals notNil ifTrue:[
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5950
            global := usedGlobals detect:[:lit | aGlobalName match:lit] ifNone:nil.
9660
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5951
            global isNil ifTrue:[
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5952
                global := usedGlobals detect:[:lit | globalsPlainName match:lit] ifNone:nil.
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5953
            ].
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5954
"/            global notNil ifTrue:[
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5955
"/                matchingGlobalNames add:global.
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5956
"/            ]
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5957
        ].
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5958
        global notNil
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5959
    ].
9660
e8b452501452 changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 9578
diff changeset
  5960
10386
105f6c60ce2d changed: #searchBlockForReferendsOf:
Claus Gittinger <cg@exept.de>
parents: 10346
diff changeset
  5961
    "Modified: / 24-07-2011 / 09:50:30 / cg"
9002
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5962
!
885404958f53 code cleanup
Claus Gittinger <cg@exept.de>
parents: 8894
diff changeset
  5963
16451
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  5964
searchBlockForString:aString ignoreCase:ignoreCase match:doMatchArg
5094
242cf19c25ce code search
Claus Gittinger <cg@exept.de>
parents: 5090
diff changeset
  5965
    "return a block to search for a string."
4235
bba308f409dd images & another special case startup
Claus Gittinger <cg@exept.de>
parents: 4222
diff changeset
  5966
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5967
    ^ self 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5968
        searchBlockForString:aString 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5969
        ignoreCase:ignoreCase 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5970
        match:doMatchArg 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5971
        fullWordsOnly:false
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5972
        resourceMethodsOnly:false
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5973
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5974
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5975
     SystemBrowser 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5976
        findString:'should'   
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5977
        in:(Array with:Object) 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5978
        ignoreCase:false
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5979
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5980
!
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5981
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5982
searchBlockForString:aString ignoreCase:ignoreCase match:doMatchArg fullWordsOnly:fullWordsOnly
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5983
    "return a block to search for a string."
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  5984
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5985
    ^ self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5986
        searchBlockForString:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5987
        ignoreCase:ignoreCase match:doMatchArg fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5988
        resourceMethodsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5989
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5990
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5991
     SystemBrowser findString:'should'   in:(Array with:Object) ignoreCase:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5992
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5993
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5994
    "Modified: / 05-06-2019 / 17:02:24 / Claus Gittinger"
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5995
!
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5996
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5997
searchBlockForString:aString ignoreCase:ignoreCase match:doMatchArg fullWordsOnly:fullWordsOnly resourceMethodsOnly:resourceMethodsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5998
    "return a block to search for a string."
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  5999
16468
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6000
    |checkBlock lineCheckBlock pattern doMatch
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6001
     quickCheckString firstMatchIndex lastMatchIndex stringSearchBlock|
16451
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6002
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6003
    doMatch := doMatchArg.
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6004
    aString includesMatchCharacters ifFalse:[
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6005
        doMatch := false.
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6006
    ].    
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6007
    doMatch ifTrue:[
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6008
        "a matchString"
16468
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6009
        pattern := aString.
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6010
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6011
        firstMatchIndex := aString indexOfAny:'*#['.
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6012
        lastMatchIndex := aString lastIndexOfAny:'*#['.
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6013
        "/ which is longer - left or right part
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6014
        firstMatchIndex-1 "nleft" > (aString size-lastMatchIndex) "nright" ifTrue:[
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6015
            "/ use left part as quickSearch
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6016
            quickCheckString := aString copyTo:firstMatchIndex-1
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6017
        ] ifFalse:[
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6018
            "/ use right part as quickSearch
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6019
            quickCheckString := aString copyFrom:lastMatchIndex+1            
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6020
        ].    
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6021
16451
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6022
        aString first == $* ifFalse:[
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6023
            pattern := '*',pattern
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6024
        ].    
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6025
        aString last == $* ifFalse:[
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6026
            pattern := pattern,'*'
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6027
        ].
16468
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6028
        "/ when doing a match, be careful to not match acrosss lines
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6029
        lineCheckBlock := [:line | pattern match:line caseSensitive:ignoreCase not].
16468
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6030
        quickCheckString size > 1 ifTrue:[
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6031
            checkBlock := [:src | 
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6032
                            (src includesString:quickCheckString caseSensitive:ignoreCase not)
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6033
                            and:[ (lineCheckBlock value:src)
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6034
                            and:[ src asStringCollection contains:lineCheckBlock ]]].
16468
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6035
        ] ifFalse:[    
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6036
            checkBlock := [:src | 
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6037
                            (lineCheckBlock value:src)
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6038
                            and:[ src asStringCollection contains:lineCheckBlock ]].
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6039
        ].
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6040
    ] ifFalse:[
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6041
        checkBlock := [:src | src includesString:aString caseSensitive:ignoreCase not]
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6042
    ].
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6043
    
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6044
    stringSearchBlock :=
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6045
        [:cls :mthd :sel | 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6046
            |src found idx1 reallyFound ch1 ch2|
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6047
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6048
            found := false.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6049
            src := mthd source.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6050
            src isNil ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6051
                ('Browser [info]: no source for ' , mthd printString) infoPrintCR.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6052
            ] ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6053
                found := checkBlock value:src.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6054
                (fullWordsOnly and:[found]) ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6055
                    self halt.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6056
                    doMatch ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6057
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6058
                    ] ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6059
                        reallyFound := false.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6060
                        idx1 := 0.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6061
                        [ 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6062
                            reallyFound not
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6063
                            and:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6064
                                idx1 := src indexOfSubCollection:aString startingAt:idx1+1 ifAbsent:0 caseSensitive:ignoreCase not.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6065
                                idx1 ~~ 0]
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6066
                        ] whileTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6067
                            "/ see if it is a free-standing word
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6068
                            reallyFound := true.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6069
                            idx1 > 1 ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6070
                                ch1 := src at:idx1-1.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6071
                                (ch1 isLetterOrUnderline) ifTrue:[ reallyFound := false].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6072
                            ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6073
                            (idx1+aString size-1) < src size ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6074
                                ch2 := src at:idx1+aString size.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6075
                                (ch2 isLetterOrUnderline) ifTrue:[ reallyFound := false].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6076
                            ].
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6077
                        ].
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6078
                        found := reallyFound
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6079
                    ].                
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6080
                ].                
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6081
            ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6082
            found
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6083
        ].
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6084
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6085
    resourceMethodsOnly ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6086
        ^ self resourceMethodSearchBlockFor:stringSearchBlock
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6087
    ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6088
    ^ stringSearchBlock
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6089
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6090
    "
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6091
     SystemBrowser findString:'should'   in:(Array with:Object) ignoreCase:false
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6092
    "
18807
142bba6ab3be #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18705
diff changeset
  6093
142bba6ab3be #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 18705
diff changeset
  6094
    "Modified: / 05-06-2019 / 17:02:24 / Claus Gittinger"
4152
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  6095
!
92e3975f1904 allow for non-matching search (searching for impl. of '*')
Claus Gittinger <cg@exept.de>
parents: 4150
diff changeset
  6096
16451
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6097
searchBlockForStringLiteral:aString ignoreCase:ignoreCase match:doMatchArg
5877
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6098
    "return a block to search for a string-literal."
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6099
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6100
    ^ self
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6101
        searchBlockForStringLiteral:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6102
        ignoreCase:ignoreCase match:doMatchArg fullWordsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6103
        resourceMethodsOnly:false
16691
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6104
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6105
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6106
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:true
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6107
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6108
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:true
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6109
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:false
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6110
    "
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6111
!
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6112
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6113
searchBlockForStringLiteral:aString ignoreCase:ignoreCase match:doMatchArg fullWordsOnly:fullWordsOnly
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6114
    "return a block to search for a string-literal."
9998797358f3 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16600
diff changeset
  6115
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6116
    ^ self 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6117
        searchBlockForStringLiteral:aString 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6118
        ignoreCase:ignoreCase match:doMatchArg fullWordsOnly:fullWordsOnly 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6119
        resourceMethodsOnly:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6120
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6121
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6122
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:true
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6123
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6124
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:true
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6125
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:false
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6126
    "
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6127
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6128
    "Modified: / 20-04-2017 / 11:28:05 / stefan"
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6129
!
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6130
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6131
searchBlockForStringLiteral:aString ignoreCase:ignoreCase match:doMatchArg fullWordsOnly:fullWordsOnly resourceMethodsOnly:resourceMethodsOnly
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6132
    "return a block to search for a string-literal."
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6133
16468
3df3e4d3ea9d #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16462
diff changeset
  6134
    |pattern doMatch checkLiteral checkSource 
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6135
     quickCheckString firstMatchIndex lastMatchIndex stringSearchBlock|
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6136
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6137
    aString isEmpty ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6138
        stringSearchBlock := [:cls :mthd :sel | true ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6139
    ] ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6140
        doMatch := doMatchArg.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6141
        (aString includesMatchCharacters) ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6142
            doMatch := false
16451
50d4e491a50e #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16449
diff changeset
  6143
        ].
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6144
        doMatch ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6145
            "a matchString"
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6146
            pattern := aString.    
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6147
            aString first == $* ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6148
                pattern := '*',pattern
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6149
            ].    
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6150
            aString last == $* ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6151
                pattern := pattern,'*'
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6152
            ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6153
            checkLiteral := [:lit | pattern match:lit caseSensitive:ignoreCase not].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6154
            firstMatchIndex := aString indexOfAny:'*#['.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6155
            lastMatchIndex := aString lastIndexOfAny:'*#['.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6156
            "/ which is longer - left or right part?
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6157
            firstMatchIndex-1 "nleft" > (aString size-lastMatchIndex) "nright" ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6158
                "/ use left part as quickSearch
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6159
                quickCheckString := aString copyTo:firstMatchIndex-1
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6160
            ] ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6161
                "/ use right part as quickSearch
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6162
                quickCheckString := aString copyFrom:lastMatchIndex+1            
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6163
            ].    
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6164
            quickCheckString size > 1 ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6165
                checkSource := [:src | src includesString:quickCheckString caseSensitive:ignoreCase not]
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6166
            ] ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6167
                checkSource := [:src | true]. "/ not worth the effort
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6168
            ].    
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  6169
        ] ifFalse:[
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6170
            ignoreCase ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6171
                checkLiteral := [:lit | lit includesString:aString caseSensitive:true].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6172
                checkSource := [:src | src includesString:aString caseSensitive:true].
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  6173
            ] ifFalse:[
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6174
                checkLiteral := [:lit | lit includesString:aString].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6175
                checkSource := [:src | src includesString:aString].
16462
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  6176
            ].    
b6190d4c7f4c #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16451
diff changeset
  6177
        ].
18890
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6178
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6179
        stringSearchBlock :=
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6180
            [:cls :methodArg :sel | 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6181
                "/ sorry: the following does not work, because stc does not place string-constants
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6182
                "/ into the literals.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6183
                "/        (mthd literalsDetect:[:lit |
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6184
                "/            lit isString
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6185
                "/            and:[ lit isSymbol not
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6186
                "/            and:[ checkLiteral value:lit ]]
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6187
                "/        ] ifNone:[nil]) 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6188
                "/            notNil
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6189
                "/ so we must parse here (sigh)
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6190
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6191
                |method src skip tree found|
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6192
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6193
                skip := found := false.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6194
                method := methodArg originalMethodIfWrapped.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6195
                method isLazyMethod ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6196
                    src := method source.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6197
                    (src notNil) ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6198
                        method makeRealMethod.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6199
                    ] ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6200
                        skip := true
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6201
                    ].    
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6202
                ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6203
                skip ifFalse:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6204
                    src := method source.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6205
                    src isNil ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6206
                        ('SystemBrowser: [warning]: no source for method: ',methodArg printString) errorPrintCR.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6207
                    ].    
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6208
                    (src notNil and:[src includes:$']) ifTrue:[ "/ eliminates many
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6209
                        (checkSource value:src) ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6210
                            tree := cls parseTreeFor:sel.
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6211
                            "/ walk
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6212
                            found :=
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6213
                                tree notNil 
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6214
                                and:[tree usedLiterals contains:[:lit |
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6215
                                        lit isString
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6216
                                        and:[ lit isSymbol not
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6217
                                        and:[ checkLiteral value:lit ]]]]
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6218
                        ].        
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6219
                    ].        
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6220
                ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6221
                found
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6222
            ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6223
    ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6224
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6225
    resourceMethodsOnly ifTrue:[
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6226
        ^ self resourceMethodSearchBlockFor:stringSearchBlock
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6227
    ].
07532163de31 #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 18882
diff changeset
  6228
    ^ stringSearchBlock
5877
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6229
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6230
    "
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6231
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:true
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6232
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:true match:false
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6233
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:true
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6234
     SystemBrowser findStringLiteral:'error' in:(Array with:Object) ignoreCase:false match:false
c11a6d244c6a string literal search
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
  6235
    "
17498
b5901ab82661 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17466
diff changeset
  6236
b5901ab82661 #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 17466
diff changeset
  6237
    "Modified: / 20-04-2017 / 11:28:05 / stefan"
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6238
!
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6239
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6240
searchBlockForSymbol:aSymbol 
12866
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  6241
    "return a matchblock to search for all methods referencing aSymbol.
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  6242
     false if no such symbol exists"
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6243
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6244
    (aSymbol includesMatchCharacters) ifTrue:[
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6245
        "a matchString"
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6246
        ^ [:c :m :s |
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6247
                (m literalsDetect:[:aLiteral|
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6248
                        (aLiteral isMemberOf:Symbol) 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6249
                        and:[aSymbol match:aLiteral]
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6250
                    ] 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6251
                    ifNone:nil
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6252
                ) notNil
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6253
           ].
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6254
    ] ifFalse:[
12866
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  6255
        aSymbol asSymbolIfInterned isNil ifTrue:[
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  6256
            ^ false
dfc55f180f52 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12844
diff changeset
  6257
        ].
11452
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6258
        ^ [:c :m :s |
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6259
                (m literalsDetect:[:aLiteral|
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6260
                    (aSymbol == aLiteral) 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6261
                    ] 
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6262
                    ifNone:nil
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6263
                ) notNil
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6264
           ].
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6265
    ].
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6266
09f7f34c2d10 code cleanup
Claus Gittinger <cg@exept.de>
parents: 11291
diff changeset
  6267
    "Created: / 22-03-2012 / 06:56:51 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6268
! !
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6269
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  6270
!SystemBrowser class methodsFor:'startup'!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6271
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6272
browseAllSelect:aBlock
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6273
    "launch a browser for all methods where aBlock returns true.
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6274
     The block is called with 3 arguments, class, method and selector."
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6275
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6276
    ^ self 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6277
        browseMethodsWhere:aBlock 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6278
        title:'selected messages'
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6279
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6280
    "
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6281
     SystemBrowser browseAllSelect:[:aClass :aMethod :selector | selector numArgs == 3]
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6282
    "
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6283
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6284
    "Modified: 24.1.1997 / 19:45:05 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6285
!
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
  6286
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6287
browseClass:aClass
4490
de7216d4a28a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4350
diff changeset
  6288
    "launch a browser for aClass.
de7216d4a28a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4350
diff changeset
  6289
     Notice: better go via Smalltalk browseClass:, which honors the tool-preferences"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6290
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6291
    ^ self 
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6292
        newWithLabel:aClass name
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6293
        setupSelector:#setupForClass:
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6294
        arg:aClass
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6295
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6296
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6297
     SystemBrowser browseClass:Object
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6298
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6299
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6300
    "Modified: 24.1.1997 / 19:45:16 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6301
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6302
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6303
browseClass:aClass methodCategory:aCategory
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6304
    "launch a browser for all methods under aCategory in aClass"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6305
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6306
    ^ self newWithLabel:(aClass name , ' ' , aCategory)
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6307
          setupBlock:[:browser | browser setupForClass:aClass methodCategory:aCategory]
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6308
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6309
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6310
     SystemBrowser browseClass:String methodCategory:'copying'
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6311
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6312
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6313
    "Modified: 24.1.1997 / 19:45:23 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6314
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6315
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6316
browseClass:aClass selector:selector
4490
de7216d4a28a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4350
diff changeset
  6317
    "launch a browser for the method at selector in aClass."
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6318
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6319
    ^ self 
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6320
        newWithLabel:(aClass name , ' ' , selector , ' ' , selector)
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6321
        setupBlock:[:newBrowser | newBrowser setupForClass:aClass selector:selector]
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6322
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6323
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6324
     SystemBrowser browseClass:Object selector:#printString
16384
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6325
     Tools::NewSystemBrowser openInClass:Object selector:#printString
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6326
    "
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6327
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6328
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6329
browseClassCategory:aClassCategory
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6330
    "launch a browser for all classes under aCategory"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6331
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6332
    ^ self 
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6333
        newWithLabel:aClassCategory
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6334
        setupSelector:#setupForClassCategory:
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6335
        arg:aClassCategory
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6336
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6337
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6338
     SystemBrowser browseClassCategory:'Kernel-Objects'
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6339
    "
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6340
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6341
    "Modified: 24.1.1997 / 19:45:32 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6342
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6343
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6344
browseClassHierarchy:aClass
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6345
    "launch a browser for aClass and all its superclasses.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6346
     this is different from the fullProtocol browser."
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6347
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6348
    ^ self 
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6349
        newWithLabel:(aClass name , '-' , 'hierarchy')
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6350
        setupSelector:#setupForClassHierarchy:
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6351
        arg:aClass
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6352
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6353
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6354
     SystemBrowser browseClassHierarchy:Number
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6355
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6356
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6357
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6358
browseClasses:aList label:title
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6359
    "launch a browser for all classes in aList"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6360
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6361
    ^ self 
576
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6362
        newWithLabel:title
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6363
        setupBlock:[:b | b setupForClassList:aList sort:true]
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6364
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6365
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6366
     SystemBrowser browseClasses:(Array with:Object
576
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6367
                                        with:Float)
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6368
                           title:'two classes'
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6369
    "
576
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6370
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6371
    "Modified: 28.5.1996 / 13:52:25 / cg"
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6372
!
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6373
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6374
browseClasses:aList label:title sort:doSort
576
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6375
    "launch a browser for all classes in aList"
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6376
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6377
    ^ self 
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6378
        newWithLabel:title
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6379
        setupBlock:[:b | b setupForClassList:aList sort:doSort]
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6380
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6381
    "
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6382
     SystemBrowser browseClasses:(Array with:Object
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6383
                                        with:Float)
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6384
                           title:'two classes'
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6385
    "
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6386
62dc6c67d71c show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
  6387
    "Created: 28.5.1996 / 13:52:09 / cg"
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  6388
!
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
  6389
8702
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6390
browseClasses:aList title:title
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6391
    <resource: #obsolete>
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6392
    "launch a browser for all classes in aList"
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6393
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6394
    self obsoleteMethodWarning.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6395
    ^ self browseClasses:aList label:title
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6396
!
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6397
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6398
browseClasses:aList title:title sort:doSort
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6399
    <resource: #obsolete>
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6400
    "launch a browser for all classes in aList"
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6401
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6402
    self obsoleteMethodWarning.
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6403
    ^ self browseClasses:aList label:title sort:doSort
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6404
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6405
    "Created: 28.5.1996 / 13:52:09 / cg"
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6406
!
93616c89ade0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8688
diff changeset
  6407
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6408
browseFullClassProtocol:aClass
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6409
    "launch a browser for aClasses full protocol.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6410
     This is different from hierarchy browsing."
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6411
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6412
    ^ self 
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6413
        newWithLabel:(aClass name , '-' , 'full protocol')
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6414
        setupSelector:#setupForFullClassProtocol:
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6415
        arg:aClass
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6416
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6417
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6418
     SystemBrowser browseFullClassProtocol:Number
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6419
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6420
!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6421
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6422
browseFullClasses
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6423
    "launch a browser showing all methods at once"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6424
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6425
    ^ self 
4158
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6426
        newWithLabel:'Full Class Browser'
d7286d54de21 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4152
diff changeset
  6427
        setupBlock:[:newBrowser | newBrowser setupForFullClass]
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6428
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6429
    "SystemBrowser browseFullClasses"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6430
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6431
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6432
browseInstMethodsFrom:aClass where:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6433
    "launch a browser for all instance methods in aClass and all subclasses
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6434
     where aBlock evaluates to true"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6435
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6436
    ^ self      
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6437
        browseMethodsIn:(aClass withAllSubclasses) 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6438
        inst:true 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6439
        class:false 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6440
        where:aBlock 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6441
        title:title
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6442
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6443
    "Modified: 24.1.1997 / 19:44:45 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6444
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6445
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6446
browseInstMethodsIn:aCollectionOfClasses where:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6447
    "launch a browser for all instance methods of all classes in
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6448
     aCollectionOfClasses where aBlock evaluates to true"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6449
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6450
    ^ self 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6451
        browseMethodsIn:aCollectionOfClasses 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6452
        inst:true class:false 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6453
        where:aBlock title:title
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6454
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6455
    "Modified: 24.1.1997 / 19:43:41 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6456
!
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6457
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6458
browseInstMethodsOf:aClass where:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6459
    "launch a browser for all instance methods in aClass
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6460
     where aBlock evaluates to true"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6461
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6462
    ^ self 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6463
        browseMethodsIn:(Array with:aClass) 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6464
        inst:true 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6465
        class:false 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6466
        where:aBlock title:title
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6467
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6468
    "Modified: 24.1.1997 / 19:43:50 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6469
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6470
16384
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6471
browseMethod:aMethod
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6472
    "launch a single-method browser."
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6473
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6474
    ^ self browseMethods:{ aMethod }
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6475
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6476
    "
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6477
     self browseMethod:(Array compiledMethodAt:#at:)
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6478
     Tools::NewSystemBrowser browseMethod:(Array compiledMethodAt:#at:)
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6479
    "
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6480
!
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6481
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6482
browseMethodCategory:aCategory
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6483
    "launch a browser for all methods where category = aCategory"
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6484
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6485
    |searchBlock|
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6486
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6487
    aCategory includesMatchCharacters ifTrue:[
2822
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6488
        searchBlock := [:c :m :s | aCategory match:m category].
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6489
    ] ifFalse:[
2822
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6490
        searchBlock := [:c :m :s | m category = aCategory]
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6491
    ].
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6492
2822
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6493
    ^ self browseMethodsWhere:searchBlock title:('all methods with category of ' , aCategory)
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6494
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6495
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6496
     SystemBrowser browseMethodCategory:'printing & storing'
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6497
     SystemBrowser browseMethodCategory:'print*'
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6498
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6499
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6500
3666
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6501
browseMethods:aListOfMethods
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6502
    "launch a multi-method browser."
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6503
16384
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6504
    |title|
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6505
    
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6506
    aListOfMethods size == 1 ifTrue:[
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6507
        title := aListOfMethods first whoString
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6508
    ] ifFalse:[
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6509
        title := 'some methods'
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6510
    ].    
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6511
    ^ self browseMethods:aListOfMethods title:title
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6512
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6513
    "
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6514
     self 
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6515
        browseMethods:(Array with:(Array compiledMethodAt:#at:))
c8ad46b886c6 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16337
diff changeset
  6516
3666
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6517
     self 
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6518
        browseMethods:(Array with:(Array compiledMethodAt:#at:)
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6519
                             with:(OrderedCollection compiledMethodAt:#at:))
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6520
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6521
     self 
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6522
        browseMethods:(Array with:(Array compiledMethodAt:#at:)
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6523
                             with:(Array compiledMethodAt:#at:put:))
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6524
    "
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6525
!
f7b25e677c23 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3663
diff changeset
  6526
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6527
browseMethods:aList title:aString
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6528
    "launch a browser for an explicit list of class/selectors.
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6529
     Each entry in the list can be either a method, or a string
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6530
     consisting of the classes name and the selector, separated by spaces. 
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 620
diff changeset
  6531
     For class methods, the string ' class' must be appended to the classname."
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6532
1919
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6533
    ^ self
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6534
        browseMethods:aList
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6535
        title:aString
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6536
        sort:true
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6537
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6538
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6539
    "
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6540
     SystemBrowser 
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6541
        browseMethods:#('Object printOn:' 'Collection add:')
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6542
        title:'some methods'
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6543
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6544
     SystemBrowser 
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6545
        browseMethods:#('Behavior new:' 'Setclass new:')
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6546
        title:'some new: methods'
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6547
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6548
     SystemBrowser 
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6549
        browseMethods:(Array with:(Object compiledMethodAt:#printOn:)
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6550
                             with:(Collection compiledMethodAt:#add:)
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6551
                             with:(Object class compiledMethodAt:#initialize))
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6552
        title:'some methods'
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6553
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6554
    "
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6555
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6556
    "Modified: 1.11.1996 / 16:30:17 / cg"
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6557
!
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6558
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6559
browseMethods:aList title:aString sort:doSort
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6560
    "launch a browser for an explicit list of class/selectors.
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6561
     Each entry in the list can be either a method, or a string
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6562
     consisting of the classes name and the selector, separated by spaces. 
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6563
     For class methods, the string ' class' must be appended to the classname."
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6564
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6565
    |l|
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6566
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6567
    (aList size == 0) ifTrue:[
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6568
        self showNoneFound:aString.
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6569
        ^ nil
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6570
    ].
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6571
    l := aList asOrderedCollection.
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6572
    l := l collect:[:entry |
15513
bbe70d563ae2 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15499
diff changeset
  6573
        |cls clsName|
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6574
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6575
        entry isString ifTrue:[
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6576
            entry
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6577
        ] ifFalse:[
2822
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6578
            cls := entry mclass.
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6579
            cls isNil ifTrue:[
1031
5d77c99b877e dont crash when unbound methods are passed
ca
parents: 1018
diff changeset
  6580
                '??? unbound'
5d77c99b877e dont crash when unbound methods are passed
ca
parents: 1018
diff changeset
  6581
            ] ifFalse:[
2822
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6582
                cls isJavaClass ifTrue:[
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6583
                    clsName := 'JAVA::' , cls fullName 
1937
fc541342f2db more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  6584
                ] ifFalse:[
2822
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6585
                    clsName := cls name
8127e7726fdd changes for environment browsing
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  6586
                ].
7915
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6587
                (cls selectorAtMethod:entry) isNil ifTrue:[
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6588
                    clsName
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6589
                    , ' ' 
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6590
                    , '???' 
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6591
                ] ifFalse:[
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6592
                    clsName
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6593
                    , ' ' 
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6594
                    , (entry printStringForBrowserWithSelector:(cls selectorAtMethod:entry) inClass:cls)
56a43b103eaa refactoring
Claus Gittinger <cg@exept.de>
parents: 7914
diff changeset
  6595
                ]
1031
5d77c99b877e dont crash when unbound methods are passed
ca
parents: 1018
diff changeset
  6596
            ]
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6597
        ]
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6598
      ].
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6599
        
1919
0652e55065f9 added sort option to #browserMethods:
Claus Gittinger <cg@exept.de>
parents: 1703
diff changeset
  6600
    doSort ifTrue:[l sort].
1937
fc541342f2db more support for java code (implementors)
Claus Gittinger <cg@exept.de>
parents: 1931
diff changeset
  6601
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6602
    ^ self 
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6603
        newWithLabel:aString
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6604
        setupSelector:#setupForList:
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6605
        arg:l 
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6606
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6607
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6608
     SystemBrowser 
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6609
        browseMethods:#('Object printOn:' 'Collection add:')
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6610
        title:'some methods'
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6611
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6612
     SystemBrowser 
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6613
        browseMethods:#('Behavior new:' 'Setclass new:')
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6614
        title:'some new: methods'
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6615
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6616
     SystemBrowser 
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6617
        browseMethods:(Array with:(Object compiledMethodAt:#printOn:)
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6618
                             with:(Collection compiledMethodAt:#add:)
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6619
                             with:(Object class compiledMethodAt:#initialize))
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6620
        title:'some methods'
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6621
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6622
    "
279
062022b53f22 allow browseMethods to be passed a collection of methodObjects (in addition to strings)
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
  6623
7711
7e8881bccf72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7524
diff changeset
  6624
    "Modified: / 17-06-1996 / 17:07:46 / stefan"
7e8881bccf72 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7524
diff changeset
  6625
    "Modified: / 05-03-2007 / 16:25:25 / cg"
2826
9d7f11697806 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2824
diff changeset
  6626
!
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6627
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6628
browseMethodsFrom:aClass where:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6629
    "launch a browser for all instance- and classmethods in aClass
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6630
     and all its subclasses where aBlock evaluates to true.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6631
     The block is called with 3 arguments, class, method and seelctor."
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6632
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6633
    ^ self 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6634
        browseMethodsIn:(aClass withAllSubclasses) 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6635
        where:aBlock 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6636
        title:title
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6637
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6638
    "Modified: 24.1.1997 / 19:44:00 / cg"
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6639
!
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6640
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6641
browseMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6642
    "launch a browser for all instance- (if wantInst is true) and/or
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6643
     classmethods (if wantClass is true) from classes in aCollectionOfClasses,
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6644
     where aBlock evaluates to true.
270
f97a37f5df7a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 256
diff changeset
  6645
     The block is called with 3 arguments, class, method and selector."
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6646
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6647
    |list|
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6648
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6649
    "
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6650
     since this may take a long time, lower my priority ...
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6651
    "
2295
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  6652
    Processor activeProcess 
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  6653
        withPriority:Processor activePriority-1 to:Processor activePriority
4e05198e7dd8 execute BG tasks at a prio range, to ensure progress.
Claus Gittinger <cg@exept.de>
parents: 2208
diff changeset
  6654
    do:[
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6655
        list := self findMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6656
    ].
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6657
    ^ self browseMethods:list title:title
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6658
!
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6659
3780
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6660
browseMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock title:title ifNone:warnBlock
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6661
    "launch a browser for all instance- (if wantInst is true) and/or
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6662
     classmethods (if wantClass is true) from classes in aCollectionOfClasses,
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6663
     where aBlock evaluates to true.
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6664
     The block is called with 3 arguments, class, method and selector."
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6665
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6666
    |list|
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6667
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6668
    "
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6669
     since this may take a long time, lower my priority ...
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6670
    "
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6671
    Processor activeProcess 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6672
        withPriority:Processor activePriority-1 to:Processor activePriority
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6673
    do:[
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6674
        list := self findMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock.
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6675
        list size == 0 ifTrue:[warnBlock value].
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6676
    ].
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6677
    ^ self browseMethods:list title:title
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6678
!
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6679
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6680
browseMethodsIn:aCollectionOfClasses where:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6681
    "launch a browser for all instance- and classmethods from 
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6682
     all classes in aCollectionOfClasses where aBlock evaluates to true.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6683
     The block is called with 3 arguments, class, method and seelctor."
53
2fc78a0165e7 *** empty log message ***
claus
parents: 52
diff changeset
  6684
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6685
    ^ self 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6686
        browseMethodsIn:aCollectionOfClasses 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6687
        inst:true 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6688
        class:true 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6689
        where:aBlock 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6690
        title:title
75
f6310cbc93b6 *** empty log message ***
claus
parents: 72
diff changeset
  6691
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6692
    "Modified: 24.1.1997 / 19:44:17 / cg"
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6693
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6694
3780
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6695
browseMethodsIn:aCollectionOfClasses where:aBlock title:title ifNone:warnBlock
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6696
    "launch a browser for all instance- and classmethods from 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6697
     all classes in aCollectionOfClasses where aBlock evaluates to true.
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6698
     The block is called with 3 arguments, class, method and seelctor."
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6699
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6700
    ^ self 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6701
        browseMethodsIn:aCollectionOfClasses 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6702
        inst:true 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6703
        class:true 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6704
        where:aBlock 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6705
        title:title
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6706
        ifNone:warnBlock
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6707
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6708
    "Modified: 24.1.1997 / 19:44:17 / cg"
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6709
!
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6710
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6711
browseMethodsOf:aClass where:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6712
    "launch a browser for all instance- and classmethods in aClass 
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6713
     where aBlock evaluates to true.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6714
     The block is called with 3 arguments, class, method and seelctor."
93
claus
parents: 90
diff changeset
  6715
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6716
    ^ self browseMethodsIn:(Array with:aClass) where:aBlock title:title
93
claus
parents: 90
diff changeset
  6717
!
claus
parents: 90
diff changeset
  6718
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6719
browseMethodsWhere:aBlock title:title
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6720
    "launch a browser for all methods where aBlock returns true.
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6721
     The block is called with 3 arguments, class, method and seelctor."
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6722
996
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6723
    ^ self 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6724
        browseMethodsIn:(Smalltalk allClasses) 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6725
        where:aBlock 
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6726
        title:title
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6727
ed470d0b6029 more generic browseAll protocol;
Claus Gittinger <cg@exept.de>
parents: 929
diff changeset
  6728
    "Modified: 24.1.1997 / 19:44:30 / cg"
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6729
!
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6730
3780
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6731
browseMethodsWhere:aBlock title:title ifNone:warnBlock
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6732
    "launch a browser for all methods where aBlock returns true.
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6733
     The block is called with 3 arguments, class, method and seelctor."
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6734
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6735
    ^ self 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6736
        browseMethodsIn:(Smalltalk allClasses) 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6737
        where:aBlock 
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6738
        title:title
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6739
        ifNone:warnBlock
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6740
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6741
    "Modified: 24.1.1997 / 19:44:30 / cg"
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6742
!
39191b8024e4 dont open empty list browsers
penk
parents: 3679
diff changeset
  6743
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6744
findMethodsIn:aCollectionOfClasses inst:wantInst class:wantClass where:aBlock
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6745
    "return all instance- (if wantInst is true) and/or classmethods (if wantClass is true) 
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6746
     from classes in aCollectionOfClasses, where aBlock evaluates to true."
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6747
16449
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6748
    |list checkedClasses checkBlock nClasses 
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6749
     nClassesDone oldPercentage newPercentage nClassesSinceLastPercentage bulkSize|
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6750
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6751
    checkedClasses := IdentitySet new.
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6752
    list := OrderedCollection new.
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6753
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6754
    checkBlock := [:cls |
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6755
        (checkedClasses includes:cls) ifFalse:[
8554
441ea25ad1fd Do not complain about obsolete classes which are unloaded when searching
Stefan Vogel <sv@exept.de>
parents: 8505
diff changeset
  6756
            (cls isObsolete and:[cls isLoaded]) ifTrue:[
17466
93123277a442 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17440
diff changeset
  6757
                Logger debug:'Browser method search: skipping obsolete class: %1' with:cls displayString
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6758
            ] ifFalse:[
11941
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6759
                aBlock numArgs == 1 ifTrue:[
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6760
                    cls methodDictionary keysAndValuesDo:[:sel :method |
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6761
                        (aBlock value:method) ifTrue:[
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6762
                            list add:method "/ (cls name , ' ' , sel)
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6763
                        ]
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6764
                    ].
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6765
                ] ifFalse:[
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6766
                    cls methodDictionary keysAndValuesDo:[:sel :method |
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6767
                        (aBlock value:cls value:method value:sel) ifTrue:[
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6768
                            list add:method "/ (cls name , ' ' , sel)
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6769
                        ]
55fec250ed02 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11934
diff changeset
  6770
                    ].
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6771
                ].
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6772
                checkedClasses add:cls.
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6773
            ]
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6774
        ]
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6775
    ].
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6776
11506
bc0fc32fd733 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11452
diff changeset
  6777
    nClasses := aCollectionOfClasses size.
bc0fc32fd733 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11452
diff changeset
  6778
    nClassesDone := 0.
16238
64ea19197d95 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16037
diff changeset
  6779
    oldPercentage := 0.
16449
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6780
    nClassesSinceLastPercentage := 0.
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6781
    bulkSize := (nClasses // 30) max:10. "/ roughly every 3%.
16238
64ea19197d95 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16037
diff changeset
  6782
    
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6783
    aCollectionOfClasses do:[:aClass |
3008
1a45c272b13f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2901
diff changeset
  6784
        (aClass notNil and:[aClass isObsolete not]) ifTrue:[
16449
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6785
            nClassesSinceLastPercentage := nClassesSinceLastPercentage + 1.
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6786
            
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6787
            "
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6788
             output disabled - it slows down things too much (when searching for
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6789
             implementors or senders)
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6790
            "
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6791
            wantInst ifTrue:[
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6792
"/                Transcript show:'searching '; show:aClass name; showCR:' ...'; endEntry.
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6793
                checkBlock value:aClass
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6794
            ].
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6795
            wantClass ifTrue:[
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6796
"/                Transcript show:'searching '; show:aClass class name; showCR:' ...'; endEntry.
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6797
                checkBlock value:(aClass class)
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6798
            ].
16449
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6799
            nClassesSinceLastPercentage > bulkSize ifTrue:[
11506
bc0fc32fd733 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11452
diff changeset
  6800
                "/ Processor yield
16238
64ea19197d95 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16037
diff changeset
  6801
                newPercentage := nClassesDone * 100 // nClasses.
64ea19197d95 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16037
diff changeset
  6802
                newPercentage ~= oldPercentage ifTrue:[
17440
930529441c39 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17432
diff changeset
  6803
                    ProgressNotification progressPercentage:newPercentage statusInfo:('%1 found' bindWith:list size).
16238
64ea19197d95 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16037
diff changeset
  6804
                    oldPercentage := newPercentage.
64ea19197d95 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 16037
diff changeset
  6805
                ].
16449
d4471f0310b6 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 16443
diff changeset
  6806
                nClassesSinceLastPercentage := 0.
11506
bc0fc32fd733 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11452
diff changeset
  6807
            ].
bc0fc32fd733 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11452
diff changeset
  6808
        ].
bc0fc32fd733 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11452
diff changeset
  6809
        nClassesDone := nClassesDone + 1.
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6810
    ].
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6811
    ^ list
11506
bc0fc32fd733 changed: #findMethodsIn:inst:class:where:
Claus Gittinger <cg@exept.de>
parents: 11452
diff changeset
  6812
17466
93123277a442 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17440
diff changeset
  6813
    "Modified: / 14-03-2017 / 12:05:57 / cg"
2675
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6814
!
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6815
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6816
findMethodsIn:aCollectionOfClasses where:aBlock
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6817
    "return all instance- and classmethods 
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6818
     from classes in aCollectionOfClasses, where aBlock evaluates to true."
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6819
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6820
    ^ self
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6821
        findMethodsIn:aCollectionOfClasses 
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6822
        inst:true
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6823
        class:true      
9a1138c3fe76 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2655
diff changeset
  6824
        where:aBlock
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6825
! !
93
claus
parents: 90
diff changeset
  6826
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  6827
!SystemBrowser class methodsFor:'startup with query'!
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6828
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6829
askThenBrowseClass
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6830
    self getClassThenPerform:#browseClass:
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6831
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6832
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6833
     SystemBrowser askThenBrowseClass
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6834
     Tools::NewSystemBrowser askThenBrowseClass
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6835
    "
93
claus
parents: 90
diff changeset
  6836
!
claus
parents: 90
diff changeset
  6837
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6838
askThenBrowseClassHierarchy
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6839
    self getClassThenPerform:#browseClassHierarchy:
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6840
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6841
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6842
     SystemBrowser askThenBrowseClassHierarchy
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6843
     Tools::NewSystemBrowser askThenBrowseClassHierarchy
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6844
    "
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6845
!
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6846
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6847
askThenBrowseFullClassProtocol
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6848
    self getClassThenPerform:#browseFullClassProtocol:
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6849
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6850
    "
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  6851
     SystemBrowser askThenBrowseFullClassProtocol
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6852
     Tools::NewSystemBrowser askThenBrowseFullClassProtocol
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6853
    "
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6854
! !
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  6855
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  6856
!SystemBrowser class methodsFor:'utilities'!
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  6857
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6858
askForClass
13032
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6859
    ^ self askForClassWithFilter:nil
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6860
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6861
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6862
     Tools::NewSystemBrowser askForClass   
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6863
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6864
!
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6865
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6866
askForClassName
13032
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6867
    ^ self askForClassNameWithFilter:nil
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6868
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6869
    "
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6870
     Tools::NewSystemBrowser askForClassName   
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6871
    "
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6872
!
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6873
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6874
askForClassNameWithFilter:filterOrNil
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6875
    self
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6876
        askForClassToSearch:nil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6877
        single:true
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6878
        msgTail:''
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6879
        resources:(self classResources)
13032
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6880
        filter:filterOrNil
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6881
        forBrowser:nil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6882
        thenDo:[:className :single :doWhat |
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6883
            ^ className
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6884
        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6885
    ^ nil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6886
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6887
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6888
     Tools::NewSystemBrowser askForClassName   
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6889
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6890
!
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6891
13032
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6892
askForClassToSearch:doWhatByDefault single:singleClass msgTail:msgTail resources:resourcesOrNil filter:filterOrNil forBrowser:aBrowserOrNil thenDo:aBlock
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6893
    "utility common code for both opening a new browser on a class and
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6894
     to search for a class in an existing browser.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6895
     If singleClass is true, a single class will be asked for and browsed,
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6896
     otherwise, a match pattern is allowed and a multi-class browser is opened.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6897
     Moved from instance protocol for better reusability."
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6898
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6899
    |box boxLabel title okText className canFind doWhat classNameHolder updateList
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6900
     allClasses classNamesInChangeSet
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6901
     allNames allFullNames initialShortNames initialFullNames
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6902
     colorizedFullNames colorizedShortNames
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6903
     resources check showingWhatLabel showFullNameHolder genShortNameListEntry|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6904
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6905
    resources := resourcesOrNil ? self classResources.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6906
    showFullNameHolder := (LastClassSearchBoxShowedFullName ? false) asValue.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6907
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6908
    doWhat := doWhatByDefault.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6909
    canFind := false.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6910
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6911
    title := ''.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6912
    boxLabel := (resources string:'Select a class').
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6913
    okText := 'OK'.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6914
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6915
    genShortNameListEntry :=
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6916
        [:cls |
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6917
            |ns|
13035
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6918
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6919
            cls isNil ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6920
                nil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6921
            ] ifFalse:[
13035
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6922
                (filterOrNil notNil and:[ (filterOrNil value:cls) not]) ifTrue:[
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6923
                    nil
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6924
                ] ifFalse:[
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6925
                    ns := cls topNameSpace name.
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6926
                    ns = 'Smalltalk'
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6927
                        ifTrue:[ ns := '' ]
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6928
                        ifFalse:[ns := ' (in ',ns,')'].
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6929
                    cls nameWithoutNameSpacePrefix,ns
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6930
                ]
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6931
            ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6932
        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6933
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6934
    classNamesInChangeSet := ChangeSet current changedClasses
13035
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6935
                                select: (filterOrNil ? [:cls | true])
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6936
                                thenCollect:[:each | each theNonMetaclass name].
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6937
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6938
    initialFullNames := self visitedClassNamesHistory.
13035
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6939
    (filterOrNil notNil) ifTrue:[
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6940
        initialFullNames := initialFullNames select:[:nm | filterOrNil value:(Smalltalk at:nm)].
7139f82575c0 class: NewLauncher
Claus Gittinger <cg@exept.de>
parents: 13032
diff changeset
  6941
    ].
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6942
    initialShortNames := initialFullNames collect:[:nm | genShortNameListEntry value:(Smalltalk at:nm)] thenSelect:[:nm | nm notNil].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6943
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6944
    colorizedFullNames := initialFullNames collect:[:clsName | 
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6945
                                (classNamesInChangeSet includes:clsName) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6946
                                    clsName asText emphasisAllAdd:(UserPreferences current emphasisForChangedCode)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6947
                                ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6948
                                    clsName
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6949
                                ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6950
                            ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6951
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6952
    colorizedShortNames := initialShortNames with:initialFullNames collect:[:shortName :clsName | 
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6953
                                (classNamesInChangeSet includes:clsName) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6954
                                    shortName asText emphasisAllAdd:(UserPreferences current emphasisForChangedCode)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6955
                                ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6956
                                    shortName
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6957
                                ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6958
                            ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6959
13046
f3c72a68d92a title of class search box
Claus Gittinger <cg@exept.de>
parents: 13037
diff changeset
  6960
    title := (resources string:title) , msgTail , '.\' , (resources string:'(TAB to complete; matchPattern allowed - "*" for all):').
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6961
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6962
    box := self
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6963
                enterBoxForClassWithCodeSelectionTitle:title withCRs
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6964
                withList:(showFullNameHolder value ifTrue:[colorizedFullNames] ifFalse:[colorizedShortNames])
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6965
                okText:okText
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6966
                forBrowser:nil.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6967
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6968
    box label:boxLabel.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6969
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6970
    allClasses := Smalltalk allClasses copyAsOrderedCollection.
13032
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6971
    filterOrNil notNil ifTrue:[
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6972
        allClasses := allClasses select: filterOrNil
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  6973
    ].
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6974
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6975
    allNames := (allClasses
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6976
                    collect:[:cls |
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6977
                        |ns nm|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6978
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6979
                        ns := cls topNameSpace name.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6980
                        ns = 'Smalltalk'
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6981
                            ifTrue:[ ns := '' ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6982
                            ifFalse:[ns := ' (in ',ns,')'].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6983
                        cls isNameSpace ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6984
                            nm := cls nameWithoutNameSpacePrefix,ns,' (Namespace)'
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6985
                        ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6986
                            nm := cls nameWithoutNameSpacePrefix,ns
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6987
                        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6988
                        (classNamesInChangeSet includes:cls name) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6989
                            nm asText emphasisAllAdd:(UserPreferences current emphasisForChangedCode)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6990
                        ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6991
                            nm
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6992
                        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6993
                    ]) sortWith:allClasses; yourself.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6994
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6995
    allFullNames := (allClasses 
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6996
                    collect:[:cls | 
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6997
                        |nm|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6998
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  6999
                        nm := cls name.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7000
                        (classNamesInChangeSet includes:cls name) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7001
                            nm asText emphasisAllAdd:(UserPreferences current emphasisForChangedCode)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7002
                        ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7003
                            nm
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7004
                        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7005
                    ]) sortWith:allClasses; yourself.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7006
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7007
    updateList := [
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7008
            |nameToSearch list namesStarting namesIncluding lcName nameList|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7009
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7010
            (nameToSearch := classNameHolder value withoutSeparators) isEmpty ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7011
                showingWhatLabel label:(resources string:'Recently visited:').
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7012
                list := (showFullNameHolder value ifTrue:[colorizedFullNames] ifFalse:[colorizedShortNames]).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7013
            ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7014
                showingWhatLabel label:(resources string:'Matching classes:').
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7015
                nameList := showFullNameHolder value
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7016
                                ifTrue:[ allFullNames ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7017
                                ifFalse:[ allNames ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7018
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7019
                lcName := nameToSearch asLowercase.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7020
                (lcName includesString:'::') ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7021
                    list := OrderedCollection new.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7022
                    allClasses doWithIndex:[:cls :idx |
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7023
                        |isIncluded|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7024
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7025
                        (nameToSearch includesMatchCharacters) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7026
                            isIncluded := (lcName match:cls name asLowercase)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7027
                        ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7028
                            isIncluded := (cls name includesString:lcName caseSensitive:false)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7029
                        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7030
                        isIncluded ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7031
                            list add:(nameList at:idx)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7032
                        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7033
                    ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7034
                ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7035
                    (nameToSearch includesMatchCharacters) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7036
                        list := nameList select:[:nm | lcName match:nm asLowercase]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7037
                    ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7038
                        namesIncluding := nameList
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7039
                                            select:[:nm |
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7040
                                                "/ nm asLowercase startsWith:lcName
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7041
                                                nm asLowercase includesString:lcName caseSensitive:false
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7042
                                            ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7043
                        namesStarting := namesIncluding select:[:nm | nm asLowercase startsWith:lcName].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7044
                        list := namesStarting , {nil} , (namesIncluding \ namesStarting).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7045
                    ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7046
                ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7047
            ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7048
            box listView
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7049
                list:list;
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7050
                scrollToLine:((list findFirst:[:line | (line ? '') startsWith:lcName]) max:1)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7051
        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7052
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7053
    classNameHolder := '' asValue.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7054
    box enterField
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7055
        model:classNameHolder;
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7056
        immediateAccept:true.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7057
    classNameHolder onChangeEvaluate:updateList.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7058
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7059
    box entryCompletionBlock:(DoWhatIMeanSupport classNameEntryCompletionBlock).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7060
    box action:[:aString | className := aString].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7061
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7062
    box panelView
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7063
        addSubView:(showingWhatLabel := (Label label:(resources string:'Recently visited:')) adjust:#left) before:nil;
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7064
        addSubView:(check := CheckBox label:(resources string:'Show Full Name (do not strip off Namespace)') model:showFullNameHolder) before:nil.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7065
    showFullNameHolder onChangeEvaluate:updateList.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7066
    box enterField origin:(0 @ check corner y).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7067
    box listView origin:(0 @ check corner y).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7068
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7069
    box extent:(400 @ 350).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7070
    box open.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7071
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7072
    className isEmptyOrNil ifTrue:[^ nil "cancel"].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7073
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7074
    LastClassSearchBoxShowedFullName := showFullNameHolder value.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7075
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7076
    (className endsWith:$) ) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7077
        (className indexOfSubCollection:'(in ') == 0 ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7078
            "/ a namespace
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7079
            className := (className copyTo:(className indexOfSubCollection:'(Name')-1) withoutSeparators
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7080
        ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7081
            className := ((className copyFrom:(className indexOfSubCollection:'(in ')+4)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7082
                            copyButLast:1)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7083
                         , '::' , className asCollectionOfWords first
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7084
        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7085
    ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7086
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7087
    aBlock notNil ifTrue:[aBlock value:className optionalArgument:singleClass and:doWhat].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7088
    ^ className
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7089
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7090
    "Modified: / 23-07-2012 / 11:00:22 / cg"
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7091
!
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7092
13032
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7093
askForClassWithFilter:filterOrNil
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7094
    |className|
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7095
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7096
    className := self askForClassNameWithFilter:filterOrNil.
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7097
    className notEmptyOrNil ifTrue:[
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7098
        ^ Smalltalk classNamed:className
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7099
    ].
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7100
    ^ nil
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7101
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7102
    "
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7103
     Tools::NewSystemBrowser askForClass   
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7104
    "
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7105
!
b0fd7b57ace5 +askForClassWithFilter:
Claus Gittinger <cg@exept.de>
parents: 13028
diff changeset
  7106
3833
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7107
classWithNameSimilarTo:className
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7108
    "helper for class-name entry; finds a class by name tolerant w.r.t. case"
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7109
4924
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7110
    |allMatchingClasses|
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7111
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7112
    allMatchingClasses := self classesWithNameSimilarTo:className.
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7113
    ^ allMatchingClasses firstIfEmpty:nil
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7114
!
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7115
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7116
classesWithNameSimilarTo:className
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7117
    "helper for class-name entry; finds a class by name tolerant w.r.t. case"
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7118
6944
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7119
    ^ self classesWithNameSimilarTo:className from:nil
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7120
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7121
    "Modified: / 22-08-2006 / 13:22:41 / cg"
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7122
!
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7123
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7124
classesWithNameSimilarTo:className from:aNameSpaceOrNil
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7125
    "helper for class-name entry; finds classes with a name similar to the argument, className"
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7126
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7127
    |nm lcName class allClasses triedDetectors triedMatchers allMatchingClasses
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7128
     prefNameSpaceOrNil prefLcNameSpace|
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7129
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7130
    prefNameSpaceOrNil := (aNameSpaceOrNil == Smalltalk) ifTrue:[ nil ] ifFalse:[aNameSpaceOrNil].
3833
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7131
12747
b59676921d61 refactored
Claus Gittinger <cg@exept.de>
parents: 12729
diff changeset
  7132
    nm := className withoutPrefix:'Smalltalk::'.
3833
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7133
6944
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7134
    prefNameSpaceOrNil notNil ifTrue:[
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7135
        class := prefNameSpaceOrNil at:nm asSymbol.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7136
        class isBehavior ifTrue:[^ Array with:class].      "/ a direct hit
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7137
        prefLcNameSpace := prefNameSpaceOrNil name asLowercase.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7138
    ].
3833
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7139
    class := Smalltalk at:nm asSymbol.
4924
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7140
    class isBehavior ifTrue:[^ Array with:class].      "/ a direct hit
3833
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7141
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7142
    lcName := className asLowercase.
4924
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7143
3833
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7144
    allClasses := Smalltalk allClasses.
4806
439bed9def3a code cleanup
Claus Gittinger <cg@exept.de>
parents: 4526
diff changeset
  7145
6134
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7146
    triedDetectors := OrderedCollection new.
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7147
    triedDetectors add:[:cls | cls name asLowercase = lcName].
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7148
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7149
    triedDetectors do:[:eachTry |
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7150
        |class|
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7151
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7152
        class := allClasses detect:eachTry ifNone:nil.
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7153
        class notNil ifTrue:[^ Array with:class].
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7154
    ].
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7155
4806
439bed9def3a code cleanup
Claus Gittinger <cg@exept.de>
parents: 4526
diff changeset
  7156
    triedMatchers := OrderedCollection new.
5018
2fe02eac49c5 better classesWithNameSimilarTo
Claus Gittinger <cg@exept.de>
parents: 4924
diff changeset
  7157
    triedMatchers add:[:cls | cls nameWithoutPrefix asLowercase = lcName].      
2fe02eac49c5 better classesWithNameSimilarTo
Claus Gittinger <cg@exept.de>
parents: 4924
diff changeset
  7158
    triedMatchers add:[:cls | cls nameWithoutNameSpacePrefix asLowercase = lcName].      
4924
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7159
4806
439bed9def3a code cleanup
Claus Gittinger <cg@exept.de>
parents: 4526
diff changeset
  7160
    triedMatchers add:[:cls | cls name asLowercase startsWith:lcName].      
439bed9def3a code cleanup
Claus Gittinger <cg@exept.de>
parents: 4526
diff changeset
  7161
    triedMatchers add:[:cls | cls nameWithoutNameSpacePrefix asLowercase startsWith:lcName].      
439bed9def3a code cleanup
Claus Gittinger <cg@exept.de>
parents: 4526
diff changeset
  7162
    triedMatchers add:[:cls | cls nameWithoutPrefix asLowercase startsWith:lcName].      
439bed9def3a code cleanup
Claus Gittinger <cg@exept.de>
parents: 4526
diff changeset
  7163
    triedMatchers add:[:cls | cls nameWithoutPrefix asLowercase includesString:lcName].      
6134
024fd528782a *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6115
diff changeset
  7164
    triedMatchers add:[:cls | cls name asLowercase includesString:lcName].
4924
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7165
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7166
    allMatchingClasses := IdentitySet new.
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7167
    triedMatchers do:[:eachTry |
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7168
        |matchingClasses|
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7169
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7170
        matchingClasses := allClasses select:eachTry.
6944
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7171
"/        matchingClasses size == 1 ifTrue:[^ matchingClasses].
4924
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7172
        allMatchingClasses addAll:matchingClasses.
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7173
    ].
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7174
    allMatchingClasses isEmpty ifTrue:[^ #()].
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7175
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7176
    allMatchingClasses := allMatchingClasses asOrderedCollection.
6944
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7177
    allMatchingClasses 
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7178
        sort:[:a :b | 
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7179
            |lcNameA lcNameB da db distA distB |
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7180
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7181
            lcNameA := a name asLowercase.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7182
            lcNameB := b name asLowercase.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7183
            prefNameSpaceOrNil notNil ifTrue:[
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7184
                a nameSpace == prefNameSpaceOrNil ifTrue:[
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7185
                    lcNameA := a nameWithoutNameSpacePrefix asLowercase.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7186
                ].
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7187
                b nameSpace == prefNameSpaceOrNil ifTrue:[
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7188
                    lcNameB := b nameWithoutNameSpacePrefix asLowercase.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7189
                ].
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7190
            ].
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7191
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7192
            distA := da := lcName levenshteinTo:lcNameA.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7193
            distB := db := lcName levenshteinTo:lcNameB.
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7194
            "prefer prefixes (i.e. classes whose name starts with what we search for)"
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7195
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7196
            (lcNameA startsWith:lcName) ifTrue:[
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7197
                distB := distB * 2
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7198
            ].
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7199
            (lcNameB startsWith:lcName) ifTrue:[
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7200
                distA := distA * 2
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7201
            ].
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7202
            distA < distB
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7203
        ].
4924
0d39bbc7203e better search-class heuristics
Claus Gittinger <cg@exept.de>
parents: 4921
diff changeset
  7204
    ^ allMatchingClasses.
6546
1b809ef4658b comment
Stefan Vogel <sv@exept.de>
parents: 6480
diff changeset
  7205
1b809ef4658b comment
Stefan Vogel <sv@exept.de>
parents: 6480
diff changeset
  7206
    "
6678
aa5572677e17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6640
diff changeset
  7207
     self classesWithNameSimilarTo:'NewSystemBrowser'
aa5572677e17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6640
diff changeset
  7208
     self classesWithNameSimilarTo:'Moose::MSEAbstractOperator'
6546
1b809ef4658b comment
Stefan Vogel <sv@exept.de>
parents: 6480
diff changeset
  7209
    "
6944
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7210
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7211
    "Created: / 22-08-2006 / 13:22:48 / cg"
1cf67ff2795d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6925
diff changeset
  7212
    "Modified: / 22-08-2006 / 14:53:38 / cg"
3833
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7213
!
89b8454a783d refactored
Claus Gittinger <cg@exept.de>
parents: 3813
diff changeset
  7214
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7215
enterBoxForClassWithCodeSelectionTitle:title withList:listOrNil okText:okText forBrowser:aBrowserOrNil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7216
    "convenient method: setup an enterBox with initial text taken
17605
56c7694875b3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17596
diff changeset
  7217
     from the codeview's selection."
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7218
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7219
    |sel box initialText superclass currentClass
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7220
     methods someMethod offeredClass anyClose closeName s usedGlobals list|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7221
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7222
    list := listOrNil.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7223
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7224
    aBrowserOrNil notNil ifTrue:[    
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7225
        currentClass := aBrowserOrNil theSingleSelectedClass.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7226
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7227
        sel := aBrowserOrNil selectionInCodeView.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7228
        sel notNil ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7229
            aBrowserOrNil selectedNamespacesValue doWithExit:[:eachNs :exit |
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7230
                s := eachNs , '::' , sel asSymbol.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7231
                (s knownAsSymbol
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7232
                and:[(Smalltalk at:s asSymbol) isBehavior]) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7233
                    "/ a private class of current ...
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7234
                    sel := eachNs , '::' , sel asSymbol.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7235
                    exit value:nil.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7236
                ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7237
            ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7238
            (sel knownAsSymbol and:[currentClass notNil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7239
            and:[(currentClass theNonMetaclass privateClassesAt:sel asSymbol) notNil]]) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7240
                "/ a private class of current ...
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7241
                sel := (currentClass theNonMetaclass privateClassesAt:sel asSymbol) name
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7242
            ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7243
                (sel knownAsSymbol and:[(Smalltalk at:sel asSymbol) isBehavior]) ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7244
                    "/ ignore it, if there is no class-name which comes close.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7245
                    anyClose := false.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7246
                    Smalltalk keysAndValuesDo:[:aGlobalName :aGlobal|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7247
                        aGlobal isBehavior ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7248
                            aGlobal isMeta ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7249
                                aGlobal name == aGlobalName ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7250
                                    ((aGlobalName startsWith:sel)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7251
                                    or:[(sel startsWith:aGlobalName)]) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7252
                                        closeName isNil ifTrue:[closeName := aGlobalName].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7253
                                        anyClose := true.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7254
                                    ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7255
                                ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7256
                            ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7257
                        ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7258
                    ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7259
                    anyClose ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7260
                        sel := nil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7261
                    ] ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7262
                        sel := closeName
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7263
                    ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7264
                ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7265
            ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7266
        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7267
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7268
        sel notNil ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7269
            initialText := sel asString withoutSeparators
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7270
        ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7271
            aBrowserOrNil codeAspect == SyntaxHighlighter codeAspectMethod ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7272
                methods := aBrowserOrNil selectedMethodsValue.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7273
                methods size > 0 ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7274
                    someMethod := methods first.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7275
                    usedGlobals := someMethod usedGlobals collect:[:eachVar | eachVar asSymbol].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7276
                    usedGlobals := usedGlobals select:[:eachVar | (Smalltalk at:eachVar) isBehavior].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7277
                    usedGlobals size > 0 ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7278
                        list := list reject:[:each | usedGlobals includes:each ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7279
                        list := usedGlobals asOrderedCollection sort , list.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7280
                        offeredClass := Smalltalk at:usedGlobals first
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7281
                    ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7282
                        offeredClass := someMethod mclass
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7283
                    ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7284
                ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7285
            ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7286
                (aBrowserOrNil navigationState isVersionDiffBrowser
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7287
                or:[aBrowserOrNil navigationState isClassDocumentationBrowser]) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7288
                    offeredClass := currentClass.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7289
                    (offeredClass notNil and:[offeredClass isPrivate]) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7290
                        offeredClass := offeredClass owningClass
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7291
                    ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7292
                ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7293
                    (currentClass notNil
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7294
                    and:[(superclass := currentClass superclass) notNil]) ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7295
                        offeredClass := superclass
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7296
                    ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7297
                ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7298
            ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7299
            offeredClass notNil ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7300
                initialText := offeredClass theNonMetaclass name
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7301
            ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7302
        ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7303
    ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7304
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7305
    box := self
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7306
                enterBoxTitle:(self classResources string:title)
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7307
                withList:list
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7308
                okText:(self classResources string:okText).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7309
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7310
    initialText notNil ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7311
        box initialText:initialText
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7312
    ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7313
    ^ box
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7314
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7315
    "Created: / 13-02-2000 / 20:56:18 / cg"
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7316
    "Modified: / 27-07-2012 / 22:18:34 / cg"
17605
56c7694875b3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17596
diff changeset
  7317
    "Modified (comment): / 27-07-2017 / 12:58:02 / cg"
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7318
!
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7319
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7320
enterBoxTitle:title withList:aListOrNil okText:okText
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7321
    "convenient method: setup enterBox"
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7322
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7323
    |box rsrcs|
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7324
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7325
    aListOrNil notNil ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7326
        box := ListSelectionBox new.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7327
        "/ box := EnterBoxWithList new.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7328
        box list:aListOrNil.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7329
    ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7330
        box := EnterBox new.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7331
    ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7332
    rsrcs := self classResources.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7333
    box title:(rsrcs string:title) okText:(rsrcs string:okText).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7334
    ^ box
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7335
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7336
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7337
     self enterBoxTitle:'bla' withList:#('a' 'b' 'c') okText:'gaga'
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7338
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7339
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7340
    "Created: / 13.2.2000 / 20:53:53 / cg"
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7341
    "Modified: / 1.3.2000 / 11:15:09 / cg"
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7342
!
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7343
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7344
extractClassAndSelectorFrom:aString into:aBlock
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7345
    "given a string which can be either 'class>>sel' or
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7346
     'class sel', extract className and selector, and call aBlock with
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7347
     the result.
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7348
     Useful to open browser on a method as selected in some documentation."
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7349
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7350
    |sel clsName isMeta sep s|
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7351
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7352
    sel := aString.
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7353
    sel notNil ifTrue:[
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7354
        sel := sel asString withoutSeparators.
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7355
        ('*>>*' match:sel) ifTrue:[
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7356
            sep := $>
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7357
        ] ifFalse:[
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  7358
            ('*»*' match:sel) ifTrue:[
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  7359
                sep := $»
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7360
            ] ifFalse:[
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7361
                ('* *' match:sel) ifTrue:[
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7362
                    sep := Character space
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7363
                ]
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7364
            ].
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7365
        ].
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7366
        sep notNil ifTrue:[
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7367
            "
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7368
             extract class/sel from selection
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7369
            "
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7370
            s := ReadStream on:sel.
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7371
            clsName := (s upTo:sep) withoutSeparators.
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7372
            [s peek == sep] whileTrue:[s next].
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7373
            sel := (s upToEnd) withoutSeparators.
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7374
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7375
            (clsName endsWith:' class') ifTrue:[
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7376
                isMeta := true.
12713
7cccc4a7733c Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents: 12631
diff changeset
  7377
                clsName := clsName copyButLast:6 "copyTo:(clsName size - 5)"
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7378
            ] ifFalse:[
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7379
                isMeta := false
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7380
            ].
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7381
        ]
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7382
    ].
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7383
    aBlock value:clsName value:sel value:isMeta
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7384
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7385
    "Modified: / 17.6.1996 / 16:52:14 / stefan"
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7386
    "Created: / 6.2.2000 / 00:51:51 / cg"
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7387
    "Modified: / 6.2.2000 / 00:56:43 / cg"
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7388
!
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7389
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7390
extractSelectorFrom:aString
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7391
    "given an arbitrary string, try to extract a useful selector.
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7392
     Useful to open browser on a selected code fragment."
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7393
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7394
    |s sel sel2 t idx|
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7395
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7396
    aString isEmptyOrNil ifTrue:[^ nil].
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7397
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  7398
    (idx := aString indexOf:$») ~~ 0 ifTrue:[
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7399
        s := (aString copyFrom:idx+1) withoutSeparators.
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7400
        s isEmpty ifTrue:[^ nil]. 
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7401
    ] ifFalse:[    
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7402
        s := aString asString string withoutSeparators.
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7403
    ].
15976
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7404
    sel := s asSymbolIfInterned.
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7405
    sel isNil ifTrue:[
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7406
        sel := s.
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7407
    ] ifFalse:[
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7408
        (sel endsWith:$:) ifTrue:[
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7409
            ^ sel.     
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7410
        ].
6705
b78bea6fd220 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6678
diff changeset
  7411
    ].
b78bea6fd220 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6678
diff changeset
  7412
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7413
    t := Parser selectorInExpression:sel.
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7414
    t notNil ifTrue:[
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7415
        sel := t
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7416
    ].
16529
0514cf8d290b #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16471
diff changeset
  7417
    (sel = s or:[sel isNil or:[t == #'>>']]) ifTrue:[
16863
d9e632f16155 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 16847
diff changeset
  7418
        "oops - that's probably not what we want here ..."
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7419
        self extractClassAndSelectorFrom:s into:[:c :s :m |
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7420
            sel := s
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7421
        ]
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7422
    ].
15976
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7423
    s := sel asSymbolIfInterned.
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7424
    s notNil ifTrue:[
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7425
        ^ s.
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7426
    ].
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7427
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7428
    (sel startsWith:$#) ifTrue:[
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7429
        sel2 := sel copyFrom:2.
18317
436c9d4c5603 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18302
diff changeset
  7430
        ((sel2 startsWith:$') and:[(sel2 endsWith:$') and:[sel2 size > 2]]) ifTrue:[
15976
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7431
            sel2 := (sel2 copyFrom:2) copyButLast:1
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7432
        ].
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7433
        (sel2 := sel2 asSymbolIfInterned) notNil ifTrue:[
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7434
            ^ sel2.
8047
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  7435
        ].
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  7436
    ].
8bc319ff9ba7 better title in implementorsOfAny
Claus Gittinger <cg@exept.de>
parents: 7998
diff changeset
  7437
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7438
    ^ sel
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7439
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7440
    "
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7441
     self extractSelectorFrom:'at:put:'      
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7442
     self extractSelectorFrom:'#at:put:'                       
15976
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7443
     self extractSelectorFrom:'#''at:put:'''                       
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7444
     self extractSelectorFrom:'at:something put:someValue'     
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7445
     self extractSelectorFrom:'self at:something put:someValue'
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7446
     self extractSelectorFrom:'(self at:something put:someValue)' 
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7447
     self extractSelectorFrom:'[self at:something put:someValue] value' 
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  7448
     self extractSelectorFrom:'Array » at:put:' 
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7449
     self extractSelectorFrom:'Array>>at:put:' 
15976
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7450
     self extractSelectorFrom:'Array>>#at:put:' 
a9ca5b4f4369 #REFACTORING
Stefan Vogel <sv@exept.de>
parents: 15944
diff changeset
  7451
     self extractSelectorFrom:'Array>>#''at:put:''' 
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7452
    "
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7453
18317
436c9d4c5603 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18302
diff changeset
  7454
    "Created: / 06-02-2000 / 00:49:44 / cg"
436c9d4c5603 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 18302
diff changeset
  7455
    "Modified: / 04-08-2018 / 16:54:20 / Claus Gittinger"
6560
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7456
!
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7457
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7458
getClassThenPerform:aSelector
18615
eb18306788b0 Fix usage of unser var "resources"
Stefan Vogel <sv@exept.de>
parents: 18614
diff changeset
  7459
    |classNameEntered classEntered enterBox resources|
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7460
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7461
    "/ new Code:
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7462
    classNameEntered := self askForClassName.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7463
18615
eb18306788b0 Fix usage of unser var "resources"
Stefan Vogel <sv@exept.de>
parents: 18614
diff changeset
  7464
    resources := self classResources.
eb18306788b0 Fix usage of unser var "resources"
Stefan Vogel <sv@exept.de>
parents: 18614
diff changeset
  7465
eb18306788b0 Fix usage of unser var "resources"
Stefan Vogel <sv@exept.de>
parents: 18614
diff changeset
  7466
"/ old Code:
13028
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7467
"/
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7468
"/    enterBox := EnterBox title:(self classResources stringWithCRs:'Browse which class:').
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7469
"/    enterBox okText:(resources string:'Browse').
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7470
"/    enterBox entryCompletionBlock:(DoWhatIMeanSupport classNameEntryCompletionBlock).
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7471
"/    enterBox action:[:className | classNameEntered := className].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7472
"/    enterBox showAtPointer.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7473
"/
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7474
    classNameEntered notEmptyOrNil ifTrue:[   
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7475
        classEntered := Smalltalk classNamed:classNameEntered.
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7476
        classEntered isNil ifTrue:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7477
            self warn:(resources string:'No such class').
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7478
        ] ifFalse:[
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7479
            self perform:aSelector with:classEntered  
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7480
        ]
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7481
    ].
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7482
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7483
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7484
     SystemBrowser getClassThenPerform:#browseClass:
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7485
    "
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7486
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7487
    "Modified: / 10-08-2006 / 12:54:20 / cg"
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7488
!
fa823a68acdf class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12954
diff changeset
  7489
6560
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7490
resourceEditorClassFor:aResource 
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7491
    "resources are from a methods resource-info;
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7492
     return an appropriate editor class."
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7493
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7494
    (aResource == #canvas) ifTrue:[
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7495
        ^ UIPainter
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7496
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7497
    (aResource == #menu) ifTrue:[
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7498
        ^ MenuEditor
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7499
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7500
    ((aResource == #image) or:[aResource == #fileImage]) ifTrue:[
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7501
        ^ ImageEditor
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7502
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7503
    (aResource == #help) ifTrue:[
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7504
        ^ UIHelpTool
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7505
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7506
    (aResource == #tableColumns) ifTrue:[
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7507
        ^ DataSetBuilder
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7508
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7509
    (aResource == #tabList) ifTrue:[
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7510
        ^ TabListEditor
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7511
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7512
    (aResource == #hierarchicalList) ifTrue:[
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7513
        ^ HierarchicalListEditor
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7514
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7515
    ^ nil
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7516
!
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7517
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7518
resourceEditorClassForResources:resources
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7519
    "resources are from a methods resource-info;
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7520
     return an appropriate editor class."
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7521
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7522
    resources keysDo:[:eachResource |
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7523
        |editor|
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7524
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7525
        editor := self resourceEditorClassFor:eachResource.
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7526
        editor notNil ifTrue:[ ^ editor].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7527
    ].
80370d5aa971 share code between old and new browser
Claus Gittinger <cg@exept.de>
parents: 6552
diff changeset
  7528
    ^ nil
2813
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7529
! !
ebef400fdd3b code reuse
Claus Gittinger <cg@exept.de>
parents: 2811
diff changeset
  7530
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7531
!SystemBrowser::BrowserHistoryEntry methodsFor:'accessing'!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7532
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7533
className
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7534
    "return the value of the instance variable 'className' (automatically generated)"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7535
13947
dd203de7c75a class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 13921
diff changeset
  7536
    ^ className ? '*anonymous*'
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7537
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7538
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7539
className:something
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7540
    "set the value of the instance variable 'className' (automatically generated)"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7541
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7542
    className := something.
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7543
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7544
3151
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
  7545
className:classNameArg meta:metaArg selector:selectorArg
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
  7546
    className := classNameArg.
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
  7547
    meta := metaArg.
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
  7548
    selector := selectorArg.
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
  7549
!
910fd5bcfb6e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3131
diff changeset
  7550
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7551
icon
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7552
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7553
    ^nil
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7554
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7555
    "Created: / 05-05-2011 / 23:57:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7556
!
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7557
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7558
label
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7559
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7560
    ^self displayString
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7561
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7562
    "Created: / 05-05-2011 / 23:57:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7563
!
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7564
3131
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7565
meta
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7566
    "return the value of the instance variable 'meta' (automatically generated)"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7567
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7568
    ^ meta
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7569
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7570
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7571
meta:something
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7572
    "set the value of the instance variable 'meta' (automatically generated)"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7573
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7574
    meta := something.
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7575
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7576
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7577
selector
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7578
    "return the value of the instance variable 'selector' (automatically generated)"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7579
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7580
    ^ selector
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7581
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7582
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7583
selector:something
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7584
    "set the value of the instance variable 'selector' (automatically generated)"
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7585
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7586
    selector := something.
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7587
!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7588
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7589
theClass
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7590
    ^ Smalltalk at:className asSymbol
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7591
! !
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7592
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7593
!SystemBrowser::BrowserHistoryEntry methodsFor:'comparing'!
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7594
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7595
= anEntry
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7596
    ^ className = anEntry className
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7597
      and:[meta = anEntry meta
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7598
      and:[selector = anEntry selector]]
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7599
! !
883d7b34bb86 history stuff refactored (common between old and new browser)
Claus Gittinger <cg@exept.de>
parents: 3125
diff changeset
  7600
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7601
!SystemBrowser::BrowserHistoryEntry methodsFor:'displaying'!
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7602
13319
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7603
displayOn:aGCOrStream
13820
4a9bc4698533 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13552
diff changeset
  7604
    | cls name |
13319
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7605
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7606
    "/ what a kludge - Dolphin and Squeak mean: printOn: a stream;
17432
c15b22dc05c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17404
diff changeset
  7607
    "/ old ST80 means: draw-yourself on a GC.
13319
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7608
    (aGCOrStream isStream) ifFalse:[
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7609
        ^ super displayOn:aGCOrStream
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7610
    ].
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7611
13820
4a9bc4698533 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13552
diff changeset
  7612
    cls := self theClass.
4a9bc4698533 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13552
diff changeset
  7613
    name := cls notNil ifTrue:[cls nameInBrowser] ifFalse:[className].
4a9bc4698533 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13552
diff changeset
  7614
    name printOn:aGCOrStream.
13319
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7615
    meta ifTrue:[
16037
3393fbb61d79 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16027
diff changeset
  7616
        "/ aGCOrStream emphasis:#bold.
3393fbb61d79 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16027
diff changeset
  7617
        aGCOrStream nextPutAll:' class'.
3393fbb61d79 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16027
diff changeset
  7618
        "/ aGCOrStream emphasis:nil.
13319
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7619
    ].
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7620
    selector notNil ifTrue:[ 
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7621
        aGCOrStream
18900
8568425e77d1 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 18896
diff changeset
  7622
            nextPutAll:' » ';
17543
caad87fae8a9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17498
diff changeset
  7623
            bold;
16037
3393fbb61d79 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16027
diff changeset
  7624
            nextPutAll:selector;
17543
caad87fae8a9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17498
diff changeset
  7625
            normal.
13319
93eadba89fa6 Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents: 13128
diff changeset
  7626
    ].
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7627
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7628
    "Created: / 15-04-2010 / 13:47:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13820
4a9bc4698533 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13552
diff changeset
  7629
    "Modified: / 14-10-2013 / 12:18:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17543
caad87fae8a9 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 17498
diff changeset
  7630
    "Modified: / 20-06-2017 / 08:59:26 / cg"
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7631
! !
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7632
820
2a412afad51d fixed autoSearch, when searching for a private-classes name
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  7633
!SystemBrowser class methodsFor:'documentation'!
93
claus
parents: 90
diff changeset
  7634
12822
cda365756f93 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12785
diff changeset
  7635
version
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
  7636
    ^ '$Header$'
12822
cda365756f93 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12785
diff changeset
  7637
!
cda365756f93 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12785
diff changeset
  7638
8851
287f3e03a645 changed: #iconForClass:
Claus Gittinger <cg@exept.de>
parents: 8759
diff changeset
  7639
version_CVS
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
  7640
    ^ '$Header$'
10048
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7641
!
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7642
9e92f3285051 changed: #instVarOverlayXmlSpec
Claus Gittinger <cg@exept.de>
parents: 9879
diff changeset
  7643
version_SVN
15831
36652445494b class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 15565
diff changeset
  7644
    ^ '$Id$'
36
ccde5a941840 *** empty log message ***
claus
parents:
diff changeset
  7645
! !
4112
ed7af6707ad7 emphasisForChangedCode
tm
parents: 3834
diff changeset
  7646
12475
469fd10da830 class: SystemBrowser
Claus Gittinger <cg@exept.de>
parents: 12073
diff changeset
  7647
203
de8d39d459fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  7648
SystemBrowser initialize!