BrowserView.st
author Claus Gittinger <cg@exept.de>
Fri, 01 Nov 1996 17:23:10 +0100
changeset 826 cdbbf4eb1afb
parent 823 08eda73555b4
child 832 2ddf9308bb2f
permissions -rw-r--r--
use new Method>>who interface
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     1
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
     3
              All Rights Reserved
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     4
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
f2c56efa3599 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    11
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    12
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    13
StandardSystemView subclass:#BrowserView
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    14
        instanceVariableNames:'classCategoryListView classListView methodCategoryListView
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    15
                methodListView classMethodListView codeView classToggle
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    16
                instanceToggle currentNamespace currentClassCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    17
                currentClassHierarchy currentClass currentMethodCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    18
                currentMethod currentSelector showInstance actualClass fullClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    19
                lastMethodCategory aspect variableListView fullProtocol
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    20
                lockUpdates autoSearch myLabel acceptClass lastSourceLogMessage
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    21
                lastCategory lastModule lastPackage'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    22
        classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    23
                StopIcon TraceIcon'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    24
        poolDictionaries:''
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    25
        category:'Interface-Browsers'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    26
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    27
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    28
!BrowserView class methodsFor:'documentation'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    29
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    30
copyright
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    31
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    32
 COPYRIGHT (c) 1989 by Claus Gittinger
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    33
              All Rights Reserved
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    34
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    35
 This software is furnished under a license and may be used
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    36
 only in accordance with the terms of that license and with the
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    37
 inclusion of the above copyright notice.   This software may not
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    38
 be provided or otherwise made available to, or used by, any
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    39
 other person.  No title to or ownership of the software is
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    40
 hereby transferred.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    41
"
165
df29ee4514c1 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 161
diff changeset
    42
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    43
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    44
documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    45
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    46
    this class implements all kinds of class browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    47
    Typically, it is started with 'SystemBrowser open', but there are many other 
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    48
    startup messages, to launch special browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    49
    See the categories 'startup' and 'special search startup' in the classes
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    50
    protocol.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    51
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    52
    Alse, see the extra document 'doc/misc/sbrowser.doc' or the HTML online doc
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    53
    for how to use the browser.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    54
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    55
    written winter 89 by claus
106
claus
parents: 105
diff changeset
    56
claus
parents: 105
diff changeset
    57
    Notice: SystemBrowser is currently being rewritten to be an instance
claus
parents: 105
diff changeset
    58
    of ApplicationModel - this transition is not yet complete and you see
claus
parents: 105
diff changeset
    59
    here intermediate versions of BrowserView/SystemBrowser. 
claus
parents: 105
diff changeset
    60
    All action is (currently) still done here in BrowserView, although the
claus
parents: 105
diff changeset
    61
    SystemBrowsers class methods are used to startup a browser.
claus
parents: 105
diff changeset
    62
    This will certainly change ...
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    63
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    64
    [author:]
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    65
        Claus Gittinger
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    66
"
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    67
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    68
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    69
!BrowserView class methodsFor:'initialization'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    70
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    71
initialize
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    72
    "Browser configuration;
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    73
     (values can be changed from your private startup file)"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    75
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    76
     setting this to false, the removeClass function will remove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    77
     classes WITHOUT checking for instances. Otherwise,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    78
     it will check and let you confirm in case there are instances.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    79
     Checking for instances may be a bit time consuming, though.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    80
     The default is true - therefore, it will check
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    81
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    82
    CheckForInstancesWhenRemovingClasses := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    83
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    84
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    85
     setting this to true makes the browser remember the aspect shown
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    86
     in the classList and show this aspect when a new class is selected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    87
     If false, it always switches to the classes definition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    88
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    89
    RememberAspect := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    90
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    91
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    92
     CheckForInstancesWhenRemovingClasses := true
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    93
     CheckForInstancesWhenRemovingClasses := false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    94
     RememberAspect := true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    95
     RememberAspect := false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    96
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    97
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    98
    "Created: 23.11.1995 / 11:35:58 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    99
    "Modified: 23.11.1995 / 11:36:34 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   100
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   101
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   102
!BrowserView class methodsFor:'cleanup'!
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   103
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   104
lowSpaceCleanup
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   105
    DefaultIcon := nil
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   106
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   107
    "Created: 18.4.1996 / 16:46:40 / cg"
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   108
! !
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   109
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   110
!BrowserView class methodsFor:'defaults'!
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   111
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   112
defaultIcon
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   113
    DefaultIcon isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   114
        DefaultIcon := Form fromFile:'SBrowser.xbm' resolution:100
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   115
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   116
    ^ DefaultIcon
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   117
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   118
132
claus
parents: 131
diff changeset
   119
!BrowserView methodsFor:'change & update'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   120
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   121
refetchClass
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   122
    "after a class definition change in another browser,
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   123
     this is sent to update (otherwise, we'd still refer to the obsolete class)"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   124
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   125
"/    currentClass := Smalltalk at:(currentClass name asSymbol).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   126
    self switchToClass:(Smalltalk at:(currentClass name asSymbol)).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   127
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   128
"/    showInstance ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   129
"/        actualClass := currentClass
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   130
"/    ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   131
"/        actualClass := currentClass class
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   132
"/    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   133
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   134
    "Created: 8.2.1996 / 13:22:27 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   135
    "Modified: 8.2.1996 / 13:40:18 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   136
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   137
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   138
update:something with:someArgument from:changedObject
273
0fc84937f240 check oldMethod in method-update notification
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   139
    |list selector oldMethod|
93
claus
parents: 92
diff changeset
   140
701
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   141
    (changedObject == ObjectMemory) ifTrue:[
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   142
        (something == #earlyRestart 
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   143
        or:[something == #restarted
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   144
        or:[something == #returnFromSnapshot]]) ifTrue:[
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   145
            "/ those are to be ignored.
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   146
            ^ self
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   147
        ]
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   148
    ].
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   149
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   150
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   151
     avoid update/warn after my own changes
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   152
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   153
    lockUpdates == true ifTrue:[
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   154
"/         'ignored my change' printNL.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   155
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   156
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   157
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   158
"/ changedObject print. ' ' print. someArgument print. ' ' print.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   159
"/ something printNL.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   160
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
   161
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   162
    (changedObject == Smalltalk) ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   163
        something == #newClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   164
            (currentClass notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   165
            and:[someArgument name = currentClass name]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   166
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   167
                 the current class was autoloaded
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   168
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   169
                self warnLabel:'the selected class has changed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   170
                self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   171
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   172
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   173
            ((someArgument category = currentClassCategory)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   174
            or:[currentClassCategory notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   175
                and:[currentClassCategory startsWith:'*']]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   176
                self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   177
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   178
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   179
            someArgument category ~= currentClassCategory ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   180
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   181
                 category new ?
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   182
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   183
                (classCategoryListView notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   184
                and:[(list := classCategoryListView list) notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   185
                and:[(list includes:someArgument category) not]])
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   186
                ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   187
                    self updateClassCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   188
                ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   189
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   190
            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   191
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   192
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   193
        something == #classRemove ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   194
            someArgument == currentClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   195
                self warnLabel:'the selected class was removed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   196
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   197
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   198
            " fall into general update "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   199
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   200
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   201
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   202
         any other (unknown) change 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   203
         with the Smalltalk dictionary ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   204
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   205
        self updateClassCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   206
        self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   207
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   208
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   209
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   210
    changedObject isBehavior ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   211
        "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   212
        "/ its a class, that has changed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   213
        "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   214
        fullClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   215
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   216
            "/ full-class browser ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   217
            "/ (must check for both class and metaclass changes)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   218
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   219
            (currentClass == changedObject
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   220
            or:[currentClass class == changedObject]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   221
                self warnLabel:'class was changed - the code shown may be obsolete'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   222
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   223
            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   224
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   225
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   226
        (currentClass notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   227
        and:[changedObject name = currentClass name]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   228
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   229
            "/ its the current class that has changed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   230
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   231
            something == #methodDictionary ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   232
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   233
                "/ new feature: changeArg may be an array consisting of
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   234
                "/ the selector and the oldMethod
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   235
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   236
                someArgument isArray ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   237
                    oldMethod := someArgument at:2.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   238
                    selector := someArgument at:1.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   239
                ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   240
                    selector := someArgument
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   241
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   242
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   243
                (selector isSymbol) ifTrue:[
792
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   244
                    |changedMethod s1 s2|
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   245
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   246
                    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   247
                     the method with selector was changed or removed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   248
                    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   249
                    self updateMethodCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   250
                    self updateMethodListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   251
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   252
                    selector == currentSelector ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   253
                        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   254
                         special care here: the currently shown method has been
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   255
                         changed somehow in another browser (or via fileIn)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   256
                        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   257
                        changedMethod := currentClass compiledMethodAt:currentSelector.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   258
                        changedMethod isNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   259
                            self warnLabel:'the method shown was removed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   260
                            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   261
                        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   262
                        "compare the source codes"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   263
                        currentMethod notNil ifTrue:[
792
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   264
                            s1 := changedMethod source asString asCollectionOfLines copy.
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   265
                            [s1 last isEmpty] whileTrue:[s1 removeLast].
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   266
                            s2 := codeView contents  asCollectionOfLines copy.
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   267
                            [s2 last isEmpty] whileTrue:[s2 removeLast].
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   268
                            s1 = s2 ifFalse:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   269
                                self warnLabel:'method has changed - the code shown may be obsolete'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   270
                            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   271
                        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   272
                        ^ self    
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   273
                    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   274
                ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   275
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   276
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   277
            something == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   278
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   279
                 the class has changed its comment; we dont care, except if
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   280
                 currently showing the comment
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   281
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   282
                aspect == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   283
                    codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   284
                        self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   285
                        self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   286
                    ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   287
                        self warnLabel:'the comment has changed - reselect to update'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   288
                    ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   289
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   290
                self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   291
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   292
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   293
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   294
            something == #definition ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   295
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   296
                 the class has changed its definition.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   297
                 Warn, except if showing a method.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   298
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   299
                aspect notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   300
                    codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   301
                        self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   302
                        self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   303
                    ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   304
                        self warnLabel:'the classes definition has changed - reselect to update'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   305
                    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   306
                    ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   307
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   308
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   309
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   310
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   311
            "/ if I am not showing code update if unmodified,
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   312
            "/ warn if modified
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   313
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   314
            aspect notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   315
                codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   316
                    self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   317
                    self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   318
                ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   319
                    self warnLabel:'the classes has changed - reselect to update'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   320
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   321
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   322
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   323
        
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   324
            "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   325
             get the class again - in case of a changed class definition,
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   326
             we are otherwise refering to the obsolete old class
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   327
            "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   328
            self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   329
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   330
            self updateMethodCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   331
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   332
            "dont update codeView ...."
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   333
            "self update"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   334
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   335
            self warnLabel:'the class has changed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   336
            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   337
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   338
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   339
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   340
         any other class has changed (but not its organization, since
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   341
         that is cought in the above case).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   342
         We are not interested in it - except, if showing fullProtocol
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   343
         or hierarchy ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   344
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   345
        currentClassHierarchy notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   346
            fullProtocol ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   347
                (currentClass isSubclassOf:changedObject) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   348
                    self warnLabel:'some superclass has changed - reselect to update'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   349
                ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   350
            ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   351
                ((currentClass isSubclassOf:changedObject)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   352
                or:[changedObject isSubclassOf:currentClass]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   353
                    self warnLabel:'some superclass has changed - reselect to update'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   354
                ]                
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   355
            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   356
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   357
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   358
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   359
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   360
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   361
    (changedObject isMethod) ifTrue:[
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   362
    ]
236
d94505a6f697 release currentMethod when compiling or change notification arrives
Claus Gittinger <cg@exept.de>
parents: 229
diff changeset
   363
792
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   364
    "Modified: 22.10.1996 / 19:27:18 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   365
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   366
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   367
!BrowserView methodsFor:'class category list menu'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   368
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   369
classCategoryClone
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   370
    "open a new SystemBrowser showing the same method as I do"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   371
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   372
    SystemBrowser openInClass:actualClass selector:currentSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   373
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   374
    "Created: 14.9.1995 / 10:55:20 / claus"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   375
    "Modified: 14.9.1995 / 10:59:31 / claus"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   376
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   377
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   378
classCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   379
    "create a file 'categoryName' consisting of all classes in current category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   380
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   381
    |aStream fileName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   382
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   383
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   384
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   385
    fileName := currentClassCategory asString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   386
    fileName replaceAll:Character space by:$_.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   387
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   388
     this test allows a smalltalk to be built without Projects/ChangeSets
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   389
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   390
    Project notNil ifTrue:[
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   391
        fileName := Project currentProjectDirectory , fileName.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   392
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   393
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   394
    self withWaitCursorDo:[
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   395
        "
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   396
         if file exists, save original in a .sav file
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   397
        "
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   398
        fileName asFilename exists ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   399
            self busyLabel:'saving existing %1' with:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   400
            fileName asFilename copyTo:(fileName , '.sav')
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   401
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   402
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   403
        aStream := FileStream newFileNamed:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   404
        aStream isNil ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   405
            self warn:'cannot create: %1' with:fileName
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   406
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   407
            self busyLabel:'writing: %1' with:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   408
            Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   409
                aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   410
                    self busyLabel:'writing: %1' with:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   411
                    aClass fileOutOn:aStream.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   412
                ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   413
            ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   414
            aStream close.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   415
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   416
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   417
    self normalLabel.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   418
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   419
    "Modified: 14.10.1996 / 20:15:45 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   420
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   421
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   422
classCategoryFileOutBinaryEach
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   423
    "fileOut each class in the current category as binary bytecode."
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   424
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   425
    |mode|
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   426
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   427
    mode := Dialog choose:(resources string:'save including sources ?')
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   428
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   429
                   values:#(nil #discard #reference #keep)
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   430
                   default:#keep.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   431
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   432
    mode isNil ifTrue:[^ self].
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   433
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   434
    self withWaitCursorDo:[
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   435
        Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   436
            aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   437
                self busyLabel:'saving binary of: %1' with:aClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   438
                Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   439
                    self warn:'cannot create: %1' with:ex parameter.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   440
                    ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   441
                ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   442
                    aClass binaryFileOutWithSourceMode:mode.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   443
                ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   444
            ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   445
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   446
        self normalLabel.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   447
    ]
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   448
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   449
    "Created: 25.1.1996 / 17:27:45 / cg"
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   450
    "Modified: 14.10.1996 / 20:14:42 / cg"
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   451
!
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   452
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   453
classCategoryFileOutEach
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   454
    self withWaitCursorDo:[
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   455
        Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   456
            aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   457
                self busyLabel:'saving: %1' with:aClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   458
                Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   459
                    self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   460
                    ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   461
                ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   462
                    aClass fileOut
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   463
                ]
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   464
            ]
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   465
        ].
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   466
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   467
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   468
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   469
    "Modified: 14.10.1996 / 20:14:23 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   470
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   471
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   472
classCategoryFindClass
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   473
    self classCategoryFindClassOpen:false
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   474
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   475
    "Modified: 1.6.1996 / 16:03:12 / cg"
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   476
!
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   477
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   478
classCategoryFindClassOpen:doOpen
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   479
    "common code for both opening a new browser on a class and
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   480
     to search for a class in this browser"
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   481
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   482
    |box openButton title open okText okText2|
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   483
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   484
    open := doOpen.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   485
    open ifTrue:[
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   486
        title := 'class to browse:'.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   487
        okText := 'open'.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   488
        okText2 := 'find here'.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   489
    ] ifFalse:[
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   490
        title := 'class to find:'.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   491
        okText := 'find'.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   492
        okText2 := 'open new'.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   493
    ].
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   494
    box := self enterBoxForCodeSelectionTitle:title okText:okText.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   495
    box label:'Class name entry'.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   496
    openButton := box addButton:(Button label:(resources string:okText2)) before:(box okButton).
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   497
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   498
    openButton action:[
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   499
       open := open not.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   500
       box doAccept.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   501
       box okPressed.
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   502
    ].
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   503
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   504
    box entryCompletionBlock:[:contents |
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   505
        |s what m|
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   506
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   507
        s := contents withoutSpaces.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   508
        what := Smalltalk classnameCompletion:s.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   509
        box contents:what first.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   510
        (what at:2) size ~~ 1 ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   511
            self beep
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   512
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   513
    ].
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   514
    box action:[:aString |
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   515
                        |brwsr|
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   516
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   517
                        open ifTrue:[
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   518
                            brwsr := SystemBrowser open
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   519
                        ] ifFalse:[
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   520
                            brwsr := self
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   521
                        ].
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   522
                        brwsr switchToClassNameMatching:aString
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   523
                ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   524
    box showAtPointer
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   525
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   526
    "Created: 1.6.1996 / 16:03:15 / cg"
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   527
    "Modified: 1.6.1996 / 16:15:51 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   528
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   529
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   530
classCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   531
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   532
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   533
    box := self listBoxForCodeSelectionTitle:'selector to find:' okText:'find'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   534
    box entryCompletionBlock:[:contents |
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   535
        |s what m|
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   536
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   537
        s := contents withoutSpaces.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   538
        box topView withWaitCursorDo:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   539
            what := Smalltalk selectorCompletion:s.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   540
            box list:(what at:2).
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   541
            box contents:what first.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   542
            (what at:2) size ~~ 1 ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   543
                self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   544
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   545
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   546
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   547
    box action:[:aString | self switchToAnyMethod:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   548
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   549
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   550
    "Modified: 30.8.1995 / 22:49:49 / claus"
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   551
    "Modified: 28.5.1996 / 16:54:35 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   552
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   553
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   554
classCategoryMenu
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   555
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   556
    <resource: #keyboard ( #Find ) >
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   557
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   558
    |specialMenu m labels selectors shorties|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   559
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   560
    currentClassCategory notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   561
        labels :=  #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   562
                        'fileOut each binary ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   563
                        '-'
714
3caae72f99d2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 712
diff changeset
   564
                        'repository history ...'
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   565
                        'validate class revisions'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   566
                        '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   567
                        'checkin each ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   568
                    ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   569
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   570
                        classCategoryFileOutBinaryEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   571
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   572
                        classCategoryRepositoryHistory
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   573
                        classCategoryValidateClassRevisions
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   574
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   575
                        classCategoryCheckinEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   576
                     ).
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   577
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   578
        labels :=  #(
714
3caae72f99d2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 712
diff changeset
   579
                        'repository history ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   580
                    ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   581
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   582
                        classCategoryRepositoryHistory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   583
                     ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   584
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   585
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   586
    specialMenu := PopUpMenu 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   587
                        labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   588
                        selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   589
                        receiver:self.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   590
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   591
    Smalltalk sourceCodeManager isNil ifTrue:[
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   592
        specialMenu disableAll:#(classCategoryRepositoryHistory  
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   593
                                 classCategoryCheckinEach
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   594
                                 classCategoryValidateClassRevisions).
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   595
    ].
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   596
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   597
    device ctrlDown ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   598
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   599
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   600
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   601
    currentClassCategory isNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   602
        labels := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   603
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   604
"/                    '-'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   605
                    'clone'
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   606
                    'open for class ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   607
                    'spawn full class'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   608
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   609
                    'update'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   610
                    'find class ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   611
                    'find method ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   612
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   613
                    'new class category ...'
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   614
                    '='
812
17980094b4a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 811
diff changeset
   615
                    'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   616
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   617
        selectors := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   618
"/                    namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   619
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   620
                    classCategoryClone
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   621
                    classCategoryOpenInClass
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   622
                    classCategorySpawnFullClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   623
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   624
                    classCategoryUpdate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   625
                    classCategoryFindClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   626
                    classCategoryFindMethod
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   627
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   628
                    classCategoryNewCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   629
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   630
                    otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   631
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   632
        shorties := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   633
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   634
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   635
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   636
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   637
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   638
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   639
                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   640
                    Find
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   641
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   642
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   643
                    Cmdn
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   644
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   645
                    #'Ctrl'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   646
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   647
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   648
        labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   649
                    'fileOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   650
                    'fileOut each'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   651
                    'printOut' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   652
                    'printOut protocol'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   653
                    '-'
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   654
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   655
"/                    '-'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   656
                    'clone'
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   657
                    'open for class ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   658
                    'SPAWN_CATEGORY'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   659
                    'spawn full class'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   660
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   661
                    'update'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   662
                    'find class ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   663
                    'find method ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   664
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   665
                    'new class category ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   666
                    'rename ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   667
                    'remove'
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   668
                    '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   669
                    'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   670
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   671
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   672
                   classCategoryFileOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   673
                   classCategoryFileOutEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   674
                   classCategoryPrintOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   675
                   classCategoryPrintOutProtocol
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   676
                   nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   677
"/                   namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   678
"/                   nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   679
                   classCategoryClone
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   680
                    classCategoryOpenInClass
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   681
                   classCategorySpawn
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   682
                   classCategorySpawnFullClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   683
                   nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   684
                   classCategoryUpdate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   685
                   classCategoryFindClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   686
                   classCategoryFindMethod
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   687
                   nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   688
                   classCategoryNewCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   689
                   classCategoryRename
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   690
                   classCategoryRemove
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   691
                   nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   692
                   otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   693
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   694
        shorties := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   695
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   696
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   697
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   698
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   699
                    nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   700
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   701
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   702
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   703
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   704
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   705
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   706
                    nil
506
1f3cf6d5d343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 501
diff changeset
   707
                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   708
                    Find
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   709
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   710
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   711
                    Cmdn
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   712
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   713
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   714
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   715
                    #'Ctrl'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   716
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   717
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   718
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   719
    m := PopUpMenu 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   720
                labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   721
                selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   722
                accelerators:shorties.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   723
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   724
    m subMenuAt:#otherMenu put:specialMenu.
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   725
    ^ m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   726
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   727
    "Created: 14.9.1995 / 10:50:17 / claus"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   728
    "Modified: 29.10.1996 / 13:37:16 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   729
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   730
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   731
classCategoryNewCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   732
    |box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   733
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   734
    box := self enterBoxTitle:'name of new class category:' okText:'create'.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   735
    box action:[:aString |
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   736
        |categories|
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   737
        categories := classCategoryListView list.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   738
        (categories includes:aString) ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   739
            categories add:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   740
            categories sort.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   741
            classCategoryListView setContents:categories.
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   742
        ].
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   743
        currentClassCategory := aString.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   744
        classCategoryListView setSelectElement:aString.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   745
        self switchToClass:nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   746
        actualClass := acceptClass := nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   747
        self classCategorySelectionChanged
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
   748
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   749
    box showAtPointer
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   750
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   751
    "Modified: 26.5.1996 / 15:02:33 / cg"
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   752
    "Modified: 19.8.1996 / 18:25:41 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   753
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   754
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   755
classCategoryOpenInClass
599
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   756
    self classCategoryFindClassOpen:true
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   757
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   758
    "Modified: 1.6.1996 / 16:03:30 / cg"
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   759
!
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   760
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   761
classCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   762
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   763
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   764
    Smalltalk allClassesInCategory:currentClassCategory do:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   765
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   766
        aClass printOutOn:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   767
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   768
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   769
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   770
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   771
classCategoryPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   772
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   773
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   774
    Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   775
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   776
        aClass printOutProtocolOn:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   777
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   778
    ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   779
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   780
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   781
classCategoryRemove
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   782
    "remove all classes in current category"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   783
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
   784
    |count t classesToRemove subclassesRemoved box t2|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   785
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   786
    self checkClassCategorySelected ifFalse:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   787
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   788
    classesToRemove := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   789
    Smalltalk allBehaviorsDo:[:aClass |
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   790
        aClass category = currentClassCategory ifTrue:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   791
            classesToRemove add:aClass
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   792
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   793
    ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   794
    subclassesRemoved := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   795
    classesToRemove do:[:aClass |
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   796
        aClass allSubclassesDo:[:aSubclass |
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   797
            (classesToRemove includes:aSubclass) ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   798
                (subclassesRemoved includes:aSubclass) ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   799
                    subclassesRemoved add:aSubclass
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   800
                ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   801
            ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   802
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   803
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   804
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   805
    count := classesToRemove size.
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   806
    t := resources string:'remove "%1" ?' with:currentClassCategory.
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   807
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   808
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   809
       count == 1 ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   810
           t2 := '(with %1 class)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   811
       ] ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   812
           t2 := '(with %1 classes)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   813
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   814
       t := t , '\' , (resources string:t2 with:count printString)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   815
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   816
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   817
    count := subclassesRemoved size.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   818
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   819
       count == 1 ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   820
           t2 := '(and %1 subclass)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   821
       ] ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   822
           t2 := '(and %1 subclasses)'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   823
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   824
       t := t , '\' , (resources string:t2 with:count printString)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   825
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   826
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   827
    t := t withCRs.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   828
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   829
    box := YesNoBox 
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   830
               title:t
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   831
               yesText:(resources at:'remove')
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   832
               noText:(resources at:'abort').
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   833
    box label:(resources at:'remove category').
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   834
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   835
    box confirm ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   836
        "after querying user - do really remove classes in list1 and list2"
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   837
        |keep idx|
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   838
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   839
        keep := false.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   840
        (subclassesRemoved asOrderedCollection
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   841
         , classesToRemove asOrderedCollection) do:[:aClassToRemove |
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   842
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   843
            (CheckForInstancesWhenRemovingClasses not
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   844
             or:[aClassToRemove hasInstances not
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   845
             or:[self confirm:(aClassToRemove name , ' has instances - remove anyway ?')]] 
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   846
            ) ifTrue:[   
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   847
                Smalltalk removeClass:aClassToRemove
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   848
            ] ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   849
                keep := true.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   850
            ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   851
        ].
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   852
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   853
        self updateClassCategoryList.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   854
        (classCategoryListView list includes:currentClassCategory) ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   855
            currentClassCategory := nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   856
        ].
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   857
        self classCategorySelectionChanged.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   858
        
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   859
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   860
        self switchToClass:nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   861
"/        keep ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   862
"/            idx := classCategoryListView list indexOf:currentClassCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   863
"/            currentClassCategory := nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   864
"/            idx ~= 0 ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   865
"/                classCategoryListView removeIndex:idx.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   866
"/            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   867
"/        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   868
    ]
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   869
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   870
    "Modified: 19.8.1996 / 23:22:35 / stefan"
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   871
    "Modified: 10.9.1996 / 19:58:14 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   872
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   873
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   874
classCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   875
    "launch an enterBox to rename current class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   876
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   877
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   878
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   879
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   880
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   881
    box := self enterBoxTitle:'rename class category to:' okText:'rename'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   882
    box initialText:currentClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   883
    box action:[:aString | self renameCurrentClassCategoryTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   884
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   885
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   886
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   887
classCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   888
    "create a new SystemBrowser browsing current classCategory"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   889
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   890
    currentClassCategory notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   891
        self withWaitCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   892
            SystemBrowser browseClassCategory:currentClassCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   893
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   894
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   895
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   896
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   897
classCategorySpawnFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   898
    "create a new SystemBrowser browsing full class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   899
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   900
    |newBrowser|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   901
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   902
    self withWaitCursorDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   903
        newBrowser := SystemBrowser browseFullClasses
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   904
" "
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   905
        .
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   906
        currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   907
            newBrowser switchToClassNamed:(currentClass name)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   908
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   909
" "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   910
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   911
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   912
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   913
classCategoryUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   914
    "update class category list and dependants"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   915
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   916
    |oldClassName oldMethodCategory|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   917
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   918
    classCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   919
        currentClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   920
            oldClassName := currentClass name.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   921
            (oldClassName endsWith:'-old') ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   922
                oldClassName := oldClassName copyWithoutLast:4 "copyTo:(oldClassName size - 4)"
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   923
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   924
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   925
        oldMethodCategory := currentMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   926
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   927
        classCategoryListView setContents:(self listOfAllClassCategories).
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   928
        currentClassCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   929
            classCategoryListView setSelectElement:currentClassCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   930
            self classCategorySelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   931
            oldClassName notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   932
                classListView setSelectElement:oldClassName.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   933
                self switchToClass:(Smalltalk at:oldClassName asSymbol).
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   934
                self classSelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   935
                oldMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   936
                    methodCategoryListView setSelectElement:oldMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   937
                    currentMethodCategory := oldMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   938
                    self methodCategorySelectionChanged
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   939
                ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   940
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   941
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   942
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   943
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   944
    "Modified: 26.5.1996 / 15:03:57 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   945
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   946
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   947
!BrowserView methodsFor:'class category source administration'!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   948
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   949
classCategoryCheckinEach
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   950
    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   951
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   952
    self withWaitCursorDo:[
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   953
        |logMessage classes|
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   954
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
   955
        logMessage := self getLogMessageFor:'(any in classCategory ', currentClassCategory, ')'.
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   956
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   957
        logMessage notNil ifTrue:[
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   958
            (currentClassCategory = '* all *'
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   959
            or:[currentClassCategory = '* hierarchy *']) ifTrue:[
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   960
                classes := Smalltalk allClasses
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   961
            ] ifFalse:[
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   962
                classes := Smalltalk allClassesInCategory:currentClassCategory.
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   963
            ].
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   964
            lastSourceLogMessage := logMessage.
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   965
            classes do:[:aClass |
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   966
                self busyLabel:'checking in %1' with:aClass name.
466
Claus Gittinger <cg@exept.de>
parents: 465
diff changeset
   967
                "/ ca does not want boxes to pop up all over ...
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   968
                InformationSignal handle:[:ex |
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
   969
                    Transcript showCR:ex errorString
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   970
                ] do:[
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   971
                    self classCheckin:aClass withLog:logMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   972
"/                    (aClass sourceCodeManager) 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   973
"/                        checkinClass:aClass 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   974
"/                        logMessage:logMessage.
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   975
                ].
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   976
                self normalLabel.
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   977
            ]
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   978
        ].
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   979
        self normalLabel.
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   980
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   981
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   982
    "Created: 23.11.1995 / 11:41:38 / cg"
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
   983
    "Modified: 18.5.1996 / 15:38:00 / cg"
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
   984
    "Modified: 15.6.1996 / 00:25:58 / stefan"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   985
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   986
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   987
classCategoryRepositoryHistory
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   988
    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   989
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   990
    self withWaitCursorDo:[
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   991
        |timeGoal aStream box y component timeGoalListPop|
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   992
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   993
        box := Dialog new.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   994
        (box addTextLabel:(resources string:'repository change report')) adjust:#left.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   995
        box addVerticalSpace:20.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   996
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   997
        timeGoal := 'yesterday' asValue. 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   998
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
   999
        y := box yPosition.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1000
        component := box addTextLabel:(resources string:'list changes since (mm/dd):').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1001
        component width:0.5; adjust:#right; borderWidth:0.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1002
        box yPosition:y.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1003
        timeGoalListPop := box addComboBoxOn:timeGoal tabable:true.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1004
        timeGoalListPop width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1005
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1006
        timeGoalListPop list:#('yesterday'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1007
                               'a week ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1008
                               'a month ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1009
                               'a year ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1010
                               'all'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1011
                              ).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1012
        box addAbortButton; addOkButton.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1013
        box open.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1014
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1015
        box accepted ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1016
            timeGoal := timeGoal value.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1017
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1018
"/        timeGoal := Dialog 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1019
"/                         request:'list changed repository containers since (mm/dd):
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1020
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1021
"/You can also specify the date as 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1022
"/''yesterday'', ''a week ago'' or ''a month ago''
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1023
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1024
"/'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1025
"/                         initialAnswer:'yesterday'  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1026
"/                         onCancel:nil.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1027
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1028
"/        timeGoal notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1029
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1030
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1031
            self busyLabel:'extracting history ...' with:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1032
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1033
            aStream := WriteStream on:(String new:200).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1034
            Processor activeProcess withLowerPriorityDo:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1035
                SourceCodeManager notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1036
                    SourceCodeManager
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1037
                        writeHistoryLogSince:timeGoal
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1038
                        to:aStream.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1039
                ] ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1040
                    aStream nextPutLine:'no history available (no SourceCodeManagement installed)'
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1041
                ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1042
            ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1043
            codeView contents:(aStream contents).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1044
            codeView modified:false.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1045
            codeView acceptAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1046
            codeView explainAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1047
            methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1048
                methodListView setSelection:nil
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1049
            ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1050
            aspect := nil.      
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1051
            self normalLabel
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1052
        ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1053
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1054
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1055
    "Created: 23.11.1995 / 11:41:38 / cg"
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1056
    "Modified: 11.9.1996 / 14:02:49 / cg"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1057
!
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1058
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1059
classCategoryValidateClassRevisions
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1060
    "for all classes, ask the sourceCodeManager for the most recent version
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1061
     and compare this to the actual version. Send mismatch info to the Transcript"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1062
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1063
    self withWaitCursorDo:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1064
        |logMessage classes repVersion clsVersion binVersion|
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1065
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1066
        (currentClassCategory = '* all *'
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1067
        or:[currentClassCategory = '* hierarchy *']) ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1068
            classes := Smalltalk allClasses
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1069
        ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1070
            classes := Smalltalk allClassesInCategory:currentClassCategory.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1071
        ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1072
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1073
        classes do:[:aClass |
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1074
            aClass isLoaded ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1075
                self busyLabel:'validating %1 ...' with:aClass name.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1076
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1077
                repVersion := aClass sourceCodeManager newestRevisionOf:aClass.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1078
                clsVersion := aClass revision.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1079
                binVersion := aClass binaryRevision.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1080
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1081
                clsVersion ~= repVersion ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1082
                     Transcript showCR:(aClass name , ' is not up-to-date.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1083
                ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1084
                    clsVersion ~= binVersion ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1085
                        binVersion notNil ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1086
                             Transcript showCR:(aClass name , ' should to be recompiled.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1087
                        ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1088
                    ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1089
"/                         Transcript showCR:(aClass name , ' is up-to-date.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1090
                    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1091
                ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1092
            ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1093
        ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1094
        self normalLabel.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1095
    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1096
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1097
    "Modified: 15.6.1996 / 00:25:58 / stefan"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1098
    "Created: 29.10.1996 / 13:21:08 / cg"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1099
    "Modified: 29.10.1996 / 13:23:58 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1100
! !
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1101
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1102
!BrowserView methodsFor:'class category stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1103
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1104
checkClassCategorySelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1105
    currentClassCategory isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1106
        self warn:'select a class category first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1107
        ^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1108
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1109
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1110
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1111
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1112
classCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1113
    "user clicked on a class category line - show classes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1114
     If switching to hierarchy or all, keep current selections"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1115
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1116
    |newCategory oldClass oldName classIndex|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1117
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1118
    newCategory := classCategoryListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1119
    (newCategory startsWith:'*') ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1120
        "etiher all or hierarchy;
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1121
         remember current selections and switch after showing class list"
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1122
        oldClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1123
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1124
    currentClassCategory := newCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1125
    oldClass isNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1126
        self classCategorySelectionChanged
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1127
    ] ifFalse:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1128
        oldName := oldClass name.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1129
        self withWaitCursorDo:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1130
            self updateClassList
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1131
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1132
        "stupid - search for class name in (indented) list"
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1133
        classIndex := classListView list findFirst:[:elem | elem endsWith:oldName].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1134
        classIndex ~~ 0 ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1135
            classListView setSelection:classIndex.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1136
            self switchToClass:(Smalltalk at:(oldName asSymbol))
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1137
        ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1138
            self normalLabel.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1139
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1140
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1141
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1142
    "Modified: 25.5.1996 / 12:25:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1143
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1144
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1145
classCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1146
    "class category has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1147
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1148
    self withWaitCursorDo:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1149
        self switchToClass:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1150
        aspect := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1151
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1152
        actualClass := acceptClass := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1153
        currentMethodCategory := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1154
        currentMethod := currentSelector := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1155
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1156
        self updateClassList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1157
        self updateMethodCategoryList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1158
        self updateMethodList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1159
        self updateCodeView.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1160
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1161
        codeView explainAction:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1162
        codeView acceptAction:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1163
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1164
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1165
    "Modified: 8.2.1996 / 13:35:18 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1166
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1167
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1168
listOfAllClassCategories
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1169
    "return a list of all class categories"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1170
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1171
    |newList cat|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1172
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1173
    newList := Set with:'* all *' with:'* hierarchy *'.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1174
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1175
    (self listOfNamespaces) do:[:aNamespace |
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1176
        Smalltalk allBehaviorsDo:[:aClass |
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1177
            aClass isMeta ifFalse:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1178
                cat := aClass category.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1179
                cat isNil ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1180
                    cat := '* no category *'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1181
                ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1182
                cat ~= 'obsolete' ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1183
                    newList add:cat
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1184
                ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1185
            ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1186
        ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1187
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1188
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1189
    ^ newList asOrderedCollection sort.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1190
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1191
    "Modified: 26.10.1996 / 11:25:45 / cg"
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1192
!
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1193
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1194
listOfNamespaces
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1195
    "return a list of considered namespaces"
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1196
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1197
    |set|
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1198
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1199
    currentNamespace isNil ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1200
        ^ Array with:Smalltalk
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1201
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1202
    currentNamespace = '* all *' ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1203
        set := IdentitySet new.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1204
        Smalltalk allBehaviorsDo:[:aClass |
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1205
            aClass isNamespace ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1206
                set add:aClass
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1207
            ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1208
        ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1209
        ^ set
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1210
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1211
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1212
    ^ Array with:currentNamespace
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1213
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1214
    "Created: 26.10.1996 / 11:25:39 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1215
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1216
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1217
renameCurrentClassCategoryTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1218
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1219
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1220
    |any categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1221
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1222
    currentClassCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1223
        any := false.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1224
        Smalltalk allBehaviorsDo:[:aClass |
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1225
            aClass category = currentClassCategory ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1226
                aClass category:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1227
                any := true
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1228
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1229
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1230
        any ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1231
            categories := classCategoryListView list.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1232
            categories remove:currentClassCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1233
            categories add:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1234
            categories sort.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1235
            classCategoryListView setContents:categories.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1236
            currentClassCategory := aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1237
            classCategoryListView setSelectElement:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1238
        ] ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1239
            currentClassCategory := aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1240
            self updateClassCategoryList.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1241
            self updateClassListWithScroll:false
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1242
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1243
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1244
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1245
    "Modified: 26.5.1996 / 15:02:55 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1246
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1247
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1248
switchToAnyMethod:aSelectorString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1249
    "find all implementors of aSelectorString, and present a list
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1250
     to choose from. When an entry is selected, switch to that class/selector.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1251
     This allows for quickly moving around in the system."
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1252
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1253
    |classes sel box theClassName|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1254
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1255
    classes := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1256
    aSelectorString knownAsSymbol ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1257
        sel := aSelectorString asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1258
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1259
        Smalltalk allClassesDo:[:aClass |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1260
            (aClass includesSelector:sel) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1261
                classes add:aClass.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1262
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1263
            (aClass class includesSelector:sel) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1264
                classes add:aClass class.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1265
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1266
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1267
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1268
    classes size == 0 ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1269
        SystemBrowser showNoneFound.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1270
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1271
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1272
    classes size > 1 ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1273
        box := ListSelectionBox title:(resources string:'#%1\in which class ?' with:aSelectorString) withCRs.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1274
        box okText:(resources string:'show').
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1275
        box list:(classes collect:[:aClass | aClass name]) asSortedCollection.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1276
        box action:[:aString | theClassName := aString].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1277
        box entryCompletionBlock:[:contents |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1278
            |s l what m|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1279
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1280
            s := contents withoutSpaces.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1281
            l := classes select:[:cls | cls name startsWith:s].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1282
            l size > 0 ifTrue:[    
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1283
                box list:(l collect:[:aClass | aClass name]) asSortedCollection.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1284
                box contents:l first name.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1285
                l size ~~ 1 ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  1286
                    self beep
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1287
                ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1288
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1289
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1290
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1291
    ] ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1292
        theClassName := classes first name
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1293
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1294
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1295
    theClassName notNil ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1296
        self switchToClassNamed:theClassName. 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1297
        self updateMethodCategoryList.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1298
        self switchToMethodNamed:aSelectorString.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1299
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1300
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1301
    "Modified: 1.9.1995 / 01:39:58 / claus"
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  1302
    "Modified: 28.5.1996 / 16:54:42 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1303
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1304
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1305
updateClassCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1306
    self updateClassCategoryListWithScroll:true
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1307
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1308
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1309
updateClassCategoryListWithScroll:scroll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1310
    |oldClassCategory oldClass oldMethodCategory oldMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1311
     oldSelector newCategoryList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1312
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1313
    classMethodListView notNil ifTrue:[ ^ self ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1314
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1315
    oldClassCategory := currentClassCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1316
    oldClass := currentClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1317
    oldMethodCategory := currentMethodCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1318
    oldMethod := currentMethod.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1319
    oldMethod notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1320
        oldSelector := currentSelector
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1321
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1322
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1323
    classCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1324
        newCategoryList := self listOfAllClassCategories.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1325
        newCategoryList = classCategoryListView list ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1326
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1327
                classCategoryListView contents:newCategoryList
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1328
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1329
                classCategoryListView setContents:newCategoryList
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1330
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1331
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1332
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1333
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1334
    oldClassCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1335
        classCategoryListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1336
            classCategoryListView setSelectElement:oldClassCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1337
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1338
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1339
    classListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1340
        oldClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1341
            classListView setSelectElement:(oldClass name)
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1342
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1343
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1344
    oldMethodCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1345
        methodCategoryListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1346
            methodCategoryListView setSelectElement:oldMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1347
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1348
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1349
    oldSelector notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1350
        methodListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1351
            methodListView setSelectElement:oldSelector
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1352
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1353
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1354
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1355
    "Modified: 26.5.1996 / 15:04:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1356
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1357
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1358
!BrowserView methodsFor:'class list menu'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1359
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1360
classClassInstVars
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1361
    "show class instance variables in codeView and setup accept-action
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1362
     for a class-instvar-definition change"
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1363
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1364
    self doClassMenu:[:currentClass |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1365
        |s|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1366
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1367
        s := WriteStream on:(String new).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1368
        currentClass fileOutClassInstVarDefinitionOn:s.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1369
        codeView contents:(s contents).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1370
        codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1371
        codeView acceptAction:[:theCode |
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1372
            codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1373
            Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1374
                Compiler evaluate:theCode asString notifying:codeView compile:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1375
                codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1376
                self normalLabel.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1377
                self updateClassList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1378
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1379
            codeView cursor:Cursor normal.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1380
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1381
        codeView explainAction:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1382
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1383
            methodListView setSelection:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1384
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1385
        aspect := #classInstVars.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1386
        self normalLabel
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1387
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1388
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1389
    "Modified: 25.5.1996 / 13:02:34 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1390
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1391
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1392
classComment
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1393
    "show the classes comment in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1394
     Also, set accept action to change the comment."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1395
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1396
    self classShowFrom:#comment 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1397
                   set:#comment: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1398
                aspect:#comment 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1399
               default:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1400
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1401
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1402
classDefinition
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1403
    "show class definition in codeView and setup accept-action for
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1404
     a class-definition change.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1405
     Extract documentation either from a documentation method or
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1406
     from the comment - not a biggy, but beginners will like
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1407
     it when exploring the system."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1408
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1409
    self doClassMenu:[:currentClass |
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1410
        |m s aStream isComment|
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1411
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1412
        aStream := WriteStream on:(String new:200).
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1413
        currentClass fileOutDefinitionOn:aStream.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1414
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1415
        currentClass isLoaded ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1416
            "
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1417
             add documentation as a comment, if there is any
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1418
            "
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1419
            m := currentClass class compiledMethodAt:#documentation.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1420
            m notNil ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1421
                s := m comment.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1422
                isComment := false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1423
            ] ifFalse:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1424
                "try comment"
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1425
                s := currentClass comment.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1426
                s notNil ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1427
                    s isEmpty ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1428
                        s := nil
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1429
                    ] ifFalse:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1430
                        (s includes:$") ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1431
                            s := s copy replaceAll:$" by:$'.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1432
                        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1433
                        isComment := true
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1434
                    ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1435
                ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1436
            ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1437
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1438
        aStream cr; cr; cr; cr; cr.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1439
        s isNil ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1440
            aStream nextPut:$" ; cr; nextPutAll:' no comment or documentation found'; cr.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1441
        ] ifFalse:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1442
            aStream nextPut:$" ; cr; nextPutAll:' Documentation:'; cr.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1443
            aStream cr; nextPutAll:s; cr; cr.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1444
            aStream nextPutAll:' Notice: '; cr.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1445
            aStream nextPutAll:'   the above string has been extracted from the classes '.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1446
            aStream nextPutAll:(isComment ifTrue:['comment.'] ifFalse:['documentation method.']).
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1447
            aStream cr.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1448
            aStream nextPutAll:'   It will not be preserved when accepting a new class definition.'; cr.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1449
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1450
        aStream nextPut:$".
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1451
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1452
        codeView contents:(aStream contents).
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1453
        codeView modified:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1454
        codeView acceptAction:[:theCode |
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1455
            codeView cursor:Cursor execute.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1456
            Object abortSignal catch:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1457
                (Compiler evaluate:theCode asString notifying:codeView compile:false)
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1458
                isBehavior ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1459
                    codeView modified:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1460
                    self classCategoryUpdate.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1461
                    self updateClassListWithScroll:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1462
                ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1463
            ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1464
            codeView cursor:Cursor normal.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1465
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1466
        codeView explainAction:nil.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1467
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1468
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1469
            methodListView setSelection:nil
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1470
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1471
        aspect := #definition.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1472
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1473
    ]
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1474
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1475
    "Modified: 25.5.1996 / 13:02:36 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1476
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1477
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1478
classDocumentation
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1479
    "show classes documentation (i.e. open doc-View on it)"
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1480
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1481
    self doClassMenu:[:currentClass |
557
821b5c5a0cc6 use new documentView
Claus Gittinger <cg@exept.de>
parents: 552
diff changeset
  1482
        HTMLDocumentView
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1483
            openFullOnText:(HTMLDocGenerator htmlDocOf:currentClass) 
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1484
            inDirectory:(Smalltalk getSystemFileName:'doc/online/english')
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1485
    ]
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1486
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1487
    "Created: 18.5.1996 / 12:12:20 / cg"
557
821b5c5a0cc6 use new documentView
Claus Gittinger <cg@exept.de>
parents: 552
diff changeset
  1488
    "Modified: 20.5.1996 / 20:30:52 / cg"
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1489
!
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1490
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1491
classFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1492
    "fileOut the current class.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1493
     Catch errors (sure, you like to know if it failed) and
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1494
     warn if any)"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1495
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1496
    self doClassMenu:[:currentClass |
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1497
        |msg|
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1498
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1499
        currentClass isPrivate ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1500
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1501
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1502
            self busyLabel:'saving %1' with:currentClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1503
            Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1504
                self warn:'cannot fileOut: %1\(%2)' with:currentClass name with:ex errorString.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1505
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1506
                ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1507
            ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1508
                currentClass fileOut.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1509
            ].
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1510
        ].
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1511
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1512
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1513
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1514
    "Modified: 14.10.1996 / 20:12:24 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1515
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1516
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1517
classFileOutBinary
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1518
    "fileOut the current class as binary bytecode."
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1519
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1520
    |mode|
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1521
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1522
    mode := Dialog choose:(resources string:'save including sources ?')
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1523
                   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1524
                   values:#(nil #discard #reference #keep)
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1525
                   default:#keep.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1526
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1527
    mode isNil ifTrue:[^ self].   "/ cancelled
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1528
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1529
    self doClassMenu:[:currentClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1530
        |msg|
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1531
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1532
        currentClass isPrivate ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1533
            self warn:'You must fileOut the owning class: ' , currentClass owningClass name
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1534
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1535
            self busyLabel:'saving binary of %1' with:currentClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1536
            Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1537
                self warn:'cannot create: %1\(%2)' with:ex parameter with:ex errorString.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1538
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1539
                ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1540
            ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1541
                currentClass binaryFileOutWithSourceMode:mode.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1542
            ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1543
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1544
        self normalLabel.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1545
    ]
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1546
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1547
    "Created: 24.1.1996 / 21:11:03 / cg"
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1548
    "Modified: 14.10.1996 / 20:12:46 / cg"
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1549
!
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1550
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1551
classHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1552
    "show current classes hierarchy in codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1553
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1554
    self doClassMenu:[:currentClass |
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1555
        |aStream|
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1556
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1557
        aStream := WriteStream on:(String new:200).
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1558
        actualClass printHierarchyOn:aStream.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1559
        codeView contents:(aStream contents).
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1560
        codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1561
        codeView acceptAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1562
        codeView explainAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1563
        methodListView notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1564
            methodListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1565
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1566
        aspect := #hierarchy. 
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1567
        self normalLabel
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1568
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1569
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1570
    "Modified: 25.5.1996 / 13:02:37 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1571
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1572
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1573
classInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1574
    "inspect the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1575
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1576
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1577
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1578
    currentClass inspect.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1579
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1580
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1581
classInstancesInspect
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1582
    "inspect the current classes instances"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1583
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1584
    self checkClassSelected ifFalse:[^ self].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1585
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1586
    currentClass allInstances inspect.
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1587
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1588
    "Created: 24.2.1996 / 16:12:14 / cg"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1589
!
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1590
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1591
classLoad
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1592
    "load an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1593
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1594
    |nm|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1595
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1596
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1597
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1598
    Autoload autoloadFailedSignal handle:[:ex |
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1599
        self warn:(resources string:'autoload of %1 failed.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1600
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1601
Check your source directory for a file named %1.st
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1602
and/or the abbreviation file for its shortened name.') with:nm.
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1603
        ex return.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1604
    ] do:[
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1605
        currentClass autoload.
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1606
        currentClass := actualClass := nil.
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1607
        self switchToClassNamed:nm
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1608
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1609
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1610
    "Modified: 4.3.1996 / 12:16:05 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1611
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1612
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1613
classMenu
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1614
    "sent by  classListView to ask for the menu"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1615
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1616
    |specialMenu labels selectors shorties m|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1617
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1618
    currentClass isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1619
        labels :=  #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1620
                       'fileIn new from repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1621
                    ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1622
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1623
        selectors := #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1624
                       classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1625
                      ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1626
    ] ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1627
        labels :=  #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1628
                       'fileOut binary'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1629
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1630
                       'inspect class'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1631
                       'inspect instances'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1632
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1633
                       'primitive definitions'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1634
                       'primitive variables'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1635
                       'primitive functions'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1636
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1637
                       'source container ...'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1638
                       'remove source container ...'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1639
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1640
                       'revision info' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1641
                       'compare with repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1642
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1643
                       'check into source repository'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1644
                       'fileIn from repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1645
                    ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1646
        selectors := #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1647
                       classFileOutBinary
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1648
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1649
                       classInspect
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1650
                       classInstancesInspect
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1651
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1652
                       classPrimitiveDefinitions
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1653
                       classPrimitiveVariables
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1654
                       classPrimitiveFunctions
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1655
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1656
                       classModifyContainer
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1657
                       classRemoveContainer
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1658
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1659
                       classRevisionInfo
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1660
                       classCompareWithNewestInRepository
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1661
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1662
                       classCheckin
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1663
                       classLoadRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1664
                      ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1665
    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1666
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1667
    specialMenu := PopUpMenu
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1668
                        labels:(resources array:labels)
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1669
                        selectors:selectors
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1670
                        receiver:self.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1671
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1672
    currentClass notNil ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1673
        currentClass sourceCodeManager isNil ifTrue:[
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1674
            specialMenu disableAll:#(classModifyContainer classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1675
                                     classRevisionInfo 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1676
                                     classLoadRevision classCheckin 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1677
                                     classCompareWithNewestInRepository).
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1678
        ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1679
        currentClass isPrivate ifTrue:[
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1680
            specialMenu disableAll:#(
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1681
                                     classFileOutBinary
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1682
                                     classModifyContainer 
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1683
                                     classRemoveContainer
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1684
                                     classRevisionInfo 
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1685
                                     classLoadRevision classCheckin
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1686
                                     classCompareWithNewestInRepository
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1687
                                     classPrimitiveDefinitions
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1688
                                     classPrimitiveVariables
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1689
                                     classPrimitiveFunctions).
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1690
        ]
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1691
    ] ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1692
        SourceCodeManager isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1693
            specialMenu disableAll:#(classLoadNewRevision)
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1694
        ]
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1695
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1696
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1697
    device ctrlDown ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1698
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1699
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1700
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1701
    currentClass isNil ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1702
        labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1703
                       'new class'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1704
                     ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1705
        selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1706
                       classNewClass
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1707
                     ).
246
9f1583be2b81 ask class for its SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  1708
    ] ifFalse:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1709
        currentClass isLoaded ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1710
            labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1711
                           'definition'
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1712
                           'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1713
                           '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1714
                           'new class'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1715
                           '-'
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1716
                           'load'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1717
                         ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1718
            selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1719
                           classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1720
                           classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1721
                           nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1722
                           classNewClass
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1723
                           nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1724
                           classLoad
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1725
                         ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1726
        ] ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1727
            fullProtocol ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1728
                labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1729
                               'hierarchy' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1730
                               'definition' 
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1731
                               'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1732
                               'comment' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1733
                               'class instvars' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1734
                             ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1735
                selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1736
                               classHierarchy
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1737
                               classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1738
                               classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1739
                               classComment
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1740
                               classClassInstVars
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1741
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1742
            ] ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1743
                labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1744
                               'fileOut'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1745
                               'printOut'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1746
                               'printOut protocol'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1747
                             " 'printOut full protocol' "
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1748
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1749
                               'SPAWN_CLASS' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1750
                               'spawn full protocol' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1751
                               'spawn hierarchy' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1752
                               'spawn subclasses' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1753
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1754
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1755
                selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1756
                               classFileOut
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1757
                               classPrintOut
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1758
                               classPrintOutProtocol
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1759
                            "  classPrintOutFullProtocol "
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1760
                               nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1761
                               classSpawn
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1762
                               classSpawnFullProtocol
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1763
                               classSpawnHierarchy
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1764
                               classSpawnSubclasses
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1765
                               nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1766
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1767
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1768
                fullClass ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1769
                    labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1770
                               'hierarchy' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1771
                               'definition' 
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1772
                               'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1773
                               'comment' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1774
                               'class instvars' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1775
               "/              'protocols' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1776
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1777
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1778
                    selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1779
                               classHierarchy
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1780
                               classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1781
                               classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1782
                               classComment
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1783
                               classClassInstVars
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1784
               "/              classProtocols 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1785
                               nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1786
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1787
                ].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1788
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1789
                labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1790
                               'class refs'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1791
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1792
                               'new class'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1793
                               'new subclass'
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1794
                              ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1795
                selectors := selectors , #(
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1796
                               classRefs
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1797
                               nil
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1798
                               classNewClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1799
                               classNewSubclass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1800
                              ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1801
758
613257a962eb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
  1802
                PrivateMetaclass notNil ifTrue:[
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1803
                    labels := labels , #(
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1804
                                   'new private class'
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1805
                                  ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1806
                    selectors := selectors , #(
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1807
                                   classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1808
                                  ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1809
                ].
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1810
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1811
                labels := labels , #(
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1812
                               'rename ...'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1813
                               'remove'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1814
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1815
                selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1816
                               classRename
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1817
                               classRemove
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1818
                              ).
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1819
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1820
                currentClass wasAutoloaded ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1821
                    labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1822
                               'unload'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1823
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1824
                    selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1825
                               classUnload
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1826
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1827
                ]
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1828
            ]
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1829
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1830
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1831
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1832
    shorties := (Array new:labels size) , #(nil #'Ctrl').
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1833
    (selectors includes:#classNewClass) ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1834
        shorties at:(selectors indexOf:#classNewClass) put:#Cmdn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1835
    ].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1836
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1837
    labels := labels , #(
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
  1838
                          '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1839
                          'others'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1840
                        ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1841
    selectors := selectors , #(
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1842
                          nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1843
                          otherMenu
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1844
                        ).
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1845
    m := PopUpMenu 
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1846
            labels:(resources array:labels)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1847
            selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1848
            accelerators:shorties.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1849
768
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  1850
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  1851
    (currentClass notNil
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  1852
    and:[currentClass isPrivate]) ifTrue:[
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1853
        m disableAll:#(
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1854
                       classFileOut
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1855
                      )
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1856
    ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1857
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1858
    m subMenuAt:#otherMenu put:specialMenu.
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1859
    ^ m
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1860
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1861
    "Modified: 27.10.1996 / 14:12:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1862
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1863
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1864
classNewClass
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1865
    "create a class-definition prototype in codeview"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1866
105
claus
parents: 98
diff changeset
  1867
    |nm cls cat|
claus
parents: 98
diff changeset
  1868
claus
parents: 98
diff changeset
  1869
    nm := 'Object'.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1870
    currentClass notNil ifTrue:[
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1871
        (cls := currentClass superclass) notNil ifTrue:[
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1872
            nm := cls name 
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1873
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1874
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1875
    cat := currentClassCategory.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1876
    cat isNil ifTrue:[
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1877
        cat := '* no category *'
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1878
    ].
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1879
    self classClassDefinitionTemplateFor:nm in:cat private:false.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1880
    aspect := nil.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1881
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1882
    "Modified: 11.10.1996 / 16:01:32 / cg"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1883
!
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1884
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1885
classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1886
    "create a class-definition prototype in codeview"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1887
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1888
    |nm cls cat|
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1889
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1890
    nm := 'Object'.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1891
    self classClassDefinitionTemplateFor:nm in:nil private:true.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1892
    aspect := nil.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1893
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1894
    "Created: 11.10.1996 / 16:01:20 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1895
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1896
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1897
classNewSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1898
    "create a subclass-definition prototype in codeview"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1899
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1900
    self doClassMenu:[:currentClass |
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1901
        self classClassDefinitionTemplateFor:(currentClass name) 
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1902
                                          in:(currentClass category)
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1903
                                          private:false.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1904
        aspect := nil
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1905
    ]
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1906
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1907
    "Modified: 11.10.1996 / 16:01:42 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1908
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1909
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1910
classPrimitiveDefinitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1911
    "show the classes primitiveDefinition in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1912
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1913
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1914
    self classShowFrom:#primitiveDefinitionsString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1915
                   set:#primitiveDefinitions: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1916
                aspect:#primitiveDefinitions 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1917
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1918
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1919
/*
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1920
 * includes, defines, structure definitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1921
 * and typedefs come here.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1922
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1923
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1924
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1925
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1926
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1927
classPrimitiveFunctions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1928
    "show the classes primitiveFunctions in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1929
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1930
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1931
    self classShowFrom:#primitiveFunctionsString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1932
                   set:#primitiveFunctions: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1933
                aspect:#primitiveFunctions 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1934
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1935
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1936
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1937
 * any local C (helper) functions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1938
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1939
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1940
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1941
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1942
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1943
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1944
classPrimitiveVariables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1945
    "show the classes primitiveVariables in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1946
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1947
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1948
    self classShowFrom:#primitiveVariablesString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1949
                   set:#primitiveVariables: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1950
                aspect:#primitiveVariables 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1951
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1952
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1953
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1954
 * any local C variables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1955
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1956
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1957
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1958
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1959
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1960
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1961
classPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1962
    self classPrintOutWith:#printOutOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1963
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1964
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1965
classPrintOutFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1966
    self classPrintOutWith:#printOutFullProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1967
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1968
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1969
classPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1970
    self classPrintOutWith:#printOutProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1971
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1972
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1973
classPrintOutWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1974
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1975
        |printStream|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1976
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1977
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1978
        currentClass perform:aSelector with:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1979
        printStream close
152
d03618e99b3c show warnbox when autoload fails (instead of running into the debugger)
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
  1980
    ]
105
claus
parents: 98
diff changeset
  1981
!
claus
parents: 98
diff changeset
  1982
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1983
classProtocols
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1984
     ^ self
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1985
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1986
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1987
classRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1988
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1989
        self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1990
            SystemBrowser browseReferendsOf:currentClass name asSymbol
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1991
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1992
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1993
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1994
    "Created: 23.11.1995 / 14:11:43 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1995
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1996
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1997
classRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1998
    "user requested remove of current class and all subclasses -
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1999
     count subclasses and let user confirm removal."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2000
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2001
    |count t box|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2002
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2003
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2004
        count := currentClass allSubclasses size.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2005
        t := 'remove %1'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2006
        count ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2007
           t := t , '\(with %2 subclass'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2008
           count ~~ 1 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2009
                t := t , 'es'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2010
           ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2011
           t := (t , ')') 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2012
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2013
        t := t , ' ?'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2014
        t := (resources string:t with:currentClass name with:count) withCRs.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2015
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2016
        box := YesNoBox 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2017
                   title:t
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2018
                   yesText:(resources at:'remove')
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2019
                   noText:(resources at:'abort').
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2020
        box confirm ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2021
            "after querying user - do really remove current class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2022
             and all subclasses
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2023
            "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2024
            self doClassMenu:[:currentClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2025
                |didRemove|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2026
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2027
                didRemove := false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2028
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2029
                "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2030
                 query ?
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2031
                "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2032
                currentClass allSubclassesDo:[:aSubClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2033
                    (CheckForInstancesWhenRemovingClasses not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2034
                    or:[aSubClass hasInstances not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2035
                    or:[self confirm:(aSubClass name , ' has instances - remove anyway ?')]])
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2036
                        ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2037
                            Smalltalk removeClass:aSubClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2038
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2039
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2040
                (CheckForInstancesWhenRemovingClasses not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2041
                or:[currentClass hasInstances not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2042
                or:[self confirm:(currentClass name , ' has instances - remove anyway ?')]])
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2043
                    ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2044
                        didRemove := true.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2045
                        Smalltalk removeClass:currentClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2046
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2047
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2048
                self switchToClass:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2049
                Smalltalk changed.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2050
                self updateClassList.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2051
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2052
                "if it was the last in its category, update class category list"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2053
"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2054
                classListView numberOfLines == 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2055
                    self updateClassCategoryListWithScroll:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2056
                ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2057
"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2058
                didRemove ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2059
                    methodCategoryListView notNil ifTrue:[methodCategoryListView contents:nil].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2060
                    methodListView notNil ifTrue:[methodListView contents:nil].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2061
                    codeView contents:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2062
                    codeView modified:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2063
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2064
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2065
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2066
    ]
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2067
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2068
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2069
classRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2070
    "launch an enterBox for new name and query user"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2071
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2072
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2073
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2074
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2075
    box := self enterBoxTitle:(resources string:'rename %1 to:' with:currentClass name) okText:'rename'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2076
    box initialText:(currentClass name).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2077
    box action:[:aString | self renameCurrentClassTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2078
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2079
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2080
107
claus
parents: 106
diff changeset
  2081
classShowFrom:getSelector set:setSelector aspect:aspectSymbol default:default
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2082
    "common helper for comment, primitive-stuff etc.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2083
     show the string returned from the classes getSelector-method,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2084
     Set acceptaction to change it via setSelector."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2085
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2086
    self doClassMenu:[:currentClass |
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2087
        |text|
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2088
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2089
        text := currentClass perform:getSelector.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2090
        text isNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2091
            text := default
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2092
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2093
        codeView contents:text.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2094
        codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2095
        codeView acceptAction:[:theCode |
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2096
            Object abortSignal catch:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2097
                lockUpdates := true.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2098
                currentClass perform:setSelector with:theCode asString.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2099
                codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2100
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2101
            lockUpdates := false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2102
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2103
        codeView explainAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2104
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2105
        methodListView notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2106
            methodListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2107
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2108
        aspect := aspectSymbol.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2109
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2110
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2111
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2112
    "Modified: 25.5.1996 / 13:02:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2113
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2114
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2115
classSpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2116
    "create a new SystemBrowser browsing current class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2117
     or if there is a selection, spawn a browser on the selected class
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2118
     even a class/selector pair can be specified."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2119
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2120
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2121
        |browser|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2122
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2123
        cls isMeta ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2124
            Smalltalk allBehaviorsDo:[:aClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2125
                aClass class == cls ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2126
                    browser := SystemBrowser browseClass:aClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2127
                    browser instanceProtocol:false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2128
                    sel notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2129
                        browser switchToMethodNamed:sel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2130
                    ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2131
                    ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2132
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2133
            ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2134
            self warn:'oops, no class for this metaclass'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2135
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2136
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2137
        browser := SystemBrowser browseClass:cls. 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2138
        cls hasMethods ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2139
            browser instanceProtocol:false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2140
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2141
        sel notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2142
            browser switchToMethodNamed:sel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2143
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2144
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2145
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2146
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2147
     select 'Smalltalk allClassesDo:' and use spawn from the class menu
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2148
     select 'Smalltalk'               and use spawn from the class menu
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2149
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2150
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2151
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2152
classSpawnFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2153
    "create a new browser, browsing current classes full protocol"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2154
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2155
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2156
        SystemBrowser browseFullClassProtocol:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2157
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2158
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2159
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2160
classSpawnHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2161
    "create a new HierarchyBrowser browsing current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2162
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2163
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2164
        SystemBrowser browseClassHierarchy:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2165
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2166
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2167
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2168
classSpawnSubclasses
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2169
    "create a new browser browsing current class's subclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2170
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2171
    self doClassMenuWithSelection:[:cls :sel |
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2172
        |subs|
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2173
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2174
        subs := OrderedCollection new.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2175
        self classHierarchyOf:cls do:[:aClass :lvl |
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2176
            subs add:(String new:lvl*2) , aClass name
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2177
        ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2178
"/        subs := cls allSubclasses.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2179
        (subs notNil and:[subs size ~~ 0]) ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2180
            SystemBrowser browseClasses:subs 
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2181
                                  title:('subclasses of ' , cls name)
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2182
                                   sort:false
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2183
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2184
    ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2185
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2186
    "Modified: 28.5.1996 / 13:54:53 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2187
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2188
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2189
classUnload
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2190
    "unload an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2191
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2192
    |nm|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2193
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2194
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2195
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2196
    currentClass unload.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2197
    self switchToClassNamed:nm
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2198
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2199
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2200
classUses
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2201
    "a powerful tool, when trying to learn more about where
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2202
     a class is used. This one searches all uses of a class,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2203
     and shows a list of uses - try it and like it"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2204
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2205
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2206
        self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2207
            SystemBrowser browseUsesOf:currentClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2208
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2209
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2210
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2211
    "Created: 23.11.1995 / 14:11:47 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2212
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2213
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2214
doClassMenuWithSelection:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2215
    "a helper - if there is a selection, which represents a classes name,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2216
     evaluate aBlock, passing that class and optional selector as arguments.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2217
     Otherwise, check if a class is selected and evaluate aBlock with the
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2218
     current class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2219
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2220
    |string words clsName cls sel isMeta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2221
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2222
    string := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2223
    string notNil ifTrue:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2224
        self extractClassAndSelectorFromSelectionInto:[:c :s :m |
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2225
            clsName := c.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2226
            sel := s.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2227
            isMeta := m.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2228
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2229
        clsName isNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2230
            string := string asString withoutSeparators.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2231
            words := string asCollectionOfWords.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2232
            words notNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2233
                clsName := words first.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2234
                (clsName endsWith:' class') ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2235
                    isMeta := true.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2236
                    clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2237
                ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2238
                    isMeta := false
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2239
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2240
                sel := Parser selectorInExpression:string.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2241
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2242
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2243
        clsName notNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2244
            (cls := Smalltalk classNamed:clsName) notNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2245
                isMeta ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2246
                    cls := cls class
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2247
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2248
                self withWaitCursorDo:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2249
                    aBlock value:cls value:sel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2250
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2251
                ^ self
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2252
            ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2253
                self warn:'no class named: %1 - spawning current' with:clsName
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2254
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2255
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2256
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2257
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2258
    classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  2259
        sel := classMethodListView selectionValue string.
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2260
        sel notNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2261
            sel := self selectorFromClassMethodString:sel
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2262
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2263
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2264
    self doClassMenu:[:currentClass | aBlock value:currentClass value:sel]
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2265
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2266
    "Modified: 17.6.1996 / 16:51:49 / stefan"
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  2267
    "Modified: 22.10.1996 / 17:02:11 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2268
! !
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2269
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2270
!BrowserView methodsFor:'class list source administration'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2271
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2272
classCheckin
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2273
    "check a class into the source repository"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2274
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2275
    currentClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2276
        self warn:'cannot checkin unloaded classes.'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2277
        ^ self.
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2278
    ].
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2279
    self doClassMenu:[:currentClass |
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2280
        self classCheckin:currentClass withLog:nil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2281
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2282
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2283
    "Created: 23.11.1995 / 11:41:38 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2284
    "Modified: 15.4.1996 / 17:07:07 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2285
!
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2286
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2287
classCheckin:aClass withLog:aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2288
    "check a class into the source repository"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2289
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2290
    |logMessage info mgr|
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2291
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2292
    aClass isLoaded ifFalse:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2293
        self warn:'cannot checkin unloaded classes.'.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2294
        ^ self.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2295
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2296
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2297
    aLogMessage isNil ifTrue:[
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  2298
        logMessage := self getLogMessageFor:aClass name.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2299
        logMessage isNil ifTrue:[^ self].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2300
    ] ifFalse:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2301
        logMessage := aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2302
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2303
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2304
    mgr := (aClass sourceCodeManager).
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2305
    info := mgr sourceInfoOfClass:aClass.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2306
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2307
    (info isNil 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2308
    or:[(info at:#fileName ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2309
    or:[(info at:#module ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2310
    or:[(info at:#directory ifAbsent:nil) isNil]]]) ifTrue:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2311
        (self classCreateSourceContainerFor:aClass) ifFalse:[^ self]. 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2312
        ^ self.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2313
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2314
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2315
    lastSourceLogMessage := logMessage.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2316
    self busyLabel:'checking in %1' with:aClass name.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2317
    Processor activeProcess withLowerPriorityDo:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2318
        (mgr checkinClass:aClass logMessage:logMessage) ifFalse:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2319
            self warn:'checkin failed'.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2320
        ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2321
        aspect == #revisionInfo ifTrue:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2322
            self classListUpdate
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2323
        ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2324
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2325
    self normalLabel.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2326
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2327
    "Modified: 15.4.1996 / 17:03:19 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2328
    "Created: 15.4.1996 / 17:06:39 / cg"
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  2329
    "Modified: 15.6.1996 / 00:22:49 / stefan"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2330
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2331
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2332
classCompareWithNewestInRepository
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2333
    "open a diff-textView comparing the current (in-image) version
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2334
     with the most recent version found in the repository."
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2335
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2336
    currentClass isLoaded ifFalse:[
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2337
        self warn:'cannot compare unloaded classes.'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2338
        ^ self.
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2339
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2340
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2341
    self doClassMenu:[:currentClass |
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2342
        |aStream comparedSource currentSource v rev revString thisRevString mgr
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2343
         nm msg|
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2344
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2345
        nm := currentClass name.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2346
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2347
        rev := currentClass binaryRevision.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2348
        mgr := currentClass sourceCodeManager.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2349
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2350
        msg := resources string:'compare to revision: (empty for newest)'.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2351
        rev notNil ifTrue:[
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2352
            msg := msg , '\\(%1 is based upon rev %2)'
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2353
        ].
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2354
        rev := Dialog request:(resources string:msg with:nm with:rev) withCRs
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2355
                     onCancel:nil.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2356
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2357
        rev notNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2358
            rev withoutSpaces isEmpty ifTrue:[
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2359
                msg := 'extracting newest %1'.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2360
                aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2361
                revString := 'newest'
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2362
            ] ifFalse:[
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2363
                msg := 'extracting previous %1'.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2364
                aStream := mgr getSourceStreamFor:currentClass revision:rev.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2365
                revString := rev
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2366
            ].
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2367
            self busyLabel:msg with:nm.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2368
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2369
            aStream isNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2370
                self warn:'could not extract source from repository'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2371
                ^ self
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2372
            ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2373
            comparedSource := aStream contents asString.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2374
            aStream close.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2375
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2376
            self busyLabel:'generating current source ...' with:nil.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2377
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2378
            aStream := '' writeStream.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2379
            Method flushSourceStreamCache.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2380
            currentClass fileOutOn:aStream withTimeStamp:false.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2381
            currentSource := aStream contents asString.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2382
            aStream close.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2383
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2384
            self busyLabel:'comparing  ...' with:nil.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2385
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2386
            comparedSource = currentSource ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2387
                self information:'versions are identical'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2388
            ] ifFalse:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2389
                thisRevString := currentClass revision.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2390
                thisRevString isNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2391
                    thisRevString := 'no revision'
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2392
                ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2393
                v := DiffTextView 
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2394
                    openOn:currentSource label:'current (' , thisRevString , ')'
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2395
                    and:comparedSource label:'repository (' , revString , ')'.      
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2396
                v label:'comparing ' , nm.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2397
            ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2398
            self normalLabel.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2399
        ]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2400
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2401
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2402
    "Created: 14.11.1995 / 16:43:15 / cg"
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2403
    "Modified: 12.10.1996 / 17:22:35 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2404
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2405
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2406
classCreateSourceContainerFor:aClass
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2407
    "let user specify the source-repository values for aClass"
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2408
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2409
    ^ self 
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2410
        classDefineSourceContainerFor:aClass 
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2411
        title:(resources string:'Repository information for %1' with:aClass name)
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2412
        text:(resources string:'CREATE_REPOSITORY' with:aClass name)
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2413
        createDirectories:true
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2414
        createContainer:true.
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2415
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2416
    "Modified: 15.4.1996 / 17:07:57 / cg"
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2417
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2418
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2419
classDefineSourceContainerFor:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2420
    "let user specify the source-repository values for aClass"
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2421
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2422
    |box className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2423
     moduleHolder packageHolder fileNameHolder
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2424
     oldModule oldPackage oldFileName
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2425
     module package fileName 
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2426
     y component info project nm mgr creatingNew|
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2427
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2428
    aClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2429
        self warn:'please load the class first'.
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2430
        ^ false.
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2431
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2432
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2433
    className := aClass name.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2434
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2435
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2436
    "/ defaults, if nothing at all is known
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2437
    "/
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2438
    (module := lastModule) isNil ifTrue:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2439
        module := (OperatingSystem getLoginName).
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2440
    ].
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2441
    (package := lastPackage) isNil ifTrue:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2442
        package := 'private'.
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2443
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2444
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2445
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2446
    "/ try to extract some useful defaults from the current project
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2447
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2448
    (Project notNil and:[(project := Project current) notNil]) ifTrue:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2449
        package isNil ifTrue:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2450
            (nm := project repositoryDirectory) isNil ifTrue:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2451
                nm := project name
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2452
            ].
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2453
            package := nm.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2454
        ].
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2455
        module isNil ifTrue:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2456
            (nm := project repositoryModule) notNil ifTrue:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2457
                module := nm
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2458
            ]
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2459
        ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2460
    ].
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2461
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2462
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2463
    "/ ask the sourceCodeManager if it knows anything about that class
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2464
    "/ if so, take that as a default.
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2465
    "/
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
  2466
    info := (mgr := aClass sourceCodeManager) sourceInfoOfClass:aClass.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2467
    info notNil ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2468
        (info includesKey:#module) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2469
            module := (info at:#module).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2470
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2471
        (info includesKey:#directory) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2472
            package := (info at:#directory).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2473
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2474
        fileName := mgr containerFromSourceInfo:info.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2475
"/        (info includesKey:#fileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2476
"/            fileName := (info at:#fileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2477
"/        ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2478
"/            (info includesKey:#expectedFileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2479
"/                fileName := (info at:#expectedFileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2480
"/            ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2481
"/                (info includesKey:#classFileNameBase) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2482
"/                    fileName := (info at:#classFileNameBase) , '.st'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2483
"/                ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2484
"/            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2485
"/        ]
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2486
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2487
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2488
    fileName isNil ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2489
        fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2490
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2491
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2492
    fileNameHolder := fileName asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2493
    moduleHolder := module asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2494
    packageHolder := package asValue.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2495
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2496
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2497
    "/ should check for conflicts (i.e. if such a container already exists) ...
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2498
    "/
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2499
    (mgr checkForExistingContainerInModule:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2500
                                   package:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2501
                                 container:fileName) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2502
        "/ for now - this needs more work.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2503
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2504
"/        self information:(resources 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2505
"/                            string:'%1 is already contained in the container:
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2506
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2507
"/    %2 / %3 / %4'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2508
"/                            with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2509
"/                            with:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2510
"/                            with:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2511
"/                            with:fileName).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2512
"/        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2513
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2514
        (Dialog confirm:(resources 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2515
                            string:'Notice: there already is a container for %1 in:
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2516
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2517
    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2518
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2519
To change it, press continue.'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2520
                            with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2521
                            with:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2522
                            with:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2523
                            with:fileName)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2524
                yesLabel:(resources string:'continue')
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2525
                noLabel:(resources string:'cancel'))
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2526
        ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2527
            ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2528
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2529
        oldModule := module.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2530
        oldPackage := package.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2531
        oldFileName := fileName
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2532
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2533
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2534
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2535
    "/ open a dialog for this
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2536
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2537
    box := DialogBox new.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2538
    box label:title.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2539
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2540
    component := box addTextLabel:boxText withCRs.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2541
    component adjust:#left; borderWidth:0.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2542
    box addVerticalSpace.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2543
    box addVerticalSpace.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2544
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2545
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2546
    component := box addTextLabel:(resources string:'Module:').
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2547
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2548
    box yPosition:y.
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2549
    component := box addInputFieldOn:moduleHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2550
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2551
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2552
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2553
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2554
    component := box addTextLabel:'Package:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2555
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2556
    box yPosition:y.
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2557
    component := box addInputFieldOn:packageHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2558
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2559
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2560
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2561
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2562
    component := box addTextLabel:'Filename:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2563
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2564
    box yPosition:y.
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2565
    component := box addInputFieldOn:fileNameHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2566
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2567
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2568
    box addVerticalSpace.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2569
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2570
    (mgr checkForExistingContainerInModule:module 
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2571
                                   package:package 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2572
                                 container:fileName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2573
        component := box addTextLabel:'Notice: class seems to have no container yet.'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2574
        component adjust:#left; borderWidth:0.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2575
        creatingNew := true.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2576
    ] ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2577
        creatingNew := false.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2578
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2579
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2580
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2581
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2582
    box addAbortButton; addOkButton.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2583
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2584
    box showAtPointer.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2585
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2586
    box accepted ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2587
        module := moduleHolder value withoutSpaces.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2588
        package := packageHolder value withoutSpaces.
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2589
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2590
        fileName := fileNameHolder value withoutSpaces.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2591
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2592
        (fileName endsWith:',v') ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2593
            fileName := fileName copyWithoutLast:2
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2594
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2595
        (fileName endsWith:'.st') ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2596
            fileName := fileName , '.st'
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2597
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2598
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2599
        info := aClass revisionInfo.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2600
        info notNil ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2601
            (info includesKey:#repositoryPathName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2602
                info := nil
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2603
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2604
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2605
        info isNil ifTrue:[
712
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2606
            creatingNew ifFalse:[
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2607
                (self confirm:(resources string:'The repository already contains a container named "%3" in "%1/%2" !!\\Checkin %4 anyway ? (DANGER - be careful)'
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2608
                         withArgs:(Array with:module with:package with:fileName with:className)) withCRs)
712
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2609
                    ifFalse:[
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2610
                        ^ false
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2611
                    ].
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2612
            ].
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2613
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2614
            (self confirm:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs)
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2615
                ifFalse:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2616
                    ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2617
                ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2618
            aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2619
                                               inModule:module 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2620
                                               package:package 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2621
                                               container:fileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2622
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2623
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2624
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2625
        "/ check for the module
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2626
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2627
        (mgr checkForExistingModule:module) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2628
            (createDirs or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2629
                self warn:(resources string:'a module named %1 does not exist in the source code management' with:module).
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2630
                ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2631
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2632
            (self confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs) ifFalse:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2633
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2634
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2635
            (mgr createModule:module) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2636
                self warn:(resources string:'cannot create new module: %1' with:module).
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2637
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2638
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2639
        ].
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2640
        lastModule := module.
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2641
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2642
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2643
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2644
        "/ check for the package
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2645
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2646
        (mgr checkForExistingModule:module package:package) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2647
            (createDirs or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2648
                self warn:(resources string:'a package named %1 does not exist module %2' with:module with:package).
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2649
                ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2650
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2651
            (self confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs) ifFalse:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2652
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2653
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2654
            (mgr createModule:module package:package) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2655
                self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module).
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2656
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2657
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2658
        ].
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2659
        lastPackage := package.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2660
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2661
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2662
        "/ check for the container itself
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2663
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2664
        (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2665
            creatingNew ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2666
                self warn:(resources string:'container for %1 already exists in %2/%3.' with:fileName with:module with:package) withCRs.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2667
            ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2668
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2669
"/            (oldModule notNil
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2670
"/            and:[(oldModule ~= module)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2671
"/                 or:[oldPackage ~= package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2672
"/                 or:[oldFileName ~= fileName]]])
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2673
"/            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2674
"/                self warn:(resources string:'no change').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2675
"/                ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2676
"/            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2677
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2678
            (self confirm:(resources string:'check %1 into the existing container
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2679
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2680
    %2 / %3 / %4  ?'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2681
                                with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2682
                                with:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2683
                                with:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2684
                                with:fileName) withCRs) 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2685
            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2686
                ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2687
            ].  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2688
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2689
            aClass updateVersionMethodFor:'changed container'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2690
            (mgr
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2691
                checkinClass:aClass 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2692
                fileName:fileName 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2693
                directory:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2694
                module:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2695
                logMessage:('changed source container from ' , oldFileName))
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2696
            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2697
                (self confirm:'no easy merge seems possible; force checkin (no merge) ?') ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2698
                    self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2699
                    ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2700
                ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2701
                (mgr
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2702
                    checkinClass:aClass 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2703
                    fileName:fileName 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2704
                    directory:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2705
                    module:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2706
                    logMessage:('changed source container from ' , oldFileName)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2707
                    force:true)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2708
                ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2709
                    self warn:(resources string:'failed to check into existing container.').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2710
                    self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2711
                    ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2712
                ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2713
            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2714
            self normalLabel.
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2715
            ^ true
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2716
        ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2717
            (createContainer or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2718
                (self confirm:(resources string:'no container exists for %1 in %2/%3\\create ?' 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2719
                                          with:fileName with:module with:package) withCRs) ifFalse:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2720
                    ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2721
                ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2722
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2723
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2724
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2725
        (mgr
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2726
                createContainerFor:aClass
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2727
                inModule:module
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2728
                package:package
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2729
                container:fileName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2730
            self warn:(resources string:'failed to create container.').
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  2731
            self normalLabel.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2732
            ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2733
        ].
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  2734
        self normalLabel.
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2735
        ^ true
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2736
    ].
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2737
    box destroy.
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2738
    ^ false
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  2739
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2740
    "Modified: 11.9.1996 / 18:36:18 / cg"
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2741
!
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2742
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2743
classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2744
    "let user specify a container and fileIn from there"
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2745
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2746
    |box
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2747
     moduleHolder packageHolder fileNameHolder
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2748
     module package fileName aStream
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2749
     y component mgr|
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2750
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2751
    mgr := SourceCodeManager.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2752
    mgr isNil ifTrue:[^ false].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2753
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2754
    fileNameHolder := '' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2755
    moduleHolder := (OperatingSystem getLoginName) asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2756
    packageHolder := 'private' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2757
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2758
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2759
    "/ open a dialog for the module/package/container
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2760
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2761
    box := DialogBox new.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2762
    box label:'container fileIn'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2763
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2764
    component := box addTextLabel:(resources string:'container to fileIn') withCRs.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2765
    component adjust:#left; borderWidth:0.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2766
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2767
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2768
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2769
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2770
    component := box addTextLabel:(resources string:'Module:').
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2771
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2772
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2773
    component := box addInputFieldOn:moduleHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2774
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2775
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2776
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2777
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2778
    component := box addTextLabel:'Package:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2779
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2780
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2781
    component := box addInputFieldOn:packageHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2782
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2783
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2784
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2785
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2786
    component := box addTextLabel:'Filename:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2787
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2788
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2789
    component := box addInputFieldOn:fileNameHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2790
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2791
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2792
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2793
    box addAbortButton; addOkButton.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2794
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2795
    box showAtPointer.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2796
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2797
    box destroy.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2798
    box accepted ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2799
        ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2800
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2801
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2802
    module := moduleHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2803
    package := packageHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2804
    fileName := fileNameHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2805
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2806
    (fileName endsWith:',v') ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2807
        fileName := fileName copyWithoutLast:2
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2808
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2809
    (fileName endsWith:'.st') ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2810
        fileName := fileName , '.st'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2811
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2812
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2813
    (mgr checkForExistingContainerInModule:module 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2814
                                   package:package 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2815
                                 container:fileName) ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2816
        self warn:'no such container'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2817
        ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2818
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2819
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2820
    aStream := mgr 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2821
            streamForClass:nil 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2822
            fileName:fileName 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2823
            revision:#newest
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2824
            directory:package
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2825
            module:module
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2826
            cache:false.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2827
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2828
    aStream isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2829
        self warn:'could not fileIn from repository'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2830
        ^ false.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2831
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2832
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2833
    self busyLabel:'loading from %1' with:(module , '/' , package , '/' , fileName).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2834
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2835
    Class withoutUpdatingChangesDo:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2836
        [
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2837
            aStream fileIn.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2838
        ] valueNowOrOnUnwindDo:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2839
            aStream close.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2840
            self normalLabel.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2841
            Smalltalk changed.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2842
        ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2843
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2844
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2845
    ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2846
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2847
    "Created: 13.9.1996 / 09:27:09 / cg"
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2848
    "Modified: 13.9.1996 / 09:34:25 / cg"
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2849
!
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2850
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2851
classLoadRevision
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2852
    "load a specific revision into the system - especially useful to
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2853
     upgrade a class to the newest revision"
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2854
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  2855
    currentClass isLoaded ifFalse:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2856
        self warn:'cannot load specific releases of autoloaded classes.'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2857
        ^ self.
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  2858
    ].
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  2859
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2860
    self doClassMenu:[:currentClass |
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2861
        |aStream comparedSource currentSource v rev revString what mgr keep className
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2862
         newClass prevCategory ok|
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2863
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2864
        rev := Dialog request:'load which revision: (empty for newest)' onCancel:nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2865
        rev notNil ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2866
            className := currentClass name.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2867
            (className includesString:'_rev_') ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2868
                self warn:'select the original class and try again.'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2869
                ^ self
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2870
            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2871
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2872
            mgr := currentClass sourceCodeManager.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2873
            ok := false.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2874
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2875
            rev withoutSpaces isEmpty ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2876
                what := className , '(newest)'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2877
                self busyLabel:'extracting %1' with:what.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2878
                aStream := mgr getMostRecentSourceStreamForClassNamed:className.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2879
                revString := 'newest'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2880
                keep := false.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2881
            ] ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2882
                what := className , '(' , rev , ')'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2883
                self busyLabel:'extracting %1' with:what.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2884
                aStream := mgr getSourceStreamFor:currentClass revision:rev.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2885
                revString := rev.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2886
                keep := true.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2887
            ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2888
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2889
            aStream isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2890
                self warn:'cannot find classes source.'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2891
                ^ self.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2892
            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2893
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2894
            self busyLabel:'loading %1' with:what .
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2895
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2896
            [
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2897
                Class withoutUpdatingChangesDo:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2898
                    "/ rename the current class - for backup
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2899
                    prevCategory := currentClass category.    
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2900
                    currentClass category:'* obsolete *'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2901
                    Smalltalk renameClass:currentClass to:className , '_saved'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2902
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2903
                    aStream fileIn.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2904
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2905
                    "/ did that work ?
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2906
                    newClass := Smalltalk at:className ifAbsent:nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2907
                    newClass isNil ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2908
                        self warn:'fileIn failed - undoing changes ...'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2909
                        Smalltalk renameClass:currentClass to:className.                        
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2910
                        currentClass category:prevCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2911
                    ] ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2912
                        "/
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2913
                        "/ if we loaded an old version, rename that one and fix the name of the
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2914
                        "/ current class
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2915
                        "/
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2916
                        keep ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2917
                            Smalltalk renameClass:newClass to:(className , '_rev_' , rev).
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2918
                            newClass category:'* old versions *'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2919
                            Smalltalk renameClass:currentClass to:className.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2920
                            currentClass category:prevCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2921
                        ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2922
                        ok := true.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2923
                    ]
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2924
                ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2925
            ] valueNowOrOnUnwindDo:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2926
                aStream close.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2927
                self normalLabel.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2928
                Smalltalk changed.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2929
            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2930
            ok ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2931
                self switchToClassNamed:newClass name.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2932
            ]    
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2933
        ]
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2934
    ]
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2935
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2936
    "Created: 14.11.1995 / 16:43:15 / cg"
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2937
    "Modified: 12.10.1996 / 17:22:40 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2938
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2939
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2940
classModifyContainer
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2941
    "check a class into the source repository"
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2942
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2943
    currentClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2944
        self warn:'dont know anything about unloaded classes.'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2945
        ^ self.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2946
    ].
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2947
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2948
    self doClassMenu:[:currentClass |
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2949
        self 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2950
            classDefineSourceContainerFor:currentClass 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2951
            title:(resources string:'Repository information for %1' with:currentClass name)
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2952
            text:'defining/changing the source code container'
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2953
            createDirectories:true createContainer:true. 
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2954
    ]
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2955
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2956
    "Created: 23.11.1995 / 11:41:38 / cg"
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2957
    "Modified: 6.2.1996 / 16:58:58 / cg"
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2958
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2959
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2960
classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2961
    "remove a container from the source repository"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2962
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2963
    currentClass isLoaded ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2964
        self warn:'please load the class first'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2965
        ^ self.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2966
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2967
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2968
    self doClassMenu:[:currentClass |
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2969
        self 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2970
            classRemoveSourceContainerFor:currentClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2971
    ]
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2972
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2973
    "Created: 23.11.1995 / 11:41:38 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2974
    "Modified: 11.9.1996 / 12:55:42 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2975
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2976
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2977
classRemoveSourceContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2978
    "show container & let user confirm twice."
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2979
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2980
    |module package fileName info mgr|
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2981
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2982
    aClass isLoaded ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2983
        self warn:'please load the class first'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2984
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2985
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2986
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2987
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2988
    "/ ask the sourceCodeManager if it knows anything about that class
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2989
    "/ if so, take that as a default.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2990
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2991
    mgr := aClass sourceCodeManager.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2992
    mgr isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2993
        self warn:'No sourceCodeManagement.'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2994
        ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2995
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2996
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2997
    info := mgr sourceInfoOfClass:aClass.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2998
    info notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2999
        (info includesKey:#module) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3000
            module := (info at:#module).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3001
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3002
        (info includesKey:#directory) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3003
            package := (info at:#directory).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3004
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3005
        fileName := mgr containerFromSourceInfo:info.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3006
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3007
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3008
    module isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3009
        self warn:'classes module is unknown.\\It seems to not have a container.' withCRs.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3010
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3011
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3012
    package isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3013
        self warn:'classes package is unknown.\\It seems to not have a container.' withCRs.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3014
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3015
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3016
    fileName isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3017
        self warn:'classes container fileName is unknown.\\It seems to not have a container.' withCRs.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3018
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3019
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3020
        
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3021
    (mgr checkForExistingContainerInModule:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3022
                                   package:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3023
                                 container:fileName) ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3024
        self warn:'Class has no source container.' withCRs.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3025
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3026
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3027
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3028
    (Dialog
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3029
        choose:(resources 
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3030
                    string:'Please confirm removal of the container for %1:
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3031
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3032
container:    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3033
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3034
Really remove ?' 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3035
                    with:aClass name 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3036
                    with:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3037
                    with:package 
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3038
                    with:fileName) 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3039
        labels:(Array 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3040
                    with:(resources string:'no') 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3041
                    with:(resources string:'remove'))
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3042
        values:#(false true)
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3043
        default:false) ifFalse:[
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3044
        ^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3045
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3046
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3047
    (mgr removeContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3048
                   inModule:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3049
                    package:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3050
                  container:fileName) ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3051
        self warn:(resources string:'failed to remove container.').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3052
        self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3053
        ^ true.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3054
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3055
    ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3056
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3057
    "Created: 11.9.1996 / 13:06:14 / cg"
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3058
    "Modified: 13.9.1996 / 19:06:06 / cg"
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3059
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3060
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3061
classRevisionInfo
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3062
    "show current classes revision info in codeView"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3063
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3064
    self doClassMenu:[:currentClass |
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3065
        |aStream info info2 s rv mgr|
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3066
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3067
        aStream := WriteStream on:(String new:200).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3068
        currentClass notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3069
            Processor activeProcess withLowerPriorityDo:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3070
                self busyLabel:'extracting revision info' with:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3071
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3072
                info := currentClass revisionInfo.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3073
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3074
                rv := currentClass binaryRevision.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3075
                rv notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3076
                    aStream nextPutAll:'**** Loaded classes binary information ****'; cr; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3077
                    aStream nextPutAll:'  Binary based upon : ' , rv; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3078
                    aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3079
                ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3080
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3081
                info notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3082
                    (info includesKey:#revision) ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3083
                        aStream nextPutAll:'WARNING:'; cr; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3084
                        aStream nextPutAll:'  The class seems not to be loaded from the repository.'; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3085
                        aStream nextPutAll:'  Check carefully before checking anything in.'; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3086
                        aStream nextPutAll:'  (i.e. compare with repository for renamed class(es), same-name but unrelated etc.)'; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3087
                        aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3088
                    ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3089
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3090
                    aStream nextPutAll:'**** Classes source information ****'; cr; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3091
                    s := info at:#repositoryPath ifAbsent:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3092
                    s notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3093
                        aStream nextPut:'  Source repository : ' , s; cr
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3094
                    ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3095
                    aStream nextPutAll:'  Filename ........ : ' , (info at:#fileName ifAbsent:'?'); cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3096
                    aStream nextPutAll:'  Revision ........ : ' , (info at:#revision ifAbsent:'?'); cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3097
                    aStream nextPutAll:'  Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?'); cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3098
                    aStream nextPutAll:'  Checkin user .... : ' , (info at:#user ifAbsent:'?'); cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3099
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3100
                    (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3101
                        aStream nextPutAll:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?'); cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3102
                        aStream nextPutAll:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?'); cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3103
                    ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3104
                    aStream nextPutAll:'  Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?'); cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3105
                    aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3106
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3107
                    (mgr := currentClass sourceCodeManager) notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3108
                        aStream nextPutAll:'**** Repository information ****'; cr; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3109
                        mgr writeRevisionLogOf:currentClass to:aStream.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3110
                    ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3111
                ] ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3112
                    aStream nextPutAll:'No revision info found'; cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3113
                    currentClass isLoaded ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3114
                        aStream cr; nextPutAll:'This is an autoloaded class - you may see more after its loaded.'
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3115
                    ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3116
                ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3117
            ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3118
        ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3119
        codeView contents:(aStream contents).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3120
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3121
        codeView modified:false.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3122
        codeView acceptAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3123
        codeView explainAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3124
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3125
            methodListView setSelection:nil
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3126
        ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3127
        aspect := #revisionInfo. 
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3128
        self normalLabel
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3129
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3130
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3131
    "Created: 14.11.1995 / 16:43:15 / cg"
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3132
    "Modified: 25.5.1996 / 13:02:38 / cg"
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3133
!
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3134
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3135
getLogMessageFor:aString
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3136
    "get a log message for when checking in a class.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3137
     Return the message or nil if aborted."
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3138
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3139
    |dialog textView|
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3140
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3141
    dialog := Dialog new.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3142
    (dialog addTextLabel:'enter log message for: ', aString) adjust:#left.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3143
    textView := dialog addTextBoxOn:nil 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3144
                        class:EditTextView
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3145
                        withNumberOfLines:10 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3146
                        hScrollable:true 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3147
                        vScrollable:true.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3148
    dialog width:(textView preferredExtentForLines:10 cols:70) x.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3149
    textView contents:lastSourceLogMessage.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3150
    dialog addAbortButton; addOkButton.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3151
    dialog open.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3152
    dialog accepted ifTrue:[
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3153
        ^ textView contents
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3154
    ].
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3155
    ^ nil
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3156
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3157
    "Created: 15.6.1996 / 00:20:46 / stefan"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3158
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3159
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3160
!BrowserView methodsFor:'class stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3161
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3162
checkClassSelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3163
    "warn and return false, if no class is selected"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3164
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3165
    currentClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3166
        self warn:'select a class first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3167
        ^ false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3168
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3169
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3170
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3171
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3172
classClassDefinitionTemplateFor:name in:cat private:isPrivate
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3173
    "common helper for newClass and newSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3174
     - show a template to define class name in category cat.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3175
     Also, set acceptaction to install the class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3176
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3177
    currentMethodCategory := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3178
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3179
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3180
    classListView setSelection:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3181
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3182
    fullClass ifFalse:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3183
        methodCategoryListView contents:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3184
        methodListView contents:nil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3185
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3186
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3187
    codeView contents:(self classTemplateFor:name in:cat private:isPrivate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3188
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3189
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3190
    codeView acceptAction:[:theCode |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3191
        codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3192
        Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3193
            |cls|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3194
746
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3195
            Object errorSignal handle:[:ex |
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3196
                codeView error:ex errorString
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3197
                         position:1 to:nil from:nil.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3198
            ] do:[
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3199
                cls := (Compiler evaluate:theCode asString notifying:codeView compile:false).
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3200
                cls isBehavior ifTrue:[
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3201
                    codeView modified:false.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3202
                    self classCategoryUpdate.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3203
                    self updateClassListWithScroll:false.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3204
                    self switchToClassNamed:(cls name).
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3205
                ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3206
            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3207
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3208
        codeView cursor:(Cursor normal).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3209
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3210
    codeView explainAction:nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3211
    self switchToClass:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3212
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3213
    "Created: 11.10.1996 / 16:01:54 / cg"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3214
    "Modified: 11.10.1996 / 16:11:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3215
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3216
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3217
classListUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3218
    RememberAspect ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3219
        aspect == #hierarchy ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3220
            ^ self classHierarchy
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3221
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3222
        aspect == #classInstVars ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3223
            ^ self classClassInstVars
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3224
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3225
        aspect == #comment ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3226
            ^ self classComment
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3227
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3228
        aspect == #primitiveDefinitions ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3229
            ^ self classPrimitiveDefinitions
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3230
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3231
        aspect == #primitiveFunctions ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3232
            ^ self classPrimitiveFunctions
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3233
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3234
        aspect == #primitiveVariables ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3235
            ^ self classPrimitiveVariables
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3236
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3237
        aspect == #revisionInfo ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3238
            ^ self classRevisionInfo
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3239
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3240
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3241
    self classDefinition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3242
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3243
    "Created: 23.11.1995 / 11:28:58 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3244
    "Modified: 23.11.1995 / 11:36:08 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3245
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3246
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3247
classSelection:lineNr
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3248
    "user clicked on a class line - show method categories"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3249
195
3b12a5a05218 allow comparing current with a specific repository version
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
  3250
    |cls oldSelector|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3251
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3252
    (currentClassHierarchy notNil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3253
     and:[fullProtocol]) ifTrue:[
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3254
        oldSelector := currentSelector.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3255
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3256
        self updateMethodCategoryListWithScroll:false.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3257
        self updateMethodListWithScroll:false.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3258
        fullProtocol ifFalse:[
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3259
            self updateVariableList.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3260
        ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3261
        oldSelector notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3262
            self switchToMethod:oldSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3263
            currentMethod notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3264
                self switchToMethodCategory:(currentMethod category).
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3265
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3266
        ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3267
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3268
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3269
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3270
    cls := Smalltalk classNamed:classListView selectionValue withoutSpaces.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3271
    cls notNil ifTrue:[
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3272
        self switchToClass:cls.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3273
        self classSelectionChanged
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3274
    ]
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3275
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3276
    "Modified: 4.6.1996 / 23:05:20 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3277
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3278
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3279
classSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3280
    |oldMethodCategory oldMethod oldSelector|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3281
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3282
    self withWaitCursorDo:[
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3283
        aspect := #definition.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3284
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3285
        oldMethodCategory := currentMethodCategory.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3286
        oldMethod := currentMethod.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3287
        oldSelector := currentSelector.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3288
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3289
        showInstance ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3290
            actualClass := acceptClass := currentClass
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3291
        ] ifFalse:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3292
            actualClass := acceptClass := currentClass class
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3293
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3294
        currentMethodCategory := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3295
        currentMethod := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3296
        currentSelector := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3297
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3298
        self updateMethodCategoryList.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3299
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3300
        oldMethodCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3301
            methodCategoryListView setSelectElement:oldMethodCategory.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3302
            methodCategoryListView hasSelection ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3303
                currentMethodCategory := oldMethodCategory.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3304
                self methodCategorySelectionChanged
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3305
            ]
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3306
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3307
        self updateMethodList.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3308
        self updateCodeView.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  3309
        self updateVariableList.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3310
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3311
        fullClass ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3312
            codeView acceptAction:[:theCode |
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3313
                codeView cursor:Cursor execute.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3314
                Object abortSignal catch:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3315
                    self compileCode:theCode asString.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3316
                    codeView modified:false.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3317
                ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3318
                codeView cursor:Cursor normal.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3319
            ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3320
        ] ifFalse:[
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3321
"/            self classDefinition.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3322
self classListUpdate.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3323
            codeView acceptAction:[:theCode |
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3324
                codeView cursor:Cursor execute.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3325
                Object abortSignal catch:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3326
                    (Compiler evaluate:theCode asString notifying:codeView compile:false)
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3327
                    isBehavior ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3328
                        self classCategoryUpdate.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3329
                        self updateClassListWithScroll:false.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3330
                        codeView modified:false.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3331
                    ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3332
                ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3333
                codeView cursor:Cursor normal.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3334
            ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3335
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3336
        codeView explainAction:nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3337
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3338
        classCategoryListView notNil ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3339
            (currentClassCategory = currentClass category) ifFalse:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3340
                currentClassCategory := currentClass category.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3341
                classCategoryListView setSelectElement:currentClassCategory
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3342
            ]
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3343
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3344
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3345
        self setDoitActionForClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3346
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3347
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3348
    "Created: 23.11.1995 / 11:32:03 / cg"
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3349
    "Modified: 26.5.1996 / 17:05:46 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3350
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3351
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3352
classTemplateFor:className in:cat private:isPrivate
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3353
    "return a class definition template - be smart in what is offered initially"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3354
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3355
    |aString name nameProto namePrefix i existingNames|
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3356
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3357
    nameProto := 'NewClass'.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3358
    i := 1.
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3359
    isPrivate ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3360
        namePrefix := currentClass name , '::'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3361
        existingNames := currentClass privateClasses.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3362
        existingNames notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3363
            existingNames := existingNames collect:[:cls | cls name].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3364
        ]
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3365
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3366
        namePrefix := ''.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3367
        existingNames := Smalltalk keys
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3368
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3369
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3370
    name := 'NewClass' , i printString.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3371
    existingNames notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3372
        nameProto := namePrefix , name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3373
        [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3374
            i := i + 1.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3375
            name := 'NewClass' , i printString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3376
            nameProto := namePrefix , name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3377
        ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3378
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3379
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3380
    isPrivate ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3381
        aString := className , ' subclass:#' , name  , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3382
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3383
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3384
' , '    poolDictionaries: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3385
' , '    privateIn:' , currentClass name printString
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3386
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3387
        aString := className , ' subclass:#' , name , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3388
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3389
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3390
' , '    poolDictionaries: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3391
' , '    category: '''.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3392
        cat notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3393
            aString := aString , cat
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3394
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3395
        aString := aString , ''''
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3396
    ].
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3397
    aString := aString , '
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3398
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3399
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3400
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3401
 Replace ''' , className , ''', ''', name , ''' and
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3402
 the empty string arguments by true values.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3403
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3404
 Install (or change) the class by ''accepting'',
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3405
 either via the menu or the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3406
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3407
 To be nice to others (and yourself later), do not forget to
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3408
 add some documentation; preferably under the classes documentation
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3409
 protocol.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3410
 (see the ``create documentation stubs'' item in the methodList menu.)
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3411
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3412
'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3413
    ^ aString
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3414
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3415
    "Created: 8.2.1996 / 18:22:34 / cg"
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3416
    "Modified: 27.10.1996 / 14:43:08 / cg"
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3417
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3418
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3419
doClassMenu:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3420
    "a helper - check if class is selected and evaluate aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3421
     while showing waitCursor"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3422
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3423
    self checkClassSelected ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3424
        self withWaitCursorDo:[aBlock value:currentClass]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3425
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3426
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3427
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3428
listOfAllClassesInCategory:aCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3429
    "return a list of all classes in a given category"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3430
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3431
    |newList classNames searchCategory nm owner|
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3432
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3433
    "/ keep track of added names (care for obsolete classes)
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3434
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3435
    classNames := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3436
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3437
    (aCategory = '* hierarchy *') ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3438
        newList := OrderedCollection new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3439
        self classHierarchyOf:Object do:[:aClass :lvl|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3440
            nm := aClass name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3441
            (classNames includes:nm) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3442
                classNames add:nm.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3443
                newList add:(String new:lvl) , nm
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3444
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3445
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3446
        ^ newList
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3447
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3448
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
  3449
    newList := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3450
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3451
    (aCategory = '* all *') ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3452
        Smalltalk allBehaviorsDo:[:aClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3453
            nm := aClass name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3454
            (classNames includes:nm) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3455
                classNames add:nm.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3456
                newList add:aClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3457
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3458
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3459
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3460
        (aCategory = '* no category *') ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3461
            searchCategory := nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3462
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3463
            searchCategory := aCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3464
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3465
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3466
        Smalltalk allBehaviorsDo:[:aClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3467
            |thisCategory|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3468
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3469
            aClass isMeta ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3470
                thisCategory := aClass category.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3471
                ((thisCategory = searchCategory) 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3472
                or:[thisCategory = aCategory]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3473
                    nm := aClass name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3474
                    (classNames includes:nm) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3475
                        classNames add:nm.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3476
                        newList add:aClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3477
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3478
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3479
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3480
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3481
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3482
    (newList size == 0) ifTrue:[^ nil].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3483
    newList := newList asOrderedCollection sort:[:a :b | a name < b name].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3484
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3485
    "/ collect names & indent after sorting
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3486
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3487
    newList := newList collect:[:cls |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3488
        | nm owner s |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3489
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3490
        nm := cls name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3491
        s := nm.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3492
        owner := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3493
        [ (owner := owner owningClass) notNil ] whileTrue:[    
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3494
            s := '  ' , s
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3495
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3496
        s
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3497
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3498
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  3499
    ^ newList
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  3500
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3501
    "Modified: 27.10.1996 / 15:28:08 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3502
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3503
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3504
listOfClassHierarchyOf:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3505
    "return a hierarchy class-list"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3506
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3507
    |startClass classes thisOne|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3508
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3509
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3510
        startClass := aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3511
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3512
        startClass := aClass class.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3513
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3514
    classes := startClass allSuperclasses.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3515
    thisOne := Array with:startClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3516
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3517
    classes notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3518
        classes := classes reverse , thisOne.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3519
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3520
        classes := thisOne
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3521
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3522
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3523
    fullProtocol ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3524
        classes := classes , startClass allSubclassesInOrder
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3525
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3526
    ^ classes collect:[:c | c name]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3527
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3528
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3529
renameCurrentClassTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3530
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3531
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3532
    self doClassMenu:[:currentClass |
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3533
        |oldName oldSym newSym cls|
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3534
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3535
        (cls := Smalltalk classNamed:aString) notNil ifTrue:[
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3536
            (self confirm:(resources string:'WARN_RENAME' with:aString with:cls category) withCRs)
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3537
                ifFalse:[^ self]
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3538
        ].
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3539
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3540
        oldName := currentClass name.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3541
        oldSym := oldName asSymbol.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3542
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3543
        currentClass setName:aString.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3544
        newSym := aString asSymbol.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3545
        Smalltalk at:oldSym put:nil.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3546
        Smalltalk removeKey:oldSym.            
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3547
        Smalltalk at:newSym put:currentClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3548
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3549
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3550
        currentClass renameTo:aString.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3551
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3552
        Smalltalk renameClass:currentClass to:aString.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3553
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3554
        self updateClassList.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3555
        self updateMethodCategoryListWithScroll:false.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3556
        self updateMethodListWithScroll:false.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3557
        self withWaitCursorDo:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  3558
            Transcript showCR:('searching for users of ' , oldSym); endEntry.
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3559
            SystemBrowser browseReferendsOf:oldSym warnIfNone:false
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3560
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3561
    ]
214
bb193ae3f3f9 check for existing class in rename; avoid warnbox if no refs are found after rename
Claus Gittinger <cg@exept.de>
parents: 213
diff changeset
  3562
bb193ae3f3f9 check for existing class in rename; avoid warnbox if no refs are found after rename
Claus Gittinger <cg@exept.de>
parents: 213
diff changeset
  3563
    "Created: 25.11.1995 / 13:02:53 / cg"
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  3564
    "Modified: 18.5.1996 / 15:41:27 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3565
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3566
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3567
switchToClass:newClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3568
    "switch to some other class;
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3569
     keep instance protocol as it was ..."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3570
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3571
    |cls meta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3572
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3573
"/    fullProtocol ifTrue:[^ self].
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3574
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3575
    self releaseClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3576
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3577
    cls := newClass.
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3578
    cls isMeta ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3579
        meta := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3580
        cls := meta soleInstance
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3581
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3582
        meta := cls class
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3583
    ].
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3584
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3585
    currentClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3586
    showInstance ifTrue:[
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3587
       actualClass := acceptClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3588
    ] ifFalse:[
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3589
       actualClass := acceptClass := meta.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3590
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3591
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3592
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3593
        cls addDependent:self.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3594
        meta addDependent:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3595
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3596
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3597
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3598
    "Modified: 1.9.1995 / 01:04:05 / claus"
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3599
    "Modified: 13.12.1995 / 15:32:49 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3600
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3601
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3602
switchToClassNameMatching:aMatchString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3603
    |classNames thisName box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3604
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3605
    classNames := Set new.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3606
    Smalltalk allBehaviorsDo:[:aClass |
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3607
        thisName := aClass name.
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3608
        (aMatchString match:thisName) ifTrue:[
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3609
            classNames add:thisName
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3610
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3611
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3612
    (classNames size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3613
    (classNames size == 1) ifTrue:[
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3614
        ^ self switchToClassNamed:(classNames first)
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3615
    ].
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3616
    classNames := classNames asArray sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3617
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3618
    box := self listBoxTitle:'select class to switch to:'
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3619
                      okText:'ok'
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3620
                        list:classNames.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3621
    box action:[:aString | self switchToClassNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3622
    box showAtPointer
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3623
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3624
    "Modified: 4.6.1996 / 11:34:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3625
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3626
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3627
switchToClassNamed:aString
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3628
    |meta str classSymbol theClass newCat element idx|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3629
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3630
    meta := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3631
    str := aString.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3632
    classSymbol := aString withoutSpaces asSymbolIfInterned.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3633
    classSymbol isNil ifTrue:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3634
        (aString endsWith:' class') ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3635
            str := aString copyWithoutLast:6.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3636
            classSymbol := str asSymbolIfInterned.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3637
            classSymbol isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3638
                ^ self
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3639
            ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3640
            meta := true
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3641
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3642
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3643
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3644
    theClass := Smalltalk at:classSymbol.
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3645
    (theClass isNil and:[str endsWith:' class']) ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3646
        str := str copyWithoutLast:6.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3647
        classSymbol := str asSymbolIfInterned.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3648
        classSymbol isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3649
            ^ self
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3650
        ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3651
        meta := true.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3652
        theClass := Smalltalk at:classSymbol.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3653
    ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3654
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3655
    classCategoryListView notNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3656
        classCategoryListView list size == 0 ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3657
            classCategoryListView list:(self listOfAllClassCategories).
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3658
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3659
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3660
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3661
    theClass == currentClass ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3662
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3663
    theClass isBehavior ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3664
        classCategoryListView notNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3665
            currentClassHierarchy isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3666
                ((newCat := theClass category) ~= currentClassCategory) ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3667
                    currentClassCategory := newCat.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3668
                    newCat isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3669
                        element := '* no category *'
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3670
                    ] ifFalse:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3671
                        element := newCat.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3672
                    ].
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3673
                    classCategoryListView setSelectElement:element.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3674
                    "/ classCategoryListView makeSelectionVisible.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3675
                ]
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3676
            ]
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3677
        ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3678
        self updateClassList.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3679
        self switchToClass:theClass.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3680
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3681
        idx := classListView list findFirst:[:line | line withoutSpaces = str].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3682
        classListView selection:idx.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3683
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3684
"/        classListView setSelectElement:str.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3685
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3686
        self instanceProtocol:meta not.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3687
        self classSelectionChanged.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3688
        classCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3689
            classCategoryListView setSelectElement:theClass category
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3690
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3691
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3692
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3693
    "Modified: 1.9.1995 / 01:41:35 / claus"
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3694
    "Modified: 17.6.1996 / 16:54:55 / stefan"
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3695
    "Modified: 14.10.1996 / 20:21:23 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3696
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3697
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3698
updateClassList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3699
    self updateClassListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3700
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3701
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3702
updateClassListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3703
    |classes oldClassName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3704
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3705
    classListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3706
        "
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3707
         refetch in case we are not up to date
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3708
        "
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3709
        (currentClass notNil and:[fullProtocol not]) ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3710
            oldClassName := currentClass name.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3711
            currentClass := Smalltalk at:(oldClassName asSymbol).
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3712
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3713
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3714
        currentClassCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3715
            classes := self listOfAllClassesInCategory:currentClassCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3716
        ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3717
            currentClassHierarchy notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3718
                classes := self listOfClassHierarchyOf:currentClassHierarchy
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3719
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3720
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3721
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3722
        classListView list = classes ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3723
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3724
                classListView contents:classes
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3725
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3726
                classListView setContents:classes
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3727
            ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3728
            oldClassName notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3729
                classListView setContents:classes.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3730
                classListView setSelectElement:oldClassName
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3731
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3732
                variableListView notNil ifTrue:[variableListView contents:nil]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3733
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3734
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3735
        scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3736
            fullProtocol ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3737
                classListView scrollToBottom
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3738
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3739
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3740
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3741
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3742
    "Modified: 26.5.1996 / 15:03:11 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3743
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3744
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3745
!BrowserView methodsFor:'class-method list menu'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3746
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3747
classMethodBrowse
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3748
    SystemBrowser openInClass:actualClass selector:currentSelector
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3749
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3750
    "Created: 13.12.1995 / 15:05:12 / cg"
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3751
    "Modified: 13.12.1995 / 15:06:26 / cg"
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3752
!
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3753
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3754
classMethodFileOutAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3755
    "fileout all methods into one source file"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3756
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3757
    |list classString selectorString cls mth outStream fileName append
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3758
     fileBox|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3759
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3760
    append := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3761
    fileBox := FileSaveBox
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3762
                        title:(resources string:'save methods in:')
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3763
                        okText:(resources string:'save')
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3764
                        abortText:(resources string:'cancel')
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3765
                        action:[:fName | fileName := fName].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3766
    fileBox appendAction:[:fName | fileName := fName. append := true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3767
    fileBox initialText:'some_methods.st'.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3768
    Project notNil ifTrue:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3769
        fileBox directory:Project currentProjectDirectory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3770
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3771
    fileBox showAtPointer.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3772
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3773
    fileName notNil ifTrue:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3774
        "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3775
         if file exists, save original in a .sav file
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3776
        "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3777
        fileName asFilename exists ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3778
            fileName asFilename copyTo:(fileName , '.sav')
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3779
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3780
        append ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3781
            outStream := FileStream appendingOldFileNamed:fileName
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3782
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3783
            outStream := FileStream newFileNamed:fileName.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3784
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3785
        outStream isNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3786
            ^ self warn:'cannot create: %1' with:fileName
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3787
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3788
        self withWaitCursorDo:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3789
            list := classMethodListView list.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3790
            list do:[:line |
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3791
                self busyLabel:'writing: ' with:line.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3792
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3793
                classString := self classFromClassMethodString:line.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3794
                selectorString := self selectorFromClassMethodString:line.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3795
706
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3796
                cls := Smalltalk classNamed:classString.
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3797
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3798
"/                ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3799
"/                    classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3800
"/                    cls := (Smalltalk at:classString asSymbol).
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3801
"/                    cls := cls class
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3802
"/                ] ifFalse:[
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3803
"/                    cls := (Smalltalk at:classString asSymbol).
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3804
"/                ].
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3805
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3806
                cls isNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3807
                    self warn:'oops class %1 is gone' with:classString
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3808
                ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3809
                    mth := cls compiledMethodAt:(selectorString asSymbol).
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3810
                    Class fileOutErrorSignal handle:[:ex |
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3811
                        |box|
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3812
                        box := YesNoBox 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3813
                                    title:('fileOut error: ' 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3814
                                           , ex errorString 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3815
                                           , '\\continue anyway ?') withCRs
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3816
                                    yesText:'continue' 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3817
                                    noText:'abort'.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3818
                        box confirm ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3819
                            ex proceed
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3820
                        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3821
                        self normalLabel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3822
                        ^ self
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3823
                    ] do:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3824
                        cls fileOutMethod:mth on:outStream.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3825
                    ]    
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3826
                ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3827
            ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3828
            outStream close.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3829
            self normalLabel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3830
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3831
    ]
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  3832
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3833
    "Modified: 17.6.1996 / 16:51:11 / stefan"
706
6b4ce4a5075e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 701
diff changeset
  3834
    "Modified: 21.6.1996 / 15:25:53 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3835
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3836
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3837
classMethodMenu
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  3838
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
587
74d27450aa79 added resource info
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
  3839
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3840
    |labels selectors shorties|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3841
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3842
    labels := #(
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3843
                                'fileOut'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3844
                                'fileOut all'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3845
                                'printOut'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3846
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3847
                                'browse'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3848
                                'spawn'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3849
                                'spawn class'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3850
                                'spawn full protocol'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3851
                                'spawn hierarchy'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3852
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3853
                                'senders ...'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3854
                                'implementors ...'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3855
                                'globals ...'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3856
"/                              '-'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3857
"/                              'breakpoint' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3858
"/                              'trace' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3859
"/                              'trace sender' 
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3860
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3861
                                'remove'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3862
               ).
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3863
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3864
    shorties := #(
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3865
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3866
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3867
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3868
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3869
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3870
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3871
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3872
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3873
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3874
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3875
                                #Cmds
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3876
                                #Cmdi
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  3877
                                #Cmdg
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3878
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3879
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3880
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3881
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3882
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3883
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3884
               ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3885
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3886
    selectors := #(
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3887
                                methodFileOut
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3888
                                classMethodFileOutAll
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3889
                                methodPrintOut
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3890
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3891
                                classMethodBrowse
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3892
                                methodSpawn
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3893
                                classSpawn
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3894
                                classSpawnFullProtocol
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3895
                                classSpawnHierarchy
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3896
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3897
                                methodSenders
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3898
                                methodImplementors
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3899
                                methodGlobalReferends
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3900
"/                              nil
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3901
"/                              methodBreakPoint 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3902
"/                              methodTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3903
"/                              methodTraceSender
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3904
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3905
                                methodRemove
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3906
                  ).
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3907
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3908
    ^ PopUpMenu 
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3909
        labels:(resources array:labels)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3910
        selectors:selectors
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3911
        accelerators:shorties
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  3912
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  3913
    "Modified: 10.7.1996 / 12:46:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3914
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3915
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3916
!BrowserView methodsFor:'class-method stuff'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3917
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3918
classFromClassMethodString:aString
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3919
    "helper for classMethod-list - extract class name from the string"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3920
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  3921
    |pos s|
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3922
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3923
    (aString endsWith:')') ifTrue:[
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3924
        s := aString copyTo:(aString lastIndexOf:$()-1.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3925
        s := s withoutSpaces.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3926
    ] ifFalse:[
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3927
        s := aString
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3928
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3929
    (s endsWith:' !!') ifTrue:[
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3930
        s := s copyWithoutLast:2
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3931
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3932
    pos := s lastIndexOf:(Character space).
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3933
    ^ s copyTo:(pos - 1)
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3934
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3935
    "Modified: 17.6.1996 / 17:06:59 / stefan"
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3936
    "Modified: 17.7.1996 / 20:42:06 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3937
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3938
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3939
classMethodSelection:lineNr
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3940
    "user clicked on a class/method line - show code"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3941
131
claus
parents: 130
diff changeset
  3942
    |cls string classString selectorString meta|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3943
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3944
    string := classMethodListView selectionValue string.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3945
    classString := self classFromClassMethodString:string.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3946
    selectorString := self selectorFromClassMethodString:string.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3947
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3948
    ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3949
        classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3950
        meta := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3951
    ] ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3952
        meta := false.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3953
    ].
129
claus
parents: 126
diff changeset
  3954
    self switchToClass:(Smalltalk at:classString asSymbol).
131
claus
parents: 130
diff changeset
  3955
    meta ifTrue:[cls := currentClass class] ifFalse:[cls := currentClass].
claus
parents: 130
diff changeset
  3956
    actualClass := acceptClass := cls.
129
claus
parents: 126
diff changeset
  3957
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3958
    currentClass isNil ifTrue:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3959
        self warn:'oops class is gone'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3960
    ] ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3961
        currentClassCategory := currentClass category.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3962
        currentSelector := selectorString asSymbol.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3963
        currentMethod := actualClass compiledMethodAt:currentSelector.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3964
        currentMethod isNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3965
            self warn:'oops method is gone'
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3966
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3967
            currentMethodCategory := currentMethod category.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3968
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3969
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3970
        self methodSelectionChanged
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3971
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3972
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3973
    self setDoitActionForClass
131
claus
parents: 130
diff changeset
  3974
claus
parents: 130
diff changeset
  3975
    "Modified: 31.8.1995 / 11:56:02 / claus"
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3976
    "Modified: 17.6.1996 / 16:51:28 / stefan"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3977
    "Modified: 15.7.1996 / 11:44:38 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3978
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3979
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3980
selectorFromClassMethodString:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3981
    "helper for classMethod-list - extract selector from the string"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3982
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3983
    |pos s|
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3984
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3985
    (aString endsWith:')') ifTrue:[
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3986
        s := aString copyTo:(aString lastIndexOf:$()-1.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3987
        s := s withoutSpaces.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3988
    ] ifFalse:[
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3989
        s := aString
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3990
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3991
    (s endsWith:' !!') ifTrue:[
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3992
        s := s copyWithoutLast:2
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3993
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3994
    pos := s lastIndexOf:(Character space).
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  3995
    ^ s copyFrom:(pos + 1)
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3996
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3997
    "Modified: 17.6.1996 / 17:04:38 / stefan"
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  3998
    "Modified: 17.7.1996 / 20:43:20 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3999
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4000
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4001
!BrowserView methodsFor:'event handling'!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4002
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4003
handlesKeyPress:key inView:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4004
    "this method is reached via delegation: are we prepared to handle
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4005
     a keyPress in some other view ?"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4006
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4007
    <resource: #keyboard (#Find #Cmdn #Cmdi #Cmds #Cmdg #Cmdt #Cmda)>
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4008
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4009
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4010
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4011
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4012
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4013
    view == classCategoryListView ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4014
        (key == #Find) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4015
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4016
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4017
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4018
    view == classListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4019
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4020
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4021
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4022
    view == methodCategoryListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4023
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4024
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4025
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4026
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4027
    or:[view == classMethodListView]) ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4028
        (untranslatedKey == #Cmdi) ifTrue:[^ true].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4029
        (untranslatedKey == #Cmds) ifTrue:[^ true].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4030
        (untranslatedKey == #Cmdg) ifTrue:[^ true].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4031
        (untranslatedKey == #Cmdt) ifTrue:[^ true].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4032
        (untranslatedKey == #Cmda) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4033
    ].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4034
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4035
    ^ false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4036
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4037
    "Created: 2.3.1996 / 14:33:30 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4038
    "Modified: 27.10.1996 / 14:14:54 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4039
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4040
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4041
keyPress:key x:x y:y view:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4042
    "this method is reached via delegation from the classCategoryListView"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4043
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4044
    <resource: #keyboard (#Find #Cmdn #Cmdi #Cmds #Cmdg #Cmdt #Cmda)>
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4045
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4046
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4047
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4048
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4049
    "/ have to untranslate (since we get #Inspect / #Search
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4050
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4051
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4052
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4053
    view == classCategoryListView ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4054
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4055
        (untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4056
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4057
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4058
    view == classListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4059
        (untranslatedKey == #Cmdn) ifTrue:[^ self classNewClass].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4060
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4061
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4062
    view == methodCategoryListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4063
        (untranslatedKey == #Cmdn) ifTrue:[^ self methodCategoryNewCategory].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4064
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4065
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4066
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4067
    or:[view == classMethodListView]) ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4068
        (untranslatedKey == #Cmdi) ifTrue:[^ self methodImplementors].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4069
        (untranslatedKey == #Cmds) ifTrue:[^ self methodSenders].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4070
        (untranslatedKey == #Cmdg) ifTrue:[^ self methodGlobalReferends].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4071
        (untranslatedKey == #Cmdt) ifTrue:[^ self methodStringSearch].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4072
        (untranslatedKey == #Cmda) ifTrue:[^ self methodAproposSearch].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4073
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4074
    view keyPress:key x:x y:y
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4075
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4076
    "Created: 2.3.1996 / 14:37:52 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4077
    "Modified: 27.10.1996 / 14:14:44 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4078
! !
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4079
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4080
!BrowserView methodsFor:'help'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4081
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4082
helpTextFor:aComponent
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4083
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4084
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4085
    aComponent == classCategoryListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4086
        s := 'HELP_CCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4087
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4088
    aComponent == classListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4089
        fullProtocol ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4090
            s := 'HELP_PCLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4091
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4092
            currentClassHierarchy notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4093
                s := 'HELP_HCLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4094
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4095
                s := 'HELP_CLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4096
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4097
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4098
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4099
    aComponent == methodCategoryListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4100
        s := 'HELP_MCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4101
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4102
    aComponent == methodListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4103
        s := 'HELP_METHOD_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4104
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4105
    aComponent == variableListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4106
        s := 'HELP_VAR_LIST'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4107
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4108
    aComponent == codeView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4109
        fullClass ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4110
            s := 'HELP_FULLCODE_VIEW'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4111
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4112
            s := 'HELP_CODE_VIEW'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4113
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4114
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4115
    (aComponent == instanceToggle 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4116
    or:[aComponent == classToggle]) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4117
        s := 'HELP_INST_CLASS_TOGGLE'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4118
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4119
    aComponent == classMethodListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4120
        s := 'HELP_CLSMTHOD_LIST'
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4121
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4122
    s notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4123
        ^ resources string:s
105
claus
parents: 98
diff changeset
  4124
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4125
    ^ nil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4126
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4127
    "Modified: 31.8.1995 / 19:11:39 / claus"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4128
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4129
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4130
!BrowserView methodsFor:'initialize / release'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4131
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4132
autoSearch:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4133
    "used with class-method list browsing. If true,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4134
     selecting an entry from the list will automatically
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4135
     search for the searchstring in the codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4136
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4137
    self setSearchPattern:aString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4138
    autoSearch := aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4139
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4140
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4141
destroy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4142
    "relese dependant - destroy popups"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4143
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4144
    Smalltalk removeDependent:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4145
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4146
        self releaseClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4147
        "/
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4148
        "/ just in case someone keeps a ref to myself around ...
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4149
        "/ ... release refs to my class (not really needed)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4150
        "/
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4151
        currentClass := actualClass := acceptClass := nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4152
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4153
    super destroy
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  4154
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  4155
    "Modified: 13.12.1995 / 15:33:03 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4156
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4157
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4158
initialize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4159
    super initialize.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4160
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4161
    showInstance := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4162
    fullClass := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4163
    fullProtocol := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4164
    aspect := nil.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4165
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4166
    "inform me, when Smalltalk changes"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4167
    Smalltalk addDependent:self
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4168
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4169
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4170
realize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4171
    |v checkBlock|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4172
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4173
    super realize.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4174
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4175
    checkBlock := [:lineNr | self checkSelectionChangeAllowed].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4176
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4177
    v := classCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4178
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4179
        v action:[:lineNr | self classCategorySelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4180
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4181
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4182
        v list size == 0 ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4183
            v list:(self listOfAllClassCategories).
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4184
        ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4185
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4186
         tell classCategoryListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4187
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4188
        v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
107
claus
parents: 106
diff changeset
  4189
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4190
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4191
    v := classListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4192
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4193
        v action:[:lineNr | self classSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4194
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4195
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4196
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4197
         tell classListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4198
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4199
        v menuHolder:self; menuPerformer:self; menuMessage:#classMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4200
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4201
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4202
    v := methodCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4203
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4204
        v action:[:lineNr | self methodCategorySelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4205
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4206
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4207
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4208
         tell methodCategoryListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4209
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4210
        v menuHolder:self; menuPerformer:self; menuMessage:#methodCategoryMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4211
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4212
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4213
    v := methodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4214
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4215
        v action:[:lineNr | self methodSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4216
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4217
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4218
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4219
         tell methodListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4220
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4221
        v menuHolder:self; menuPerformer:self; menuMessage:#methodMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4222
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4223
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4224
    v := classMethodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4225
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4226
        v action:[:lineNr | self classMethodSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4227
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4228
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4229
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4230
         tell classMethodListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4231
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4232
        v menuHolder:self; menuPerformer:self; menuMessage:#classMethodMenu.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4233
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4234
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4235
    v := variableListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4236
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4237
        v action:[:lineNr | self variableSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4238
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4239
        v toggleSelect:true.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4240
        v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
117
claus
parents: 114
diff changeset
  4241
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4242
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4243
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4244
     normal browsers show the top/selection at first;
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4245
     fullProtocol browsers better show the end initially
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4246
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4247
    fullProtocol ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4248
        classListView scrollToBottom.
123
claus
parents: 120
diff changeset
  4249
    ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4250
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4251
    "Modified: 26.5.1996 / 15:59:13 / cg"
124
claus
parents: 123
diff changeset
  4252
!
claus
parents: 123
diff changeset
  4253
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4254
terminate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4255
    (self checkSelectionChangeAllowed) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4256
        super terminate
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4257
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4258
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4259
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4260
title:someString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4261
    myLabel := someString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4262
    self label:someString.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4263
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4264
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4265
!BrowserView methodsFor:'initialize subviews'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4266
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4267
createClassListViewIn:frame
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4268
    "setup the classlist subview, with its toggles"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4269
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4270
    |v panel spc|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4271
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4272
    self createTogglesIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4273
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4274
    panel := VariableVerticalPanel
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4275
                    origin:(0.0 @ 0.0) corner:(1.0 @ 1.0)
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4276
                    in:frame.
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4277
    styleSheet is3D ifTrue:[
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4278
        spc := ViewSpacing.
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4279
    ] ifFalse:[
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4280
        spc := 0
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4281
    ].
811
fde69dbb949a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 810
diff changeset
  4282
    panel bottomInset:(instanceToggle height + spc + instanceToggle borderWidth).
764
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4283
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4284
    v := HVScrollableView 
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4285
                for:SelectionInListView 
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4286
                miniScrollerH:true miniScrollerV:false
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4287
                in:panel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4288
    v origin:(0.0 @ 0.0) corner:(1.0 @ 0.7).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4289
    classListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4290
    classListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4291
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4292
    v := ScrollableView for:SelectionInListView in:panel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4293
    v origin:(0.0 @ 0.7) corner:(1.0 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4294
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4295
    variableListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4296
    variableListView delegate:self.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4297
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4298
    "Modified: 27.10.1996 / 14:13:31 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4299
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4300
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4301
createCodeViewIn:aView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4302
    "setup the code view"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4303
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4304
    ^ self createCodeViewIn:aView atY:0.25
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4305
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4306
    "Modified: 2.3.1996 / 16:08:46 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4307
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4308
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4309
createCodeViewIn:aView atY:relY
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4310
    "setup the code view"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4311
    |v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4312
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4313
    v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:aView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4314
    v origin:(0.0 @ relY) corner:(1.0 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4315
    codeView := v scrolledView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4316
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4317
    "Created: 2.3.1996 / 16:09:03 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4318
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4319
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4320
createMethodListViewIn:aView atX:relX
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4321
    "setup the method list view"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4322
    |v|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4323
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4324
    v := HVScrollableView for:SelectionInListView miniScrollerH:true miniScrollerV:false in:aView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4325
    v origin:(relX @ 0.0) corner:(1.0 @ 1.0).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4326
    methodListView := v scrolledView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4327
    methodListView delegate:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4328
    ^ v
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4329
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4330
    "Created: 2.3.1996 / 16:07:10 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4331
    "Modified: 2.3.1996 / 16:11:42 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4332
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4333
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4334
createTogglesIn:aFrame
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4335
    "create and setup the class/instance toggles"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4336
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4337
    |h halfSpace classAction instanceAction|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4338
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4339
    classAction := [self instanceProtocol:false].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4340
    instanceAction := [self instanceProtocol:true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4341
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4342
    halfSpace := ViewSpacing // 2.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4343
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4344
    instanceToggle := Toggle label:(resources at:'instance') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  4345
    h := instanceToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4346
    instanceToggle origin:(0.0 @ 1.0) corner:(0.5 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4347
    instanceToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4348
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4349
    instanceToggle turnOn.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4350
    instanceToggle pressAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4351
    instanceToggle releaseAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4352
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4353
    classToggle := Toggle label:(resources at:'class') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  4354
    h := classToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4355
    classToggle origin:(0.5 @ 1.0) corner:(1.0 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4356
    classToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4357
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4358
    classToggle turnOff.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4359
    classToggle pressAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4360
    classToggle releaseAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4361
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4362
    styleSheet is3D ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4363
        instanceToggle bottomInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4364
        classToggle bottomInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4365
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4366
        instanceToggle leftInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4367
        classToggle leftInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4368
        instanceToggle rightInset:ViewSpacing - halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4369
        classToggle rightInset:ViewSpacing - halfSpace.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4370
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4371
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4372
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4373
focusSequence
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4374
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4375
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4376
    s := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4377
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4378
    classCategoryListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4379
        s add:classCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4380
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4381
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4382
    classListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4383
        s add:classListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4384
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4385
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4386
"/    variableListView notNil ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4387
"/        s add:variableListView
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4388
"/    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4389
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4390
    instanceToggle notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4391
        s add:instanceToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4392
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4393
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4394
    methodCategoryListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4395
        s add:methodCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4396
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4397
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4398
    methodListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4399
        s add:methodListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4400
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4401
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4402
    classMethodListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4403
        s add:classMethodListView
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4404
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4405
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4406
    s add:codeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4407
    ^ s
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4408
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4409
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4410
setupForAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4411
    "create subviews for a full browser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4412
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4413
    |vpanel hpanel frame v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4414
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4415
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4416
                  in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4417
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4418
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4419
    v := HVScrollableView for:SelectionInListView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4420
                          miniScrollerH:true miniScrollerV:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4421
                          in:hpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4422
    v origin:(0.0 @ 0.0) corner:(0.25 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4423
    classCategoryListView := v scrolledView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4424
    classCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4425
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4426
    frame := View origin:(0.25 @ 0.0) corner:(0.5 @ 1.0) in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4427
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4428
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4429
    v := HVScrollableView for:SelectionInListView miniScrollerH:true miniScrollerV:false in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4430
    v origin:(0.5 @ 0.0) corner:(0.75 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4431
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4432
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4433
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4434
    self createMethodListViewIn:hpanel atX:0.75.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4435
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4436
    self createCodeViewIn:vpanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4437
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4438
    "Modified: 27.10.1996 / 14:16:56 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4439
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4440
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4441
setupForClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4442
    "create subviews for browsing a single class"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4443
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4444
    |vpanel hpanel frame v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4445
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4446
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4447
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4448
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4449
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4450
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4451
    frame := View origin:(0.0 @ 0.0) corner:(0.5 @ 1.0)in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4452
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4453
    self createTogglesIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4454
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4455
    v := ScrollableView for:SelectionInListView in:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4456
    v origin:(0.0 @ 0.0)
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4457
      extent:[frame width
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4458
              @
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4459
              (frame height 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4460
               - ViewSpacing
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4461
               - instanceToggle height
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4462
               - instanceToggle borderWidth
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4463
               + v borderWidth)].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4464
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4465
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4466
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4467
    self createMethodListViewIn:hpanel atX:0.5.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4468
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4469
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4470
    self switchToClass:aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4471
    actualClass := acceptClass := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4472
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4473
    self updateMethodList.
151
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  4474
    self updateCodeView.
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  4475
    self classDefinition.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4476
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4477
    "Modified: 27.10.1996 / 14:17:06 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4478
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4479
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4480
setupForClass:aClass methodCategory:aMethodCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4481
    "setup subviews to browse a method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4482
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4483
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4484
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4485
    vpanel := VariableVerticalPanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4486
                        origin:(0.0 @ 0.0) corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4487
                            in:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4488
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4489
    v := self createMethodListViewIn:vpanel atX:0.0.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4490
    v corner:(1.0 @ 0.25).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4491
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4492
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4493
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4494
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4495
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4496
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4497
    currentMethodCategory := aMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4498
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4499
    self updateCodeView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4500
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4501
    "Modified: 2.3.1996 / 16:10:44 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4502
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4503
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4504
setupForClass:aClass selector:selector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4505
    "setup subviews to browse a single method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4506
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4507
    |v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4508
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4509
    v := ScrollableView for:CodeView in:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4510
    v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4511
    codeView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4512
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4513
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4514
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4515
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4516
    currentSelector := selector.
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  4517
    currentMethod := actualClass compiledMethodAt:selector.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4518
    currentMethodCategory := currentMethod category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4519
    self updateCodeView
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  4520
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  4521
    "Modified: 13.12.1995 / 15:07:50 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4522
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4523
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4524
setupForClassCategory:aClassCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4525
    "setup subviews to browse a class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4526
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4527
    |vpanel hpanel frame v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4528
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4529
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4530
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4531
                                        in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4532
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4533
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4534
    frame  := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4535
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4536
    self createClassListViewIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4537
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4538
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4539
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4540
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4541
    methodCategoryListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4542
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4543
    self createMethodListViewIn:hpanel atX:0.66.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4544
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4545
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4546
    currentClassCategory := aClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4547
    self updateClassList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4548
    self updateMethodCategoryList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4549
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4550
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4551
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4552
    "Modified: 27.10.1996 / 14:17:24 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4553
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4554
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4555
setupForClassHierarchy:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4556
    "setup subviews to browse a class hierarchy"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4557
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4558
    |vpanel hpanel frame v cls|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4559
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4560
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4561
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4562
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4563
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4564
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4565
     notice: we use a different ratio here
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4566
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4567
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.4) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4568
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4569
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4570
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4571
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4572
    v := ScrollableView for:SelectionInListView in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4573
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4574
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4575
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4576
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4577
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4578
    self createCodeViewIn:vpanel atY:0.4.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4579
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4580
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4581
    cls isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4582
        cls := cls soleInstance
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4583
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4584
    currentClassHierarchy := currentClass := actualClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4585
    self updateClassList.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4586
    classListView setSelectElement:aClass name; makeSelectionVisible.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4587
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4588
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4589
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4590
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4591
    aClass isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4592
        self instanceProtocol:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4593
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  4594
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4595
    "Modified: 27.10.1996 / 14:17:30 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4596
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4597
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4598
setupForClassList:aList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4599
    "setup subviews to browse classes from a list"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4600
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4601
    self setupForClassList:aList sort:true
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4602
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4603
    "Modified: 28.5.1996 / 13:53:03 / cg"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4604
!
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4605
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4606
setupForClassList:aList sort:doSort
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4607
    "setup subviews to browse classes from a list"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4608
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4609
    |vpanel hpanel frame l v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4610
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4611
    vpanel := VariableVerticalPanel 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4612
                 origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4613
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4614
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4615
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4616
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4617
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4618
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4619
    v := ScrollableView for:SelectionInListView in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4620
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4621
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4622
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4623
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4624
    self createMethodListViewIn:hpanel atX:0.66.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4625
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4626
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4627
    l := (aList collect:[:entry | 
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4628
                entry isBehavior ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4629
                    entry name
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4630
                ] ifFalse:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4631
                    entry
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4632
                ]]) asOrderedCollection.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4633
    doSort ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4634
        l sort.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4635
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4636
    classListView list:l.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4637
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4638
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4639
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4640
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4641
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4642
    "Created: 28.5.1996 / 13:52:47 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4643
    "Modified: 27.10.1996 / 14:17:36 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4644
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4645
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4646
setupForFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4647
    "setup subviews to browse a class as full text"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4648
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4649
    |vpanel hpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4650
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4651
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4652
                                    corner:(1.0 @ 1.0)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4653
                                        in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4654
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4655
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.25) in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4656
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4657
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4658
    v origin:(0.0 @ 0.0) corner:(0.5 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4659
    classCategoryListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4660
    classCategoryListView contents:(self listOfAllClassCategories).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4661
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4662
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4663
    v origin:(0.5 @ 0.0) corner:(1.0 @ 1.0).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4664
    classListView := v scrolledView.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4665
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4666
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4667
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4668
    fullClass := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4669
    self updateCodeView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4670
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4671
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4672
setupForFullClassProtocol:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4673
    "setup subviews to browse a classes full protocol"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4674
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4675
    |vpanel hpanel frame v cls|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4676
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4677
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4678
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4679
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4680
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4681
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4682
     notice: we use a different ratio here
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4683
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4684
    hpanel := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.4) in:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4685
    frame := View origin:(0.0 @ 0.0) corner:(0.33 @ 1.0) in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4686
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4687
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4688
    classListView multipleSelectOk:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4689
    classListView toggleSelect:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4690
    classListView strikeOut:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4691
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4692
    v := ScrollableView for:SelectionInListView in:hpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4693
    v origin:(0.33 @ 0.0) corner:(0.66 @ 1.0).
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4694
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4695
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4696
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4697
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4698
    self createCodeViewIn:vpanel atY:0.4.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4699
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4700
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4701
    cls isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4702
        cls := cls soleInstance
107
claus
parents: 106
diff changeset
  4703
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4704
    currentClassHierarchy := actualClass := acceptClass := currentClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4705
    fullProtocol := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4706
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4707
    self updateClassList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4708
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4709
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4710
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4711
    self updateVariableList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4712
    aClass isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4713
        self instanceProtocol:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4714
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4715
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4716
    "Modified: 27.10.1996 / 14:17:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4717
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4718
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4719
setupForList:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4720
    "setup subviews to browse methods from a list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4721
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4722
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4723
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4724
    vpanel := VariableVerticalPanel
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4725
                        origin:(0.0 @ 0.0)
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4726
                        corner:(1.0 @ 1.0)
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4727
                            in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4728
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4729
    v := ScrollableView for:SelectionInListView in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4730
    v origin:(0.0 @ 0.0) corner:(1.0 @ 0.25).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4731
    classMethodListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4732
    classMethodListView contents:aList.
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4733
    classMethodListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4734
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4735
    classMethodListView doubleClickAction:[:lineNr | self classMethodBrowse].
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4736
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4737
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4738
    aList size == 1 ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  4739
        classMethodListView setSelection:1.
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4740
        self classMethodSelection:1. 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4741
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4742
    self updateCodeView
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4743
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  4744
    "Modified: 25.5.1996 / 12:26:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4745
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4746
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4747
!BrowserView methodsFor:'method category list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4748
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4749
methodCategoryCopyCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4750
    "show the enter box to copy from an existing method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4751
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4752
    |title box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4753
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4754
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4755
        title := 'class to copy instance method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4756
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4757
        title := 'class to copy class method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4758
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4759
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4760
    box := self listBoxTitle:title 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4761
                      okText:'ok' 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4762
                        list:(Smalltalk allClasses collect:[:cls | cls name]) asArray sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4763
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4764
    box action:[:aString | self copyMethodsFromClass:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4765
    box showAtPointer
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4766
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4767
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4768
methodCategoryCreateAccessMethods
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  4769
    "create access methods for instvars.
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  4770
     If no variable is selected, for all instvars;
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  4771
     otherwise for that selected instvar."
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4772
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4773
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4774
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4775
    showInstance ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4776
        self warn:'select instance - and try again'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4777
        ^ self.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4778
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4779
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4780
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4781
        |nm names source|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4782
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4783
        (variableListView notNil
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4784
        and:[(nm := variableListView selectionValue) notNil]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4785
            names := Array with:nm
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4786
        ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4787
            names := currentClass instVarNames 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4788
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4789
        names do:[:name |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4790
            "check, if method is not already present"
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4791
            (currentClass includesSelector:(name asSymbol)) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4792
                source := (name , '\    "return ' , name , '"\\    ^ ' , name) withCRs.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4793
                Compiler compile:source forClass:currentClass inCategory:'accessing'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4794
            ] ifTrue:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  4795
                Transcript showCR:'method ''', name , ''' already present'
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4796
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4797
            (currentClass includesSelector:((name , ':') asSymbol)) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4798
                source := (name , ':something\    "set ' , name , '"\\    ' , name , ' := something.') withCRs.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4799
                Compiler compile:source forClass:currentClass inCategory:'accessing'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4800
            ] ifTrue:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  4801
                Transcript showCR:'method ''', name , ':'' already present'
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4802
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4803
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4804
        self updateMethodCategoryListWithScroll:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4805
        self updateMethodListWithScroll:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4806
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4807
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  4808
    "Modified: 22.5.1996 / 13:36:59 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4809
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4810
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4811
methodCategoryCreateDocumentationMethods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4812
    "create empty documentation methods"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4813
120
claus
parents: 118
diff changeset
  4814
    |cls histStream|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4815
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4816
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4817
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4818
    cls := currentClass class.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4819
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4820
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4821
        |nm names source|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4822
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4823
        "/ add version method containing RCS template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4824
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4825
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4826
        (cls includesSelector:#version) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4827
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4828
'version
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  4829
    ^ ''$' , 'Header$''
120
claus
parents: 118
diff changeset
  4830
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4831
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4832
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4833
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4834
        "/ add documentation method containing doc template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4835
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4836
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4837
        (cls includesSelector:#documentation) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4838
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4839
'documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4840
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4841
    documentation to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4842
"
120
claus
parents: 118
diff changeset
  4843
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4844
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4845
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4846
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4847
        "/ add examples method containing examples template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4848
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4849
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4850
        (cls includesSelector:#examples) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4851
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4852
'examples
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4853
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4854
    examples to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4855
"
120
claus
parents: 118
diff changeset
  4856
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4857
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4858
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4859
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4860
        "/ add history method containing created-entry
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4861
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4862
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4863
        (cls includesSelector:#history) ifFalse:[ 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4864
            histStream := ReadWriteStream on: String new.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4865
            histStream nextPutAll: 'history'; cr.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4866
            HistoryLine isBehavior ifTrue:[ 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4867
                histStream nextPutAll: (HistoryLine newCreated printString); cr.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4868
            ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4869
                histStream cr.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4870
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4871
            Compiler compile:(histStream contents)
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4872
                    forClass:cls 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4873
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4874
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4875
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4876
        self instanceProtocol:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4877
        self switchToMethodNamed:#documentation 
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4878
"/        self updateMethodCategoryListWithScroll:false.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4879
"/        self updateMethodListWithScroll:false
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4880
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  4881
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  4882
    "Modified: 7.3.1996 / 13:41:18 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4883
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4884
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4885
methodCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4886
    "fileOut all methods in the selected methodcategory of
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4887
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4888
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4889
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4890
    self whenMethodCategorySelected:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4891
        self busyLabel:'saving: %1' with:currentClass name , '-' , currentMethodCategory.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4892
        Class fileOutErrorSignal handle:[:ex |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4893
            self warn:'cannot create: %1' with:ex parameter.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4894
            ex return.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4895
        ] do:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4896
            actualClass fileOutCategory:currentMethodCategory.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4897
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4898
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4899
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4900
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4901
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4902
methodCategoryFileOutAll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4903
    "fileOut all methods in the selected methodcategory of
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4904
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4905
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4906
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4907
    self whenMethodCategorySelected:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4908
        |fileName outStream|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4909
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4910
        fileName := currentMethodCategory , '.st'.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4911
        fileName replaceAll:Character space by:$_.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4912
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4913
         this test allows a smalltalk to be built without Projects/ChangeSets
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4914
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4915
        Project notNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4916
            fileName := Project currentProjectDirectory , fileName.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4917
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4918
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4919
         if file exists, save original in a .sav file
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4920
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4921
        fileName asFilename exists ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4922
            fileName asFilename copyTo:(fileName , '.sav')
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4923
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4924
        outStream := FileStream newFileNamed:fileName.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4925
        outStream isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4926
            ^ self warn:'cannot create: %1' with:fileName
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4927
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4928
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4929
        self busyLabel:'saving: ' with:currentMethodCategory.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4930
        Class fileOutErrorSignal handle:[:ex |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4931
            self warn:'cannot create: %1' with:ex parameter.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4932
            ex return
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4933
        ] do:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4934
            Smalltalk allBehaviorsDo:[:class |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4935
                |hasMethodsInThisCategory|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4936
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4937
                hasMethodsInThisCategory := false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4938
                class methodDictionary do:[:method |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4939
                    method category = currentMethodCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4940
                        hasMethodsInThisCategory := true
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4941
                    ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4942
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4943
                hasMethodsInThisCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4944
                    class fileOutCategory:currentMethodCategory on:outStream.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4945
                    outStream cr
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4946
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4947
                hasMethodsInThisCategory := false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4948
                class class methodDictionary do:[:method |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4949
                    method category = currentMethodCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4950
                        hasMethodsInThisCategory := true
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4951
                    ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4952
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4953
                hasMethodsInThisCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4954
                    class class fileOutCategory:currentMethodCategory on:outStream.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4955
                    outStream cr
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4956
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4957
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4958
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4959
        outStream close.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4960
        self normalLabel.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4961
    ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4962
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  4963
    "Modified: 7.6.1996 / 09:03:56 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4964
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4965
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4966
methodCategoryFindAnyMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4967
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4968
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4969
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4970
    box action:[:aString | self switchToAnyMethodNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4971
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4972
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4973
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4974
methodCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4975
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4976
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4977
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4978
    box action:[:aString | self switchToMethodNamed:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4979
    box showAtPointer
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4980
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4981
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4982
methodCategoryMenu
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4983
    |labels selectors shorties i|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4984
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4985
    currentClass isNil ifTrue:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4986
        methodCategoryListView flash.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4987
        ^ nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4988
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4989
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4990
    currentMethodCategory isNil ifTrue:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4991
        labels := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4992
                    'find method here ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4993
                    'find method ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4994
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4995
                    'new category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4996
                    'copy category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4997
                    'create access methods' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4998
                   ).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4999
        selectors := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5000
                    methodCategoryFindMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5001
                    methodCategoryFindAnyMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5002
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5003
                    methodCategoryNewCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5004
                    methodCategoryCopyCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5005
                    methodCategoryCreateAccessMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5006
                   ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5007
    ] ifFalse:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5008
        labels := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5009
                    'fileOut' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5010
                    'fileOut all' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5011
                    'printOut'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5012
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5013
                    'SPAWN_METHODCATEGORY'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5014
                    'spawn category'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5015
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5016
                    'find method here ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5017
                    'find method ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5018
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5019
                    'new category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5020
                    'copy category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5021
                    'create access methods' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5022
                    'rename ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5023
                    'remove'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5024
                   ).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5025
        selectors := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5026
                    methodCategoryFileOut
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5027
                    methodCategoryFileOutAll
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5028
                    methodCategoryPrintOut
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5029
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5030
                    methodCategorySpawn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5031
                    methodCategorySpawnCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5032
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5033
                    methodCategoryFindMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5034
                    methodCategoryFindAnyMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5035
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5036
                    methodCategoryNewCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5037
                    methodCategoryCopyCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5038
                    methodCategoryCreateAccessMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5039
                    methodCategoryRename
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5040
                    methodCategoryRemove
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5041
                   ).
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5042
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5043
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5044
    showInstance ifFalse:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5045
        labels := labels copy.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5046
        selectors := selectors copy.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5047
        i := labels indexOf:'create access methods'.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5048
        labels at:i put:'create documentation stubs'. 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5049
        selectors at:i put:#methodCategoryCreateDocumentationMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5050
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5051
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5052
    shorties := Array new:(selectors size).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5053
    (selectors includes:#methodCategoryNewCategory) ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5054
        shorties at:(selectors indexOf:#methodCategoryNewCategory) put:#Cmdn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5055
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5056
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5057
    ^ PopUpMenu 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5058
        labels:(resources array:labels)
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5059
        selectors:selectors
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5060
        accelerators:shorties
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5061
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5062
    "Modified: 27.10.1996 / 14:16:27 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5063
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5064
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5065
methodCategoryNewCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5066
    "show the enter box to add a new method category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5067
     Offer existing superclass categories in box to help avoiding
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5068
     useless typing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5069
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5070
    |someCategories existingCategories box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5071
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5072
    actualClass notNil ifTrue:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5073
        someCategories := actualClass allCategories
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5074
    ] ifFalse:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5075
        "
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5076
         mhmh - offer some typical categories ...
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5077
        "
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5078
        showInstance ifTrue:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5079
            someCategories := #('accessing' 
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5080
                                'initialization'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5081
                                'private' 
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5082
                                'printing & storing'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5083
                                'queries'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5084
                                'testing'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5085
                               )
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5086
        ] ifFalse:[
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5087
            someCategories := #(
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5088
                                'documentation'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5089
                                'initialization'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5090
                                'instance creation'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5091
                               ).
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5092
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5093
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5094
    someCategories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5095
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5096
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5097
     remove existing categories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5098
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5099
    existingCategories := methodCategoryListView list.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5100
    existingCategories notNil ifTrue:[
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5101
        someCategories := someCategories select:[:cat | (existingCategories includes:cat) not].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5102
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5104
    box := self listBoxTitle:'name of new method category:'
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5105
                      okText:'create'
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5106
                        list:someCategories.
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5107
    box initialText:lastCategory.
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5108
    box action:[:aString | self newMethodCategory:aString. lastCategory := aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5109
    box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5110
463
9d2bc0eb5876 remember last category / last package/module; better checkin of non-info classes into existing container
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
  5111
    "Modified: 10.4.1996 / 23:26:43 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5112
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5113
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5114
methodCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5115
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5116
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5117
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5118
    self whenMethodCategorySelected:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5119
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5120
        actualClass printOutCategory:currentMethodCategory on:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5121
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5122
    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5123
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5124
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5125
methodCategoryRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5126
    "show number of methods to remove and query user"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5127
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5128
    |t box sels count|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5129
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5130
    currentMethodCategory notNil ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5131
        sels := OrderedCollection new.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5132
        actualClass methodDictionary keysAndValuesDo:[:selector :aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5133
            (aMethod category = currentMethodCategory) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5134
                sels add:selector
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5135
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5136
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5137
        count := sels size.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5138
        (count ~~ 0) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5139
            (count == 1) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5140
                t := 'remove %1\(with 1 method) ?'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5141
            ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5142
                t := 'remove %1\(with %2 methods) ?'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5143
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5144
            t := resources string:t with:currentMethodCategory with:count printString.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5145
            t := t withCRs.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5146
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5147
            box := YesNoBox 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5148
                       title:t
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5149
                       yesText:(resources at:'remove')
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5150
                       noText:(resources at:'abort').
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5151
            box confirm ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5152
                ^ self.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5153
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5154
            sels do:[:selector|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5155
                actualClass removeSelector:selector.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5156
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5157
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5158
        currentMethodCategory := nil.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5159
        currentMethod := currentSelector := nil.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5160
        self updateMethodCategoryListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5161
        self updateMethodList
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5162
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5163
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5164
    "Modified: 7.6.1996 / 09:13:15 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5165
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5166
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5167
methodCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5168
    "launch an enterBox to rename current method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5169
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5170
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5171
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5172
    self checkMethodCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5173
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5174
    box := self enterBoxTitle:(resources string:'rename method category %1 to:' with:currentMethodCategory)
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5175
                okText:(resources at:'rename').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5176
    box initialText:currentMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5177
    box action:[:aString | 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5178
        actualClass renameCategory:currentMethodCategory to:aString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5179
        currentMethodCategory := aString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5180
        currentMethod := currentSelector := nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5181
        self updateMethodCategoryList.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5182
        self updateMethodListWithScroll:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5183
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5184
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5185
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5186
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5187
methodCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5188
    "create a new SystemBrowser browsing current method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5189
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5190
    currentMethodCategory notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5191
        self withWaitCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5192
            SystemBrowser browseClass:actualClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5193
                    methodCategory:currentMethodCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5194
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5195
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5196
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5197
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5198
methodCategorySpawnCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5199
    "create a new SystemBrowser browsing all methods from all
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5200
     classes with same category as current method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5201
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5202
    self askAndBrowseMethodCategory:'category to browse methods:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5203
                             action:[:aString | 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5204
                                        SystemBrowser browseMethodCategory:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5205
                                    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5206
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5207
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5208
!BrowserView methodsFor:'method category stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5209
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5210
checkMethodCategorySelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5211
    currentMethodCategory isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5212
        self warn:'select a method category first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5213
        ^ false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5214
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5215
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5216
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5217
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5218
copyMethodsFromClass:aClassName
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5219
    |class box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5220
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5221
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5222
        class := Smalltalk classNamed:aClassName.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5223
        class isBehavior ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5224
            self warn:'no class named %1' with:aClassName.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5225
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5226
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5227
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5228
        showInstance ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5229
            class := class class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5230
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5231
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5232
        "show enterbox for category to copy from"
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5233
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5234
        box := self enterBoxTitle:'name of category to copy from (matchpattern allowed, * for all):'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5235
                           okText:'copy'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5236
        box action:[:aString | self copyMethodsFromClass:class category:aString].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5237
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5238
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5239
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5240
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5241
copyMethodsFromClass:class category:category
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5242
    currentClass notNil ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5243
        Object abortSignal catch:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5244
            class methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5245
                |source|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5246
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5247
                (category match:aMethod category) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5248
                    source := aMethod source.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5249
                    codeView contents:source.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5250
                    codeView modified:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5251
                    actualClass compilerClass
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5252
                         compile:source 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5253
                         forClass:actualClass 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5254
                         inCategory:aMethod category
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5255
                         notifying:codeView.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5256
                    self updateMethodCategoryListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5257
                    self updateMethodListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5258
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5259
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5260
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5261
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5262
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5263
    "Modified: 7.6.1996 / 09:02:35 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5264
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5265
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5266
listOfAllMethodCategoriesInClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5267
    "answer a list of all method categories of the argument, aClass"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5268
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5269
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5270
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5271
    newList := Set new.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5272
    aClass methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5273
        |cat|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5274
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5275
        cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5276
        cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5277
            cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5278
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5279
        newList add:cat
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5280
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5281
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5282
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5283
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5284
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5285
    "Modified: 7.6.1996 / 09:02:57 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5286
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5287
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5288
listOfAllMethodCategoriesInFullProtocolHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5289
    "answer a list of all method categories of the argument, aClass,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5290
     and all of its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5291
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5292
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5293
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5294
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5295
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5296
    self classesInFullProtocolHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5297
        |cat|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5298
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5299
        c methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5300
            cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5301
            cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5302
                cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5303
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5304
            newList add:cat
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5305
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5306
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5307
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5308
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5309
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5310
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5311
    "Modified: 7.6.1996 / 09:03:11 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5312
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5313
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5314
methodCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5315
    "user clicked on a method category line - show selectors"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5316
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5317
    self switchToMethodCategory:(methodCategoryListView selectionValue string).
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5318
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5319
    "Modified: 22.10.1996 / 17:27:13 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5320
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5321
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5322
methodCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5323
    "method category selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5324
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5325
    self withWaitCursorDo:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5326
        currentMethod := currentSelector := nil.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5327
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5328
        self updateMethodList.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5329
        self updateCodeView.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5330
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5331
        currentMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5332
            methodCategoryListView setSelectElement:currentMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5333
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5334
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5335
        aspect isNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5336
            self setAcceptAndExplainActionsForMethod.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5337
        ].
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  5338
        (variableListView notNil
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  5339
        and:[variableListView hasSelection]) ifTrue:[
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  5340
            self hilightMethodsInMethodCategoryList:false inMethodList:true.
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  5341
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5342
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5343
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5344
    "Created: 23.11.1995 / 14:17:38 / cg"
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  5345
    "Modified: 23.10.1996 / 21:00:19 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5346
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5347
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5348
newMethodCategory:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5349
    |categories|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5350
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5351
    currentClass isNil ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5352
        ^ self warn:'select/create a class first'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5353
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5354
    categories := methodCategoryListView list.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5355
    categories isNil ifTrue:[categories := OrderedCollection new].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5356
    (categories includes:aString) ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5357
        categories add:aString.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5358
        categories sort.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5359
        methodCategoryListView contents:categories
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5360
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5361
    currentMethodCategory := aString.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5362
    aspect := nil.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5363
    self methodCategorySelectionChanged
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5364
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5365
    "Modified: 10.2.1996 / 13:07:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5366
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5367
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5368
switchToMethodCategory:aCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5369
    |oldSelector|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5370
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5371
    oldSelector := currentSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5372
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5373
    aspect := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5374
    (fullProtocol not and:[currentClass isNil]) ifTrue:[^ self].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5375
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5376
    currentMethodCategory := aCategory.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5377
    self methodCategorySelectionChanged.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5378
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5379
    "if there is only one method, show it right away"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5380
    methodListView list size == 1 ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5381
        methodListView setSelection:1.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5382
        self methodSelection:1
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5383
    ] ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5384
      oldSelector notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5385
          methodListView setSelectElement:oldSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5386
          methodListView hasSelection ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5387
              self methodSelection:methodListView selection.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5388
          ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5389
      ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5390
    ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5391
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5392
    "Modified: 26.5.1996 / 15:07:07 / cg"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5393
    "Created: 4.6.1996 / 23:03:50 / cg"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5394
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5395
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5396
updateMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5397
    self updateMethodCategoryListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5398
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5399
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5400
updateMethodCategoryListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5401
    |categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5402
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5403
    methodCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5404
        fullProtocol ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5405
            currentClassHierarchy notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5406
                categories := self listOfAllMethodCategoriesInFullProtocolHierarchy:actualClass 
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5407
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5408
        ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5409
            currentClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5410
                categories := self listOfAllMethodCategoriesInClass:actualClass
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5411
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5412
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5413
        methodCategoryListView list = categories ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5414
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5415
                methodCategoryListView contents:categories
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5416
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5417
                methodCategoryListView setContents:categories
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5418
            ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5419
            currentMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5420
                methodCategoryListView setSelectElement:currentMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5421
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5422
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5423
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5424
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5425
    "Modified: 26.5.1996 / 15:03:13 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5426
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5427
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5428
whenMethodCategorySelected:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5429
    self checkMethodCategorySelected ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5430
        self withWaitCursorDo:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5431
    ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5432
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5433
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5434
!BrowserView methodsFor:'method list menu'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5435
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5436
commonTraceHelperWith:aSelector
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  5437
    "install a break/trace or countPoint for the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  5438
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5439
    currentMethod := MessageTracer perform:aSelector with:currentMethod.
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5440
"/    self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5441
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5442
"/    (currentMethod notNil and:[currentMethod isWrapped not]) ifTrue:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5443
        Class withoutUpdatingChangesDo:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5444
            currentClass changed:#methodDictionary with:currentSelector.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5445
        ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5446
"/    ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5447
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5448
    "Modified: 22.10.1996 / 21:24:41 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5449
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5450
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5451
commonTraceHelperWith:aSelector with:argument
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5452
    "install a break/trace or countPoint for the current method"
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5453
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5454
    currentMethod := MessageTracer perform:aSelector with:currentMethod with:argument.
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5455
"/    self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5456
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5457
"/    (currentMethod notNil and:[currentMethod isWrapped not]) ifTrue:[
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5458
        Class withoutUpdatingChangesDo:[
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5459
            currentClass changed:#methodDictionary with:currentSelector.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5460
        ]
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5461
"/    ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5462
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5463
    "Created: 14.10.1996 / 15:37:57 / cg"
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5464
    "Modified: 22.10.1996 / 21:24:52 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5465
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5466
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5467
methodAproposSearch
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5468
    "launch an enterBox for a keyword search"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5469
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5470
    self askForSearchTitle:'keyword to search for (in selector & comment):' 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5471
                  openWith:#aproposSearch:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5472
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5473
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5474
    "Modified: 10.7.1996 / 12:48:29 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5475
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5476
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5477
methodBreakPoint
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5478
    "set a breakpoint on the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5479
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5480
    self commonTraceHelperWith:#trapMethod:
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5481
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5482
    "Modified: 15.12.1995 / 17:35:12 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5483
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5484
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5485
methodBreakPointInProcess
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5486
    "set a breakpoint on the current method, which only triggers if
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5487
     executed by some particular process."
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5488
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5489
    |processes processNames box|
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5490
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5491
    processes := ProcessorScheduler knownProcesses asOrderedCollection.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5492
    processes := processes select:[:aProcess |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5493
                        aProcess notNil 
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5494
                        and:[aProcess id notNil]
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5495
                 ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5496
    processes := processes sort:[:a :b | a id < b id].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5497
    processNames := processes collect:[:aProcess |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5498
                        aProcess id printString , ' -> ' , aProcess nameOrId
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5499
                    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5500
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5501
    "/ let user specify which one ...
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5502
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5503
    box := ListSelectionBox new.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5504
    box noEnterField.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5505
    box list:processNames.
766
40cc3873c426 box title
Claus Gittinger <cg@exept.de>
parents: 764
diff changeset
  5506
    box label:'process selection'.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5507
    box title:(resources string:('break if method is executed by process:\\(current = ' , Processor activeProcess id printString , ')') withCRs).
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5508
    box action:[:selection |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5509
        self commonTraceHelperWith:#trapMethod:inProcess: 
757
e11e8984a976 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 756
diff changeset
  5510
                              with:(processes at:box selectionIndex)
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5511
    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5512
    box showAtPointer.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5513
    box destroy
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5514
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5515
    "Created: 14.10.1996 / 15:40:53 / cg"
766
40cc3873c426 box title
Claus Gittinger <cg@exept.de>
parents: 764
diff changeset
  5516
    "Modified: 15.10.1996 / 12:51:28 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5517
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5518
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5519
methodChangeCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5520
    "move the current method into another category -
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5521
     nothing done here, but a query for the new category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5522
     Remember the last category, to allow faster category change of a group of methods."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5523
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5524
    |box txt|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5525
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5526
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5527
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5528
    actualClass isNil ifTrue:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5529
        box := self enterBoxTitle:'' okText:'change'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5530
    ] ifFalse:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5531
        |someCategories|
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5532
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5533
        someCategories := actualClass categories sort.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5534
        box := self listBoxTitle:'' okText:'change' list:someCategories.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5535
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5536
    box title:('change category from ''' , currentMethod category , ''' to:').
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5537
    lastMethodCategory isNil ifTrue:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5538
        txt := currentMethod category.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5539
    ] ifFalse:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5540
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5541
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5542
    box initialText:txt.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5543
    box action:[:aString |
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5544
                    |method|
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5545
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5546
                    lastMethodCategory := aString.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5547
                    method := currentMethod.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5548
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5549
                    method category:aString asSymbol.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5550
                    actualClass changed.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5551
                    method changed:#category.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5552
                    actualClass addChangeRecordForMethodCategory:method category:aString.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5553
                    self updateMethodCategoryListWithScroll:false.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5554
                    self updateMethodListWithScroll:false
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5555
               ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5556
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5557
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5558
    "Created: 29.10.1995 / 19:59:22 / cg"
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5559
    "Modified: 26.5.1996 / 12:47:10 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5560
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5561
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5562
methodDecompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5563
    "decompile the current methods bytecodes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5564
     The Decompiler is delivered as an extra, and not normally
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5565
     avaliable with the system."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5566
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5567
    |s|
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5568
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5569
    self checkMethodSelected ifFalse:[^ self].
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5570
    self checkSelectionChangeAllowed ifFalse:[^ self].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5571
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5572
    s := '' writeStream.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5573
    (currentMethod decompileTo:s) ifFalse:[
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5574
        self warn:'No decompiler available'.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5575
    ].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5576
    codeView contents:s contents.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5577
    codeView modified:false.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5578
    codeView acceptAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5579
    codeView explainAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5580
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5581
    "Modified: 16.4.1996 / 20:35:05 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5582
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5583
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5584
methodFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5585
    "file out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5586
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5587
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5588
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5589
    self busyLabel:'saving:' with:currentSelector.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5590
    Class fileOutErrorSignal handle:[:ex |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5591
        self warn:'cannot create: %1' with:ex parameter.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5592
        ex return
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5593
    ] do:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5594
        actualClass fileOutMethod:currentMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5595
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5596
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5597
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5598
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5599
methodGlobalReferends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5600
    "launch an enterBox for global symbol to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5601
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5602
    self askForSearchTitle:'global variable to search users of:' 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5603
                  openWith:#browseReferendsOf:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5604
                isSelector:false
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5605
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5606
"/    self enterBoxForBrowseTitle:'global variable to browse users of:'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5607
"/                         action:[:aString | 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5608
"/                                    SystemBrowser browseReferendsOf:aString asSymbol
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5609
"/                                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5610
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5611
    "Modified: 10.7.1996 / 10:37:37 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5612
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5613
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5614
methodImplementors
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5615
    "launch an enterBox for selector to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5616
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5617
    self askForSearchTitle:'selector to browse implementors of:' 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5618
                  openWith:#browseImplementorsOf:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5619
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5620
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5621
    "Modified: 10.7.1996 / 12:40:07 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5622
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5623
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5624
methodInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5625
    "inspect  the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5626
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5627
    self checkMethodSelected ifFalse:[^ self].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5628
    currentMethod inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5629
"/    (actualClass compiledMethodAt:currentSelector) inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5630
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5631
    "Modified: 4.6.1996 / 22:47:27 / cg"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5632
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5633
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5634
methodLocalSuperSends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5635
    "launch a browser showing super sends in current class & subclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5636
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5637
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5638
    self withSearchCursorDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5639
        SystemBrowser browseSuperCallsUnder:currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5640
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5641
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5642
    "Created: 23.11.1995 / 12:03:57 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5643
    "Modified: 23.11.1995 / 14:12:15 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5644
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5645
289
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5646
methodMakeIgnored
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5647
    "make the current method be invisible.
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5648
     EXPERIMENTAL"
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5649
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5650
    self methodPrivacy:#ignored
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5651
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5652
    "Created: 13.12.1995 / 13:59:59 / cg"
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5653
!
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  5654
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5655
methodMakePrivate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5656
    "make the current method private.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5657
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5658
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5659
    self methodPrivacy:#private 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5660
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5661
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5662
methodMakeProtected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5663
    "make the current method protected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5664
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5665
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5666
    self methodPrivacy:#protected 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5667
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5668
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5669
methodMakePublic
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5670
    "make the current method public.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5671
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5672
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5673
    self methodPrivacy:#public 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5674
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5675
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5676
methodMenu
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5677
    "return a popupmenu as appropriate for the methodList"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5678
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5679
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg #Cmdt #Cmda) >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  5680
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5681
    |specialMenu m labels selectors shorties
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5682
     newLabels newSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5683
     mthdLabels mthdSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5684
     brkLabels brkSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5685
     fileLabels fileSelectors
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5686
     searchLabels searchSelectors searchShorties
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5687
     sepLocalLabels sepLocalSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5688
     localSearchLabels localSearchSelectors|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5689
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5690
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5691
        currentMethod isWrapped ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5692
            (MessageTracer isCountingMemoryUsage:currentMethod) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5693
                brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5694
                                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5695
                                    'stop mem usage' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5696
                              ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5697
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5698
                brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5699
                                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5700
                                    methodStopMemoryUsage
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5701
                                 )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5702
            ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5703
                (MessageTracer isCounting:currentMethod) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5704
                    brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5705
                                        '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5706
                                        'stop counting' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5707
                                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5708
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5709
                    brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5710
                                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5711
                                        methodStopCounting
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5712
                                     )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5713
                ] ifFalse:[
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5714
                    (MessageTracer isTiming:currentMethod) ifTrue:[
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5715
                        brkLabels := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5716
                                            '-'
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5717
                                            'stop timing' 
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5718
                                      ).
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5719
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5720
                        brkSelectors := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5721
                                            nil
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5722
                                            methodStopTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5723
                                         )
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5724
                    ] ifFalse:[
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5725
                        brkLabels := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5726
                                            '-'
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5727
                                            'remove break/trace' 
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5728
                                      ).
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5729
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5730
                        brkSelectors := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5731
                                            nil
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5732
                                            methodRemoveBreakOrTrace
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5733
                                         )
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5734
                    ]
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5735
                ]
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5736
            ]
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5737
        ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5738
            brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5739
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5740
                                'breakpoint' 
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5741
                                'breakpoint in ...' 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5742
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5743
                                'trace' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5744
                                'trace sender' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5745
                                'trace full walkback' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5746
                                '-'
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5747
                                'start timing'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5748
                                'start counting'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5749
                                'start mem usage'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5750
                          ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5751
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5752
            brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5753
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5754
                                methodBreakPoint
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5755
                                methodBreakPointInProcess
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5756
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5757
                                methodTrace
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5758
                                methodTraceSender
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5759
                                methodTraceFull
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5760
                                nil
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5761
                                methodStartTiming
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5762
                                methodStartCounting
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5763
                                methodStartMemoryUsage
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5764
                             )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5765
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5766
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5767
        Method methodPrivacySupported ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5768
            labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5769
                            'inspect method'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5770
                            'compile to machine code'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5771
                            'decompile'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5772
                            '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5773
                            'make public'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5774
                            'make private'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5775
                            'make protected'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5776
                            'make ignored'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5777
                       ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5778
            selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5779
                            methodInspect
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5780
                            methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5781
                            methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5782
                            nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5783
                            methodMakePublic
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5784
                            methodMakePrivate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5785
                            methodMakeProtected
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5786
                            methodMakeIgnored
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5787
                          )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5788
        ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5789
            labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5790
                            'inspect method'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5791
                            'compile to machine code'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5792
                            'decompile'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5793
                       ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5794
            selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5795
                            methodInspect
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5796
                            methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5797
                            methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5798
                          )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5799
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5800
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5801
        labels := labels , brkLabels.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5802
        selectors := selectors , brkSelectors.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5803
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5804
        specialMenu := PopUpMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5805
                            labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5806
                            selectors:selectors.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5807
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5808
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5809
    device ctrlDown ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5810
        currentMethod isNil ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5811
            methodListView flash.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5812
            ^ nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5813
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5814
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5815
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5816
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5817
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5818
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5819
    sepLocalLabels := sepLocalSelectors := #().
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5820
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5821
    searchLabels := #(
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5822
                                'senders ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5823
                                'implementors ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5824
                                'globals ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5825
                                'string search ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5826
                                'apropos ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5827
                    ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5828
    searchSelectors := #(
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5829
                                methodSenders
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5830
                                methodImplementors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5831
                                methodGlobalReferends
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5832
                                methodStringSearch
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5833
                                methodAproposSearch
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5834
                        ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5835
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5836
    searchShorties := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5837
                                Cmds
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5838
                                Cmdi
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5839
                                Cmdg
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5840
                                Cmdt
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5841
                                Cmda
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5842
                       ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5843
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5844
"/    currentClass notNil ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5845
"/        localSearchLabels := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5846
"/                                '-'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5847
"/                                'local senders ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5848
"/                                'local implementors ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5849
"/                                'local super sends ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5850
"/                                'local string search ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5851
"/                                'local apropos ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5852
"/                            ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5853
"/        localSearchSelectors := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5854
"/                                nil
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5855
"/                                methodLocalSenders
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5856
"/                                methodLocalImplementors
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5857
"/                                methodLocalSuperSends
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5858
"/                                methodLocalStringSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5859
"/                                methodLocalAproposSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5860
"/                              ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5861
"/    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5862
"/        localSearchLabels := localSearchSelectors := #()
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5863
"/    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5864
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5865
    currentMethodCategory notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5866
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5867
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5868
        newLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5869
                                'new method' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5870
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5871
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5872
        newSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5873
                                methodNewMethod
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5874
                             ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5875
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5876
        newLabels := newSelectors := #()
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5877
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5878
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5879
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5880
        fileLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5881
                                'fileOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5882
                                'printOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5883
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5884
                                'SPAWN_METHOD'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5885
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5886
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5887
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5888
        fileSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5889
                                methodFileOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5890
                                methodPrintOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5891
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5892
                                methodSpawn
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5893
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5894
                             ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5895
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5896
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5897
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5898
        mthdLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5899
                                'change category ...' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5900
                                'move ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5901
                                'remove'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5902
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5903
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5904
        mthdSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5905
                                methodChangeCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5906
                                methodMove
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5907
                                methodRemove
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5908
                             ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5909
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5910
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5911
        fileLabels := fileSelectors := #().
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5912
        mthdLabels := mthdSelectors := #().
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5913
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5914
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5915
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5916
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5917
    labels :=
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5918
                fileLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5919
                searchLabels ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5920
"/                localSearchLabels ,
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5921
                sepLocalLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5922
                newLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5923
                mthdLabels.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5924
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5925
    selectors :=
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5926
                fileSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5927
                searchSelectors ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5928
"/                localSearchSelectors ,
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5929
                sepLocalSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5930
                newSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5931
                mthdSelectors .
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5932
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5933
    shorties := (Array new:(fileSelectors size))
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5934
                , searchShorties
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5935
                , (Array new:(localSearchSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5936
                              + sepLocalSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5937
                              + newSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5938
                              + mthdSelectors size)).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5939
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5940
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5941
    specialMenu notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5942
        labels := labels , #(
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
  5943
                        '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  5944
                        'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5945
                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5946
        selectors := selectors , #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5947
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5948
                        #otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5949
                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5950
        shorties := shorties , #( nil #'Ctrl')
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5951
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5952
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5953
    m := PopUpMenu
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5954
         labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5955
         selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5956
         accelerators:shorties.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5957
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5958
    specialMenu notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5959
        m subMenuAt:#otherMenu put:specialMenu.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5960
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5961
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5962
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5963
        currentMethod isPrivate ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5964
            m disable:#methodMakePrivate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5965
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5966
        currentMethod isProtected ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5967
            m disable:#methodMakeProtected
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5968
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5969
        currentMethod isPublic ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5970
            m disable:#methodMakePublic
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5971
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5972
        currentMethod isIgnored ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5973
            m disable:#methodMakeIgnored
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5974
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5975
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5976
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5977
        (currentMethod code notNil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5978
        or:[Compiler canCreateMachineCode not]) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5979
            m disable:#methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5980
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5981
        currentMethod byteCode isNil ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5982
            m disable:#methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5983
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5984
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5985
    ^ m
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5986
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5987
    "Created: 23.11.1995 / 12:02:29 / cg"
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  5988
    "Modified: 18.12.1995 / 16:20:07 / stefan"
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  5989
    "Modified: 26.10.1996 / 11:37:57 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5990
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5991
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5992
methodMove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5993
    "move the current method into another class; typically a superclass"
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5994
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5995
    |newClass newClassName|
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5996
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5997
    self checkMethodSelected ifFalse:[^ self].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5998
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  5999
    newClassName := Dialog 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6000
                    request:'move current method to which class:'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6001
                    initialAnswer:(currentClass superclass name)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6002
                    onCancel:nil.
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6003
    newClassName isNil ifTrue:[^ self].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6004
    newClass := Smalltalk classNamed:newClassName.
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6005
    newClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6006
        self warn:'no such class'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6007
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6008
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6009
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6010
    showInstance ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6011
        newClass isMeta ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6012
            newClass := newClass class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6013
        ]
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6014
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6015
    (newClass compile:(currentMethod source) classified:currentMethodCategory) isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6016
        self warn:'not moved - compilation failed due'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6017
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6018
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6019
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6020
    self methodRemove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6021
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6022
    "Created: 13.12.1995 / 10:56:42 / cg"
340
8b9971312f6a use request:onCancel: (cancel-value changed for ST-80 compat.)
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
  6023
    "Modified: 27.1.1996 / 14:33:30 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6024
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6025
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6026
methodNewMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6027
    "prepare for definition of a new method - put a template into
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6028
     code view and define accept-action to compile it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6029
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6030
    currentClass isNil ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6031
        ^ self warn:'select/create a class first'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6032
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6033
    currentMethodCategory isNil ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6034
        ^ self warn:'select/create a method category first'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6035
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6036
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6037
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6038
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6039
    methodListView setSelection:nil.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6040
    codeView contents:(self methodTemplate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6041
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6042
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6043
    self setAcceptAndExplainActionsForMethod.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6044
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6045
    "Modified: 25.5.1996 / 13:02:44 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6046
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6047
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6048
methodPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6049
    "print out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6050
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6051
    |printStream|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6052
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6053
    self checkMethodSelected ifFalse:[^ self].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6054
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6055
    printStream := Printer new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6056
    actualClass printOutSource:(currentMethod source) on:printStream.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6057
    printStream close
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6058
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6059
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6060
methodPrivacy:how
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6061
    "change the current methods privacy.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6062
     EXPERIMENTAL"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6063
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6064
    |cls m|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6065
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6066
    self checkMethodSelected ifFalse:[^ self].
289
a6133415c545 added methodIgnore; browse-menu-entry in method-list-browsers; update in full-class-brwsr; more on revisions; better compare with repository
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
  6067
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6068
    m := currentMethod.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6069
    m isWrapped ifTrue:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6070
        m := m originalMethod
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6071
    ].
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6072
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6073
    (how == m privacy ) ifFalse:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6074
        m privacy:how.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6075
        cls := currentMethod containingClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6076
        cls notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6077
            cls addChangeRecordForMethodPrivacy:currentMethod.
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6078
        ] ifFalse:[
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6079
            self warn:'cannot write change record (no class)'
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6080
        ].
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6081
"/        self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6082
        Class withoutUpdatingChangesDo:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6083
            currentClass changed:#methodDictionary with:currentSelector.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6084
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6085
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6086
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6087
    "Created: 29.10.1995 / 20:00:00 / cg"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6088
    "Modified: 1.11.1996 / 16:31:50 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6089
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6090
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6091
methodRemove
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6092
    "remove the current method"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6093
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6094
    |cls sel|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6095
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6096
    self checkMethodSelected ifFalse:[^ self].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6097
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6098
    cls := currentMethod containingClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6099
    cls notNil ifTrue:[
625
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6100
        sel := actualClass selectorAtMethod:currentMethod.
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6101
        sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6102
            cls removeSelector:sel
625
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6103
        ].
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6104
        currentMethod := currentSelector := nil.
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6105
        self updateMethodListWithScroll:false
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6106
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6107
        self warn:'cannot remove method (no class)'
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6108
    ]
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6109
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6110
    "Modified: 1.11.1996 / 16:32:59 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6111
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6112
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6113
methodRemoveBreakOrTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6114
    "turn off tracing of the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6115
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6116
    (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6117
        self commonTraceHelperWith:#unwrapMethod:
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6118
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6119
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6120
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6121
methodSTCCompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6122
    "compile the current method to machine code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6123
     This is not supported on all machines, and never supported in
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6124
     the demo version."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6125
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6126
    |prev|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6127
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6128
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6129
    prev := Compiler stcCompilation:#always.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6130
    [
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6131
        codeView accept.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6132
    ] valueNowOrOnUnwindDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6133
        Compiler stcCompilation:prev
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6134
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6135
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6136
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6137
methodSenders
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6138
    "launch an enterBox for selector to search for"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6139
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6140
    self askForSearchTitle:'selector to browse senders of:' 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6141
                  openWith:#browseAllCallsOn:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6142
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6143
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6144
    "Modified: 10.7.1996 / 10:33:29 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6145
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6146
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6147
methodSpawn
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6148
    "create a new SystemBrowser browsing current method,
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6149
     or if the current selection is of the form 'class>>selector', spawan
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6150
     a browser on that method."
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6151
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6152
    |s sel selSymbol clsName clsSymbol cls isMeta w|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6153
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6154
    classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6155
        s := classMethodListView selectionValue string.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6156
        clsName := self classFromClassMethodString:s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6157
        sel := self selectorFromClassMethodString:s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6158
        isMeta := false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6159
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6160
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6161
    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6162
        clsName := c.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6163
        sel := s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6164
        isMeta := m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6165
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6166
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6167
    (sel notNil and:[clsName notNil]) ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6168
        (clsName knownAsSymbol and:[sel knownAsSymbol]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6169
            clsSymbol := clsName asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6170
            (Smalltalk includesKey:clsSymbol) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6171
                cls := Smalltalk at:clsSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6172
                isMeta ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6173
                    cls := cls class
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6174
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6175
                cls isBehavior ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6176
                    cls := cls class
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6177
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6178
                cls isBehavior ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6179
                    selSymbol := sel asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6180
                    self withWaitCursorDo:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6181
                        (cls includesSelector:selSymbol) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6182
                            cls := cls class.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6183
                        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6184
                        (cls includesSelector:selSymbol) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6185
                            SystemBrowser browseClass:cls selector:selSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6186
                            ^ self
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6187
                        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6188
                        w := ' does not implement #' , sel
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6189
                    ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6190
                ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6191
                    w := ' is not a class'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6192
                ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6193
            ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6194
                w := ' is unknown'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6195
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6196
        ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6197
            w := ' and/or ' , sel , ' are unknown'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6198
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6199
        self warn:(clsName , w).
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6200
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6201
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6202
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6203
    self checkMethodSelected ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6204
        self warn:'select a method first'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6205
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6206
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6207
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6208
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6209
        w := currentMethod who.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6210
        SystemBrowser browseClass:(w methodClass) selector:(w methodSelector)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6211
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6212
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6213
    "Modified: 1.11.1996 / 16:20:29 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6214
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6215
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6216
methodStartCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6217
    "set a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6218
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6219
    self commonTraceHelperWith:#countMethod:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6220
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6221
    "Modified: 15.12.1995 / 10:53:59 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6222
    "Created: 15.12.1995 / 11:00:44 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6223
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6224
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6225
methodStartMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6226
    "set a countpoint for memory usage on the current method"
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6227
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6228
    self commonTraceHelperWith:#countMemoryUsageOfMethod:
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6229
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6230
    "Created: 18.12.1995 / 16:00:22 / stefan"
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6231
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6232
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6233
methodStartTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6234
    "set a timing on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6235
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6236
    self commonTraceHelperWith:#timeMethod:
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6237
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6238
    "Modified: 15.12.1995 / 10:53:59 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6239
    "Created: 17.6.1996 / 17:12:06 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6240
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6241
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6242
methodStopCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6243
    "show the number of invocations & remove a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6244
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6245
"/    self information:'called ' , (MessageTracer executionCountOfMethod:currentMethod) printString , ' times.'.
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6246
    self commonTraceHelperWith:#stopCountingMethod:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6247
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6248
    "Created: 15.12.1995 / 11:03:22 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6249
    "Modified: 15.12.1995 / 17:13:05 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6250
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6251
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6252
methodStopMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6253
    "stop counting of memory usage for this method"
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6254
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6255
"/    self information:'called ' , (MessageTracer executionCountOfMethod:currentMethod) printString , ' times.'.
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6256
    self commonTraceHelperWith:#stopCountingMemoryUsageOfMethod:
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6257
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6258
    "Created: 18.12.1995 / 16:02:02 / stefan"
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6259
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6260
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6261
methodStopTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6262
    "show the execution times on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6263
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6264
"/    self information:'called ' , (MessageTracer executionCountOfMethod:currentMethod) printString , ' times.'.
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6265
    self commonTraceHelperWith:#stopTimingMethod:
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6266
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6267
    "Modified: 15.12.1995 / 17:13:05 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6268
    "Created: 17.6.1996 / 17:12:27 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6269
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6270
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6271
methodStringSearch
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6272
    "launch an enterBox for string to search for"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6273
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6274
    self askForSearchTitle:'string to search for in sources:' 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6275
                  openWith:#browseForString:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6276
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6277
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6278
    "Modified: 10.7.1996 / 10:33:44 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6279
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6280
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6281
methodTrace
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6282
    "turn on tracing of the current method"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6283
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6284
    self commonTraceHelperWith:#traceMethod:
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6285
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6286
    "Modified: 15.12.1995 / 17:34:53 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6287
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6288
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6289
methodTraceFull
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6290
    "turn on tracing of the current method"
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6291
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6292
    self commonTraceHelperWith:#traceMethodFull:
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6293
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6294
    "Modified: 15.12.1995 / 10:52:58 / cg"
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6295
    "Created: 15.12.1995 / 18:20:33 / cg"
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6296
!
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6297
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6298
methodTraceSender
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6299
    "turn on tracing of the current method"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6300
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6301
    self commonTraceHelperWith:#traceMethodSender:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6302
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6303
    "Modified: 15.12.1995 / 17:34:58 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6304
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6305
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6306
!BrowserView methodsFor:'method stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6307
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6308
checkMethodSelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6309
    currentMethod isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6310
        self warn:'select a method first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6311
        ^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6312
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6313
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6314
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6315
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6316
listEntryForMethod:aMethod selector:selector
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6317
    "answer a method list entry 
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6318
     (gimmic: adding a little image to breakPointed methods)"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6319
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6320
    |s|
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6321
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6322
    s := aMethod printStringForBrowserWithSelector:selector.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6323
    aMethod isWrapped ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6324
        (s endsWith:' !!') ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6325
            s := s copyWithoutLast:2
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6326
        ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6327
        (MessageTracer isTrapped:aMethod) ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6328
            ^ LabelAndIcon icon:self stopIcon string:s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6329
        ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6330
        ^ LabelAndIcon icon:self traceIcon string:s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6331
    ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6332
    ^ s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6333
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6334
    "Created: 22.10.1996 / 19:51:00 / cg"
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6335
    "Modified: 22.10.1996 / 21:16:43 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6336
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6337
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6338
listOfAllSelectorsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6339
    "answer a list of all selectors in a given method category 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6340
     of the argument, aClass and its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6341
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6342
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6343
    |newList otherSelectors allCategories|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6344
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6345
    newList := Set new.
611
f3e973ecc846 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
  6346
    otherSelectors := IdentitySet new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6347
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6348
    allCategories := (aCategory = '* all *').
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6349
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6350
    self classesInFullProtocolHierarchy:aClass do:[:c |
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6351
        |searchCategory|
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6352
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6353
        (aCategory = '* no category *') ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6354
            searchCategory := nil
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6355
        ] ifFalse:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6356
            searchCategory := aCategory
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6357
        ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6358
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6359
        c methodDictionary keysAndValuesDo:[:selector :aMethod |
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6360
            (allCategories
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6361
             or:[aMethod category = searchCategory]) ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6362
                (otherSelectors includes:selector) ifFalse:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6363
                    newList add:(self listEntryForMethod:aMethod selector:selector)
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6364
                ].
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6365
            ] ifFalse:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6366
                otherSelectors add:selector
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6367
            ]
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6368
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6369
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6370
    (newList size == 0) ifTrue:[^ nil].
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6371
    ^ newList asOrderedCollection sort:[:a :b | a string < b string]
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6372
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6373
    "Modified: 5.6.1996 / 11:40:25 / stefan"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6374
    "Modified: 22.10.1996 / 19:58:16 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6375
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6376
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6377
listOfAllSelectorsInCategory:aCategory ofClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6378
    "answer a list of all selectors in a given method category 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6379
     of the argument, aClass"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6380
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6381
    |newList searchCategory all|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6382
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6383
    all := (aCategory = '* all *').
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6384
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6385
    (aCategory = '* no category *') ifTrue:[
480
c1b167926f12 ask method to present itself in methodList (for alien codeObjects)
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
  6386
        searchCategory := nil
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6387
    ] ifFalse:[
480
c1b167926f12 ask method to present itself in methodList (for alien codeObjects)
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
  6388
        searchCategory := aCategory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6389
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6390
    newList := OrderedCollection new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6391
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6392
    aClass methodDictionary keysAndValuesDo:[:selector :aMethod |
480
c1b167926f12 ask method to present itself in methodList (for alien codeObjects)
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
  6393
        (all or:[aMethod category = searchCategory]) ifTrue:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6394
            newList add:(self listEntryForMethod:aMethod selector:selector)
480
c1b167926f12 ask method to present itself in methodList (for alien codeObjects)
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
  6395
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6396
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6397
    (newList size == 0) ifTrue:[^ nil].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6398
    ^ newList sort:[:a :b | a string < b string]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6399
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6400
    "Modified: 28.8.1995 / 21:53:34 / claus"
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6401
    "Modified: 5.6.1996 / 11:42:51 / stefan"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6402
    "Modified: 22.10.1996 / 19:59:47 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6403
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6404
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6405
methodSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6406
    "user clicked on a method line - show code"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6407
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6408
    self switchToMethod:(methodListView selectionValue string).
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6409
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6410
    "Modified: 22.10.1996 / 16:06:44 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6411
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6412
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6413
methodSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6414
    "method selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6415
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6416
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6417
        |index cls|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6418
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6419
        aspect := nil.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6420
        self updateCodeView.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6421
        (currentMethod notNil and:[MessageTracer isCounting:currentMethod]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6422
            self updateMethodListWithScroll:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6423
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6424
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6425
        self setAcceptAndExplainActionsForMethod.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6426
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6427
        "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6428
         if there is any autoSearch string, do the search
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6429
        "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6430
        autoSearch notNil ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6431
            codeView searchFwd:autoSearch startingAtLine:1 col:0 ifAbsent:[]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6432
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6433
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6434
        fullProtocol ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6435
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6436
             remove any bold attribute from classList
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6437
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6438
            1 to:classListView list size do:[:i |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6439
                classListView attributeAt:i remove:#bold.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6440
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6441
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6442
             boldify the class where this method is implemented
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6443
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6444
            currentMethod notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6445
                cls := currentMethod containingClass.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6446
                index := classListView list indexOf:(cls name).
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6447
                (index == 0 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6448
                 and:[cls isMeta
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6449
                 and:[cls name endsWith:' class']]) ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6450
                    index := classListView list indexOf:(cls name copyWithoutLast:6).
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6451
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6452
                index ~~ 0 ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6453
                    classListView attributeAt:index add:#bold.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6454
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6455
                currentClass := acceptClass := cls.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6456
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6457
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6458
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6459
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6460
    "Created: 23.11.1995 / 14:17:44 / cg"
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6461
    "Modified: 17.6.1996 / 16:47:50 / stefan"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6462
    "Modified: 1.11.1996 / 16:33:17 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6463
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6464
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6465
methodTemplate
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6466
    "return a method definition template"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6467
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6468
    ^ 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6469
'message selector and argument names
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6470
    "comment stating purpose of this message"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6471
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6472
    |temporaries|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6473
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6474
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6475
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6476
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6477
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6478
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6479
     optional: comment giving example use
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6480
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6481
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6482
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6483
 change above template into real code.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6484
 Then `accept'' either via the menu 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6485
 or via the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6486
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6487
 You do not need this template; you can also
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6488
 select any existing methods code, change it,
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6489
 and finally `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6490
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6491
 Or clear this text, type in the method from scratch
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6492
 and install it with `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6493
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6494
'
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6495
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6496
    "Modified: 8.2.1996 / 13:45:58 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6497
    "Created: 8.2.1996 / 18:21:53 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6498
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6499
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6500
switchToAnyMethodNamed:matchString
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6501
    "switch (in the current classes hierarchy) to a method named matchString.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6502
     If there are more than one matches, switch to the first."
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6503
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6504
    |aSelector classToStartSearch classToSearch aClass nm idx|
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6505
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6506
    actualClass isNil ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6507
        currentClassHierarchy notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6508
            classToStartSearch := currentClassHierarchy
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6509
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6510
    ] ifFalse:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6511
        classToStartSearch := actualClass 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6512
    ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6513
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6514
    classToStartSearch notNil ifTrue:[
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6515
"/        showInstance ifFalse:[
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6516
"/            classToStartSearch := classToStartSearch class
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6517
"/        ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6518
        ((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6519
            classToSearch := classToStartSearch.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6520
            aClass := nil.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6521
            [classToSearch notNil and:[aClass isNil]] whileTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6522
                aSelector := classToSearch methodDictionary findFirstKey:[:element | matchString match:element].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6523
                aSelector notNil ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6524
                    aClass := classToSearch
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6525
                ] ifFalse:[
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6526
                    classToSearch := classToSearch superclass
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6527
                ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6528
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6529
        ] ifFalse:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6530
            aSelector := matchString asSymbolIfInterned.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6531
            aSelector notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6532
                aClass := classToStartSearch whichClassIncludesSelector:aSelector.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6533
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6534
        ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6535
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6536
        aClass notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6537
            nm := aClass name.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6538
"/            showInstance ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6539
"/                ((nm ~= 'Metaclass') and:[nm endsWith:' class']) ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6540
"/                    nm := nm copyWithoutLast:6 "copyTo:(nm size - 5)"
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6541
"/                ]
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6542
"/            ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6543
            aClass ~~ actualClass ifTrue:[
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6544
                self switchToClassNamed:nm.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6545
            ].    
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6546
            self switchToMethodNamed:aSelector "matchString".
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6547
            ^ self.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6548
        ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6549
    ].
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6550
    self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6551
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6552
    "Modified: 17.6.1996 / 16:52:36 / stefan"
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6553
    "Modified: 8.10.1996 / 22:06:01 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6554
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6555
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6556
switchToMethod:aString
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6557
    "user clicked on a method line - show code"
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6558
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6559
    |selectorString selectorSymbol|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6560
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6561
    (fullProtocol not and:[currentClass isNil]) ifTrue:[^ self].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6562
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6563
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6564
     kludge: extract real selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6565
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6566
    selectorString := aString withoutSpaces upTo:(Character space).
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6567
    selectorSymbol := selectorString asSymbolIfInterned.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6568
    selectorSymbol isNil ifTrue:[
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6569
        self beep.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6570
        ^ self
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6571
    ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6572
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6573
    fullProtocol ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6574
        currentMethod := currentSelector := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6575
        "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6576
         search which class implements the selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6577
        "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6578
        self classesInFullProtocolHierarchy:actualClass do:[:c |
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6579
            (currentMethod isNil 
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6580
             and:[c includesSelector:selectorSymbol]) ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6581
                currentSelector := selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6582
                currentMethod := c compiledMethodAt:selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6583
                acceptClass := c
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6584
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6585
        ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6586
    ] ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6587
        currentSelector := selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6588
        currentMethod := actualClass compiledMethodAt:selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6589
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6590
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6591
    methodCategoryListView notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6592
        currentMethod notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6593
            (currentMethodCategory = currentMethod category) ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6594
                currentMethodCategory := currentMethod category.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6595
                methodCategoryListView setSelectElement:currentMethodCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6596
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6597
        ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6598
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6599
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6600
    self methodSelectionChanged
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6601
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6602
    "Created: 4.6.1996 / 23:00:12 / cg"
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6603
    "Modified: 22.6.1996 / 16:46:18 / cg"
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6604
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6605
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6606
switchToMethodNamed:matchString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6607
    "switch (in the current class) to a method named matchString.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6608
     If there are more than one matches, switch to the first."
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6609
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6610
    |aSelector method cat classToSearch dict m idx|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6611
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6612
    currentClass notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6613
        classToSearch := actualClass.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6614
        dict := classToSearch methodDictionary.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6615
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6616
        ((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6617
            aSelector := dict findFirstKey:[:element | matchString match:element].       
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6618
            aSelector notNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6619
                method := dict at:aSelector.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6620
            ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6621
        ] ifFalse:[
650
bb426452251e Fix #switchToMethodNamed: -- select name in methodListView.
Stefan Vogel <sv@exept.de>
parents: 637
diff changeset
  6622
            aSelector := matchString.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6623
            method := dict at:matchString ifAbsent:[]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6624
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6625
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6626
        method notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6627
            cat := method category.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6628
            cat isNil ifTrue:[cat := '* all *'].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6629
            methodCategoryListView setSelectElement:cat.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6630
            currentMethodCategory := cat.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6631
            self updateMethodCategoryListWithScroll:false.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6632
            self methodCategorySelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6633
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6634
            currentMethod := method.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6635
            currentSelector := aSelector.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6636
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6637
            m := aSelector , '*(*)'.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6638
            idx := methodListView list findFirst:[:line |
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6639
                                                line = aSelector
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6640
                                                or:[m match:line]].
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6641
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6642
            methodListView setSelection:idx. "/ setSelectElement:aSelector.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6643
            self methodSelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6644
            ^ self
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6645
        ]
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6646
    ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6647
    self beep.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6648
650
bb426452251e Fix #switchToMethodNamed: -- select name in methodListView.
Stefan Vogel <sv@exept.de>
parents: 637
diff changeset
  6649
    "Modified: 28.6.1996 / 20:28:56 / stefan"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6650
    "Modified: 15.7.1996 / 11:44:11 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6651
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6652
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6653
updateMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6654
    self updateMethodListWithScroll:true keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6655
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6656
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6657
updateMethodListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6658
    self updateMethodListWithScroll:scroll keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6659
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6660
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6661
updateMethodListWithScroll:scroll keepSelection:keep
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6662
    |selectors scr first last selection|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6663
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6664
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6665
    methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6666
        selection := methodListView selection.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6667
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6668
        currentMethodCategory notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6669
            fullProtocol ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6670
                selectors := self listOfAllSelectorsInCategory:currentMethodCategory 
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6671
                                inFullProtocolHierarchyOfClass:actualClass
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6672
            ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6673
                selectors := self listOfAllSelectorsInCategory:currentMethodCategory
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6674
                                                       ofClass:actualClass
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6675
            ]
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6676
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6677
        scr := scroll.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6678
        first := methodListView firstLineShown.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6679
        first ~~ 1 ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6680
            last := methodListView lastLineShown.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6681
            selectors size <= (last - first + 1) ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6682
                scr := true
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6683
            ]
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6684
        ].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6685
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6686
        scr ifTrue:[
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  6687
            methodListView list: "contents:" selectors
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6688
        ] ifFalse:[
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  6689
            methodListView setList: "setContents:" selectors
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6690
        ].
802
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  6691
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  6692
        (variableListView notNil 
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  6693
        and:[variableListView hasSelection]) ifTrue:[
802
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  6694
            self hilightMethodsInMethodList.
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  6695
        ].
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  6696
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6697
        keep ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6698
            methodListView setSelection:selection.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6699
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6700
    ]
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6701
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6702
    "Modified: 18.12.1995 / 22:54:04 / stefan"
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  6703
    "Modified: 23.10.1996 / 21:00:52 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6704
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6705
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6706
!BrowserView methodsFor:'misc'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6707
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6708
instanceProtocol:aBoolean
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6709
    "switch between instance and class protocol"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6710
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6711
    |onToggle offToggle|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6712
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6713
    showInstance ~~ aBoolean ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6714
        self checkSelectionChangeAllowed ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6715
            instanceToggle notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6716
                aBoolean ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6717
                    offToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6718
                    onToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6719
                ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6720
                    onToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6721
                    offToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6722
                ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6723
                onToggle turnOn.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6724
                offToggle turnOff.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6725
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6726
            showInstance := aBoolean.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6727
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6728
            (variableListView notNil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6729
            and:[variableListView hasSelection]) ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6730
                self unhilightMethodCategories.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6731
                self unhilightMethods.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6732
                variableListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6733
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6734
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6735
            fullProtocol ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6736
                showInstance ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6737
                    actualClass := currentClassHierarchy.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6738
                ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6739
                    actualClass := currentClassHierarchy class.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6740
                ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6741
                acceptClass := actualClass.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6742
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6743
                self updateClassList.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6744
                self updateMethodCategoryListWithScroll:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6745
                self updateMethodListWithScroll:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6746
                self updateVariableList.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6747
                ^ self
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6748
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6749
            currentClass notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6750
                self classSelectionChanged
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6751
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6752
            codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6753
        ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6754
            aBoolean ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6755
                onToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6756
                offToggle := instanceToggle
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6757
            ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6758
                offToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6759
                onToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6760
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6761
            onToggle turnOn.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6762
            offToggle turnOff.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6763
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6764
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6765
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6766
    "Modified: 25.5.1996 / 13:02:41 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6767
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6768
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6769
processName
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6770
    "the name of my process - for the processMonitor only"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6771
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6772
    ^ 'System Browser'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6773
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6774
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  6775
showActivity:someMessage
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  6776
    "some activityNotification to be forwarded to the user;
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  6777
     show it in the windows title area here."
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  6778
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  6779
    self busyLabel:someMessage with:nil
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  6780
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  6781
    "Created: 16.12.1995 / 18:41:37 / cg"
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  6782
    "Modified: 23.4.1996 / 21:39:24 / cg"
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  6783
!
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  6784
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6785
updateCodeView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6786
    |code|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6787
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6788
    aspect == #hierarchy ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6789
        ^ self classHierarchy
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6790
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6791
    aspect == #classInstVars ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6792
        ^ self classClassInstVars
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6793
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6794
    aspect == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6795
        ^ self classComment
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6796
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6797
    aspect == #primitiveDefinitions ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6798
        ^ self classPrimitiveDefinitions
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6799
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6800
    aspect == #primitiveFunctions ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6801
        ^ self classPrimitiveFunctions
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6802
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6803
    aspect == #primitiveVariables ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6804
        ^ self classPrimitiveVariables
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6805
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6806
    aspect == #revisionInfo ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6807
        ^ self classRevisionInfo
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6808
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6809
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6810
    fullClass ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6811
        currentClass notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6812
            code := currentClass source.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6813
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6814
    ] ifFalse:[
441
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  6815
        aspect == #definition ifTrue:[
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  6816
            ^ self classDefinition
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  6817
        ].
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  6818
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6819
        currentMethod notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6820
            (codeView acceptAction isNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6821
            and:[actualClass notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6822
            and:[currentMethodCategory notNil]]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6823
                self setAcceptAndExplainActionsForMethod.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6824
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6825
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6826
            code := currentMethod source.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6827
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6828
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6829
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6830
    codeView contents:code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6831
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6832
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6833
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6834
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6835
    "Created: 23.11.1995 / 14:16:43 / cg"
442
30b20fd70dd5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
  6836
    "Modified: 21.3.1996 / 21:23:26 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6837
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6838
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6839
!BrowserView methodsFor:'private'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6840
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6841
askAndBrowseMethodCategory:title action:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6842
    "convenient method: setup enterBox with initial being current method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6843
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6844
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6845
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6846
    box := self enterBoxTitle:title okText:'browse'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6847
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6848
    sel isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6849
        currentMethodCategory notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6850
            sel := currentMethodCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6851
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6852
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6853
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6854
        box initialText:(sel asString withoutSpaces)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6855
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6856
    box action:[:aString | self withWaitCursorDo:[aBlock value:aString]].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6857
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6858
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6859
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6860
askForMethodCategory
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  6861
    |someCategories box txt retVal|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6862
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6863
    someCategories := actualClass categories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6864
    box := self listBoxTitle:'accept in which method category ?' okText:'accept' list:someCategories.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6865
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6866
    lastMethodCategory isNil ifTrue:[
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  6867
        txt := 'new methods'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6868
    ] ifFalse:[
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  6869
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6870
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6871
    box initialText:txt.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  6872
    box action:[:aString | aString notEmpty ifTrue:[retVal := aString] ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6873
    box showAtPointer.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  6874
    ^ retVal
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  6875
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  6876
    "Modified: 27.3.1996 / 15:33:46 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6877
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6878
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6879
askForSearchSelectorTitle:title openWith:aSelector
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6880
    "convenient method: setup enterBox with text from codeView or selected
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6881
     method for browsing based on a selector. Set action and launch box"
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6882
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6883
    ^ self askForSearchTitle:title openWith:aSelector isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6884
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6885
    "Modified: 10.7.1996 / 10:32:25 / cg"
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6886
!
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6887
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6888
askForSearchTitle:title openWith:aSelector isSelector:isSelector
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6889
    "convenient method: setup enterBox with text from codeView or selected
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6890
     method for browsing based on a selector. Set action and launch box"
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6891
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  6892
    |box grp panel selectorHolder where whereChannel b sel classes|
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6893
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6894
    isSelector ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6895
        selectorHolder := (self selectorToSearchFor) asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6896
    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6897
        selectorHolder := (self stringToSearchFor) asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6898
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6899
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6900
    box := Dialog new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6901
    (box addTextLabel:(resources string:title)) adjust:#left.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6902
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6903
    (box addInputFieldOn:(selectorHolder) tabable:true) selectAll.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6904
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6905
    (currentClassCategory notNil or:[currentClass notNil]) ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6906
        box addHorizontalLine.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6907
        box addVerticalSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6908
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6909
        (box addTextLabel:(resources string:'search in:')) adjust:#left.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6910
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6911
        panel := VerticalPanelView "HorizontalPanelView" new.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6912
        panel horizontalLayout:#fitSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6913
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6914
        grp := RadioButtonGroup new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6915
        b := CheckBox "RadioButton" label:(resources string:'everywhere').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6916
        panel add:b. grp add:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6917
        box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6918
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6919
        currentClassCategory notNil ifTrue:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6920
            b := CheckBox "RadioButton" label:(resources string:'class category').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6921
            panel add:b. grp add:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6922
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6923
        ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6924
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6925
        currentClass notNil ifTrue:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6926
            b := CheckBox "RadioButton" label:(resources string:'class').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6927
            panel add:b.grp add:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6928
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6929
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6930
            b := CheckBox "RadioButton" label:(resources string:'class & subclasses').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6931
            panel add:b. grp add:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6932
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6933
        ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6934
        grp value:1.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6935
        whereChannel := grp valueChannel.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6936
        box addComponent:panel indent:0.  "/ panel has its own idea of indenting
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6937
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6938
        box addVerticalSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6939
        box addHorizontalLine.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6940
    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6941
        whereChannel := 1 asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6942
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6943
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6944
    box addAbortButton.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6945
    box addOkButtonLabelled:(resources string:'browse').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6946
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6947
    box label:'Search'.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6948
    box open.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6949
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6950
    box accepted ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6951
        sel := selectorHolder value.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6952
        where := whereChannel value.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6953
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6954
        where == 1 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6955
            classes := Smalltalk allClasses.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6956
        ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6957
            where == 2 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6958
                classes := Smalltalk allClassesInCategory:currentClassCategory
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6959
            ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6960
                where == 3 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6961
                    classes := Array with:currentClass
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6962
                ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6963
                    classes := currentClass withAllSubclasses
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6964
                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6965
            ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6966
        ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6967
        self withSearchCursorDo:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6968
            SystemBrowser perform:aSelector with:sel with:classes
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6969
        ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6970
    ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6971
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6972
    "Created: 10.7.1996 / 10:31:29 / cg"
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  6973
    "Modified: 10.9.1996 / 14:05:45 / cg"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6974
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6975
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6976
busyLabel:what with:someArgument
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6977
    "set the title for some warning"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6978
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6979
    self label:('System Browser - ' , (resources string:what with:someArgument))
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6980
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6981
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  6982
checkSelectionChangeAllowed
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  6983
    "return true, if selection change is ok;
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  6984
     its not ok, if code has been changed.
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  6985
     in this case, return the result of a user query"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  6986
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  6987
    |what m src v|
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  6988
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  6989
    codeView modified ifFalse:[
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  6990
        ^ true
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  6991
    ].
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  6992
387
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  6993
    (currentMethod notNil and:[actualClass notNil]) ifTrue:[
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  6994
        self withWaitCursorDo:[
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  6995
            m := actualClass compiledMethodAt:currentSelector.
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  6996
            m notNil ifTrue:[
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  6997
                (src := m source) = codeView contents ifFalse:[
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  6998
                    what := self checkSelectionChangeAllowedWithCompare:true.
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  6999
                    what == #compare ifTrue:[
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7000
                        v := DiffTextView 
823
08eda73555b4 more strings nationalized
Claus Gittinger <cg@exept.de>
parents: 818
diff changeset
  7001
                                openOn:codeView contents 
08eda73555b4 more strings nationalized
Claus Gittinger <cg@exept.de>
parents: 818
diff changeset
  7002
                                label:(resources string:'code here (to be accepted ?)')
08eda73555b4 more strings nationalized
Claus Gittinger <cg@exept.de>
parents: 818
diff changeset
  7003
                                and:src 
08eda73555b4 more strings nationalized
Claus Gittinger <cg@exept.de>
parents: 818
diff changeset
  7004
                                label:(resources string:'methods actual code').
08eda73555b4 more strings nationalized
Claus Gittinger <cg@exept.de>
parents: 818
diff changeset
  7005
                        v label:(resources string:'comparing method versions').
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7006
                        ^ false
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7007
                    ].
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7008
                    ^ what
449
94b665bf02f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
  7009
                ] ifTrue:[
94b665bf02f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 447
diff changeset
  7010
                    ^ true
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7011
                ]
387
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7012
            ]
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7013
        ]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7014
    ].
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7015
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7016
    ^ self checkSelectionChangeAllowedWithCompare:false
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7017
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7018
    "Created: 24.11.1995 / 11:03:33 / cg"
823
08eda73555b4 more strings nationalized
Claus Gittinger <cg@exept.de>
parents: 818
diff changeset
  7019
    "Modified: 1.11.1996 / 12:25:20 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7020
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7021
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7022
checkSelectionChangeAllowedWithCompare:compareOffered
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7023
    "return true, if selection change is ok;
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7024
     its not ok, if code has been changed.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7025
     in this case, return the result of a user query"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7026
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7027
    |action labels values|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7028
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7029
    codeView modified ifFalse:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7030
        ^ true
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7031
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7032
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7033
    compareOffered ifTrue:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7034
        labels := #('cancel' 'compare' 'accept' 'continue').
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7035
        values := #(false #compare #accept true).
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7036
    ] ifFalse:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7037
        labels := #('cancel' 'accept' 'continue').
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7038
        values := #(false #accept true).
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7039
    ].
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7040
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7041
    action := OptionBox 
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7042
                  request:(resources at:'text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7043
                  label:(resources string:'Attention')
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7044
                  form:(WarningBox iconBitmap)
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7045
                  buttonLabels:(resources array:labels)
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7046
                  values:values
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7047
                  default:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7048
    action ~~ #accept ifTrue:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7049
        ^ action
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7050
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7051
    codeView accept. 
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7052
    ^ true
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7053
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7054
    "Created: 24.11.1995 / 10:54:46 / cg"
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7055
    "Modified: 20.2.1996 / 20:47:51 / cg"
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7056
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7057
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7058
classHierarchyOf:topClass do:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7059
    "eavluate the 2-arg block for every class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7060
     starting at Object; passing class and nesting level to the block."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7061
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7062
    |classes s classDict l|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7063
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7064
    classes := Smalltalk allClasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7065
    classDict := IdentityDictionary new:classes size.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7066
    classes do:[:aClass |
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7067
        s := aClass superclass.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7068
        s notNil ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7069
            l := classDict at:s ifAbsent:[nil].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7070
            l isNil ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7071
                l := OrderedCollection new:5.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7072
                classDict at:s put:l
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7073
            ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7074
            l add:aClass
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7075
        ]
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7076
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7077
    self classHierarchyOf:topClass level:0 do:aBlock using:classDict
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7078
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7079
    "Created: 28.5.1996 / 13:46:23 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7080
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7081
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7082
classHierarchyOf:aClass level:level do:aBlock using:aDictionary
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7083
    "evaluate the 2-arg block for every subclass of aClass,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7084
     passing class and nesting level to the block."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7085
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7086
    |names subclasses|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7087
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7088
    aBlock value:aClass value:level.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7089
    subclasses := aDictionary at:aClass ifAbsent:[nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7090
    (subclasses size == 0) ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7091
        names := subclasses collect:[:class | class name].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7092
        names sortWith:subclasses.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7093
        subclasses do:[:aSubClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7094
            self classHierarchyOf:aSubClass level:(level + 1) do:aBlock using:aDictionary
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7095
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7096
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7097
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7098
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7099
classesInFullProtocolHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7100
    "evaluate aBlock for all non-striked out classes in
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7101
     the hierarchy"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7102
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7103
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7104
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7105
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7106
    aClass withAllSuperclasses do:[:c |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7107
        (classListView isInSelection:index) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7108
            aBlock value:c
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7109
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7110
        index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7111
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7112
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7113
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7114
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7115
classesInHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7116
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7117
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7118
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7119
    aClass withAllSuperclasses do:[:c |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7120
        (classListView isInSelection:index) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7121
            aBlock value:c
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7122
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7123
        index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7124
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7125
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7126
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7127
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7128
compileCode:someCode
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7129
    (ReadStream on:someCode) fileIn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7130
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7131
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7132
enterBoxForBrowseTitle:title action:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7133
    "convenient method: setup enterBox with text from codeView or selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7134
     method for method browsing based on className/variable"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7135
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7136
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7137
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7138
    box := self enterBoxTitle:title okText:'browse'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7139
    box initialText:(self stringToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7140
    box action:[:aString | 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7141
        aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7142
            self withWaitCursorDo:[aBlock value:aString]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7143
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7144
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7145
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7146
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7147
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7148
enterBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7149
    "convenient method: setup enterBox with text from codeview"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7150
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7151
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7152
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7153
    box := self enterBoxTitle:(resources string:title) okText:(resources string:okText).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7154
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7155
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7156
        box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7157
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7158
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7159
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7160
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7161
enterBoxForSearchSelectorTitle:title
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7162
    "convenient method: setup enterBox with text from codeView or selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7163
     method for browsing based on a selector"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7164
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7165
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7166
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7167
    box := self enterBoxTitle:title okText:'search'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7168
    box initialText:(self selectorToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7169
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7170
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7171
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7172
enterBoxTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7173
    "convenient method: setup enterBox"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7174
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7175
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7176
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7177
    box := EnterBox new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7178
    box title:(resources string:title) okText:(resources string:okText).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7179
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7180
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7181
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7182
extractClassAndSelectorFromSelectionInto:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7183
    "given a string which can be either 'class>>sel' or
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7184
     'class sel', extract className and selector, and call aBlock with
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7185
    the result."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7186
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7187
    |sel clsName isMeta sep s|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7188
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7189
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7190
    sel notNil ifTrue:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7191
        sel := sel asString withoutSeparators.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7192
        ('*>>*' match:sel) ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7193
            sep := $>
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7194
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7195
            ('* *' match:sel) ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7196
                sep := Character space
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7197
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7198
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7199
        sep notNil ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7200
            "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7201
             extract class/sel from selection
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7202
            "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7203
            s := ReadStream on:sel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7204
            clsName := s upTo:sep.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7205
            [s peek == sep] whileTrue:[s next].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7206
            sel := s upToEnd.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7207
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7208
            (clsName endsWith:' class') ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7209
                isMeta := true.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7210
                clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7211
            ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7212
                isMeta := false
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7213
            ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7214
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7215
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7216
    aBlock value:clsName value:sel value:isMeta
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7217
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7218
    "Modified: 17.6.1996 / 16:52:14 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7219
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7220
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7221
findClassOfVariable:aVariableName accessWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7222
    "this method returns the class, in which a variable
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7223
     is defined; 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7224
     needs either #instVarNames or #classVarNames as aSelector."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7225
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7226
    |cls homeClass|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7227
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7228
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7229
     first, find the class, where the variable is declared
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7230
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7231
    cls := currentClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7232
    [cls notNil] whileTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7233
        ((cls perform:aSelector) includes:aVariableName) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7234
            homeClass := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7235
            cls := nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7236
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7237
            cls := cls superclass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7238
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7239
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7240
    homeClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7241
        "nope, must be one below ... (could optimize a bit, by searching down
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7242
         for the declaring class ...
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7243
        "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7244
        homeClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7245
    ] ifFalse:[
552
c61c0758c10b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 547
diff changeset
  7246
"/        Transcript showCR:'starting search in ' , homeClass name.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7247
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7248
    ^ homeClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7249
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7250
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7251
listBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7252
    "convenient method: setup listBox with text from codeview"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7253
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7254
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7255
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7256
    box := self listBoxTitle:title okText:okText list:nil. 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7257
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7258
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7259
        box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7260
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7261
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7262
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7263
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7264
listBoxTitle:title okText:okText list:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7265
    "convenient method: setup a listBox & return it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7266
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7267
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7268
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7269
    box := ListSelectionBox 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7270
                title:(resources string:title)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7271
                okText:(resources string:okText)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7272
                action:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7273
    box list:aList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7274
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7275
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7276
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7277
normalLabel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7278
    "set the normal (inactive) window- and icon labels"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7279
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7280
    |l il|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7281
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7282
    myLabel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7283
        "if I have been given an explicit label,
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7284
         and its not the default, take that one"
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7285
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7286
        myLabel ~= 'System Browser' ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7287
            l := il := myLabel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7288
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7289
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7290
    l isNil ifTrue:[    
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7291
        l := resources string:'System Browser'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7292
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7293
        currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7294
            l := l, ': ', currentClass name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7295
            classListView isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7296
                currentSelector notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7297
                    l := l , ' ' ,  currentSelector
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7298
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7299
            ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7300
            il := currentClass name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7301
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7302
            il := l.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7303
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7304
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7305
    self label:l.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7306
    self iconLabel:il.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7307
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7308
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7309
releaseClass
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7310
    |cls meta|
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7311
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7312
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7313
        cls := currentClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7314
        cls isMeta ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7315
            meta := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7316
            cls := meta soleInstance
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7317
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7318
            meta := cls class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7319
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7320
        cls removeDependent:self.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7321
        meta removeDependent:self.
287
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7322
    ].
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7323
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7324
    "Created: 13.12.1995 / 15:32:21 / cg"
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7325
!
b578810b0ec4 update-notification in full-class mode; more revision stuff; dont modify method-source for brk/tracePoints
Claus Gittinger <cg@exept.de>
parents: 285
diff changeset
  7326
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7327
selectorToSearchFor
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7328
    "look in codeView and methodListView for a search-string when searching for selectors"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7329
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7330
    |sel t|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7331
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7332
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7333
    sel notNil ifTrue:[
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7334
        sel := sel asString.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7335
        t := Parser selectorInExpression:sel.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7336
        t notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7337
            sel := t
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7338
        ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7339
        sel := sel withoutSpaces.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7340
        sel == #>> ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7341
            "oops - thats probably not what we want here ..."
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7342
            self extractClassAndSelectorFromSelectionInto:[:c :s :m |
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7343
                sel := s
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7344
            ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7345
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7346
    ] ifFalse:[
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7347
        methodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7348
            methodListView selection notNil ifTrue:[
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7349
                sel := methodListView selectionValue string
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7350
            ]
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7351
        ] ifFalse:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7352
            classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7353
                classMethodListView selection notNil ifTrue:[
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7354
                    sel := classMethodListView selectionValue string.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7355
                ].
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7356
                sel notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7357
                    sel := self selectorFromClassMethodString:sel
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7358
                ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7359
            ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7360
        ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7361
        sel notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7362
            sel := sel withoutSpaces upTo:(Character space)
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7363
        ] ifFalse:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7364
            sel := ''
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7365
        ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7366
    ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7367
    ^ sel string
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7368
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7369
    "Modified: 22.10.1996 / 17:29:53 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7370
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7371
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7372
setAcceptAndExplainActionsForMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7373
    "tell the codeView what to do on accept and explain"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7374
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7375
    codeView acceptAction:[:theCode |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7376
        |cat cls|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7377
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7378
        codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7379
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7380
        (cat := currentMethodCategory) = '* all *' ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7381
            "must check from which category this code came from ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7382
             ... thanks to Arno for pointing this out"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7383
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7384
            cat := self askForMethodCategory.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7385
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7386
        (cat notNil and:[cat notEmpty]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7387
            fullProtocol ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7388
                cls := acceptClass "/actualClass whichClassIncludesSelector:currentSelector.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7389
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7390
            cls isNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7391
                cls := actualClass
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7392
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7393
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7394
            Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7395
                lockUpdates := true.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7396
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7397
                actualClass compilerClass 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7398
                    compile:theCode asString
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7399
                    forClass:cls
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7400
                    inCategory:cat 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7401
                    notifying:codeView.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7402
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7403
                codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7404
                self updateMethodListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7405
                currentMethod := actualClass compiledMethodAt:currentSelector.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7406
                self normalLabel.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7407
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7408
            lockUpdates := false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7409
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7410
        codeView cursor:Cursor normal.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7411
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7412
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7413
    codeView explainAction:[:theCode :theSelection |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7414
        self showExplanation:(Explainer 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7415
                                explain:theSelection 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7416
                                in:theCode
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7417
                                forClass:actualClass)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7418
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7419
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7420
    "Modified: 8.2.1996 / 18:19:47 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7421
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7422
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7423
setDoitActionForClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7424
    "tell the codeView what to do on doIt"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7425
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7426
    "set self for doits. This allows accessing the current class
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7427
     as self, and access to the class variables by name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7428
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7429
    codeView doItAction:[:theCode |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7430
        |compiler|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7431
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7432
        currentClass isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7433
            compiler := Compiler
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7434
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7435
            compiler := currentClass evaluatorClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7436
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7437
        compiler 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7438
            evaluate:theCode 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7439
            in:nil 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7440
            receiver:currentClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7441
            notifying:codeView 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7442
            logged:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7443
            ifFail:nil 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7444
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7445
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7446
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7447
setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7448
    codeView setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7449
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7450
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7451
showExplanation:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7452
    "show explanation from Parser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7453
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7454
    self information:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7455
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7456
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7457
stopIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7458
    "answer an icon to mark breakPointed methods"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7459
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7460
    |stopIcon|
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7461
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7462
    StopIcon notNil ifTrue:[^ StopIcon].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7463
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7464
    stopIcon := (Form width:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7465
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7466
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7467
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7468
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7469
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7470
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7471
                                   2r00111110 2r01111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7472
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7473
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7474
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7475
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7476
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7477
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7478
                                   2r00111110 2r01111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7479
                                   2r00011110 2r01111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7480
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7481
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7482
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7483
                                )) asImage.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7484
    stopIcon mask:(Form width:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7485
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7486
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7487
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7488
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7489
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7490
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7491
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7492
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7493
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7494
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7495
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7496
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7497
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7498
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7499
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7500
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7501
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7502
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7503
                                )).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7504
    stopIcon colorMap:(Array with:Color white with:Color red).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7505
    StopIcon := stopIcon.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7506
    ^ stopIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7507
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7508
    "Created: 22.10.1996 / 18:03:38 / cg"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7509
    "Modified: 22.10.1996 / 19:54:39 / cg"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7510
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7511
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7512
stringToSearchFor
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7513
    "look in codeView and methodListView for a search-string when searching for classes/names"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7514
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7515
    |sel|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7516
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7517
    sel := codeView selection.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7518
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7519
        sel := sel asString withoutSpaces
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7520
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7521
        sel isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7522
            currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7523
                sel := currentClass name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7524
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7525
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7526
        sel notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7527
            sel := sel withoutSpaces
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7528
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7529
            sel := ''
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7530
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7531
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7532
    ^ sel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7533
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7534
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7535
traceIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7536
    "answer an icon to mark traced methods"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7537
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7538
    |traceIcon|
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7539
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7540
    TraceIcon notNil ifTrue:[^ TraceIcon].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7541
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7542
    traceIcon := (Form width:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7543
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7544
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7545
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7546
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7547
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7548
                                   2r00110000 2r00001100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7549
                                   2r00110000 2r00001100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7550
                                   2r00011000 2r00011000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7551
                                   2r00011000 2r00011000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7552
                                   2r00001100 2r00110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7553
                                   2r00001100 2r00110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7554
                                   2r00000110 2r01100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7555
                                   2r00000110 2r01100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7556
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7557
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7558
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7559
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7560
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7561
                                )) asImage.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7562
    traceIcon mask:(Form width:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7563
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7564
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7565
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7566
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7567
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7568
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7569
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7570
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7571
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7572
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7573
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7574
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7575
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7576
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7577
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7578
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7579
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7580
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7581
                                )).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7582
    traceIcon colorMap:(Array with:Color white with:Color red).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7583
    TraceIcon := traceIcon.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7584
    ^ traceIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7585
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7586
    "Created: 22.10.1996 / 18:04:14 / cg"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7587
    "Modified: 22.10.1996 / 19:52:41 / cg"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7588
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7589
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7590
warnLabel:what
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7591
    "set the title for some warning"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7592
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7593
    self label:('System Browser WARNING: ' , what)
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7594
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7595
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7596
withSearchCursorDo:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7597
    ^ self withCursor:(Cursor questionMark) do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7598
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7599
    "Created: 23.11.1995 / 14:11:14 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7600
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7601
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7602
!BrowserView methodsFor:'unused'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7603
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7604
listOfAllMethodCategoriesInHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7605
    "answer a list of all method categories of the argument, aClass,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7606
     and all of its superclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7607
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7608
    |newList cat|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7609
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7610
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7611
    self classesInHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7612
        c methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7613
            cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7614
            cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7615
                cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7616
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7617
            newList add:cat
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7618
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7619
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7620
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7621
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7622
    ^ newList asOrderedCollection sort
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7623
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7624
    "Modified: 7.6.1996 / 09:03:22 / stefan"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7625
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7626
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7627
listOfAllSelectorsInCategory:aCategory inHierarchyOfClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7628
    "answer a list of all selectors in a given method category 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7629
     of the argument, aClass and its superclasses"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7630
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7631
    |newList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7632
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7633
    newList := Set new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7634
    self classesInHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7635
        |searchCategory|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7636
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7637
        (aCategory = '* all *') ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7638
            newList addAll:(c methodDictionary keys)
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7639
        ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7640
            (aCategory = '* no category *') ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7641
                searchCategory := nil
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7642
            ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7643
                searchCategory := aCategory
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7644
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7645
            c methodDictionary keysAndValuesDo:[:selector :aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7646
                (aMethod category = searchCategory) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7647
                    newList add:selector
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7648
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7649
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7650
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7651
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7652
    (newList size == 0) ifTrue:[^ nil].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7653
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7654
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7655
    "Modified: 5.6.1996 / 11:42:12 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7656
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7657
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7658
!BrowserView methodsFor:'variable list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7659
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7660
allClassOrInstVarRefsTitle:title access:access mods:modifications
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7661
    "show an enterbox for instVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7662
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7663
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7664
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7665
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7666
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7667
        box action:[:aVariableName |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7668
            |homeClass|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7669
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7670
            aVariableName isEmpty ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7671
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7672
                    homeClass := self findClassOfVariable:aVariableName accessWith:access.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7673
                    access == #classVarNames ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7674
                        SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7675
                            browseClassRefsTo:aVariableName 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7676
                            under:homeClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7677
                            modificationsOnly:modifications
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7678
                    ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7679
                        SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7680
                            browseInstRefsTo:aVariableName 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7681
                            under:homeClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7682
                            modificationsOnly:modifications
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7683
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7684
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7685
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7686
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7687
        box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7688
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7689
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7690
    "Created: 23.11.1995 / 14:13:24 / cg"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7691
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7692
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7693
allClassVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7694
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7695
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7696
    self allClassOrInstVarRefsTitle:'class variable to browse modifications of:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7697
                                  access:#classVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7698
                                  mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7699
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7700
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7701
allClassVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7702
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7703
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7704
    self allClassOrInstVarRefsTitle:'class variable to browse references to:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7705
                                  access:#classVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7706
                                  mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7707
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7708
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7709
allInstVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7710
    "show an enterbox for instVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7711
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7712
    self allClassOrInstVarRefsTitle:'instance variable to browse modifications of:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7713
                                  access:#instVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7714
                                  mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7715
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7716
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7717
allInstVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7718
    "show an enterbox for instVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7719
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7720
    self allClassOrInstVarRefsTitle:'instance variable to browse references to:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7721
                                  access:#instVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7722
                                  mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7723
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7724
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7725
classVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7726
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7727
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7728
    self classVarRefsOrModsTitle:'class variable to browse modifications of:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7729
                                 mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7730
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7731
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7732
classVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7733
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7734
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7735
    self classVarRefsOrModsTitle:'class variable to browse references to:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7736
                                 mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7737
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7738
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7739
classVarRefsOrModsTitle:title mods:mods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7740
    "show an enterbox for classVar to search for"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7741
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7742
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7743
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7744
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7745
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7746
        box action:[:aString |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7747
            aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7748
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7749
                    SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7750
                           browseClassRefsTo:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7751
                           in:(Array with:currentClass)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7752
                           modificationsOnly:mods 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7753
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7754
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7755
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7756
        box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7757
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7758
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7759
    "Created: 23.11.1995 / 14:12:56 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7760
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7761
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7762
enterBoxForVariableSearch:title
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7763
    |box sel|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7764
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7765
    box := self enterBoxForCodeSelectionTitle:title okText:'browse'.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7766
    variableListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7767
        codeView hasSelection ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7768
            (sel := variableListView selectionValue) notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7769
                (sel startsWith:'---') ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7770
                    box initialText:sel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7771
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7772
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7773
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7774
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7775
    ^ box
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7776
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7777
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7778
instVarMods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7779
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7780
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7781
    self instVarRefsOrModsTitle:'instance variable to browse modifications of:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7782
                                mods:true 
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7783
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7784
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7785
instVarRefs
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7786
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7787
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7788
    self instVarRefsOrModsTitle:'instance variable to browse references to:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7789
                           mods:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7790
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7791
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7792
instVarRefsOrModsTitle:title mods:mods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7793
    "show an enterbox for instvar to search for"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7794
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7795
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7796
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7797
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7798
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7799
        box action:[:aString |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7800
            aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7801
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7802
                    SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7803
                        browseInstRefsTo:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7804
                        in:(Array with:currentClass)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7805
                        modificationsOnly:mods 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7806
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7807
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7808
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7809
        box showAtPointer
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  7810
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7811
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7812
    "Created: 23.11.1995 / 14:12:40 / cg"
93
claus
parents: 92
diff changeset
  7813
!
claus
parents: 92
diff changeset
  7814
claus
parents: 92
diff changeset
  7815
varTypeInfo
claus
parents: 92
diff changeset
  7816
    "show typical usage of a variable"
claus
parents: 92
diff changeset
  7817
claus
parents: 92
diff changeset
  7818
    |name idx classes values value msg cut names instCount subInstCount box
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7819
     searchClass s|
93
claus
parents: 92
diff changeset
  7820
claus
parents: 92
diff changeset
  7821
    name := variableListView selectionValue.
claus
parents: 92
diff changeset
  7822
    name isNil ifTrue:[^ self].
claus
parents: 92
diff changeset
  7823
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7824
    showInstance ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7825
        searchClass := currentClass whichClassDefinesClassVar:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7826
        value := searchClass classVarAt:(name asSymbol).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7827
        s := value displayString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7828
        s size > 60 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7829
            s := (s copyTo:60) , ' ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7830
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7831
        msg := name , ' is (currently):\\' , s.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7832
        s ~= value classNameWithArticle ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7833
            msg := msg , '\\(' , value class name , ')'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7834
        ]
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7835
    ] ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7836
        searchClass := actualClass whichClassDefinesInstVar:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7837
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7838
        idx := searchClass instVarOffsetOf:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7839
        idx isNil ifTrue:[^ self].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7840
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7841
        classes := IdentitySet new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7842
        values := IdentitySet new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7843
        instCount := 0.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7844
        subInstCount := 0.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7845
        searchClass allSubInstancesDo:[:i |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7846
            |val|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7847
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7848
            val := i instVarAt:idx.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7849
            val notNil ifTrue:[values add:val].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7850
            classes add:val class.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7851
            (i isMemberOf:searchClass) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7852
                instCount := instCount + 1.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7853
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7854
                subInstCount := subInstCount + 1
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7855
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7856
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7857
        (instCount == 0 and:[subInstCount == 0]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7858
            self warn:'there are currently no instances of ' , currentClass name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7859
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7860
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7861
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7862
        instCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7863
            msg := 'in (currently: ' , instCount printString,') instances '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7864
            subInstCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7865
                msg := msg , 'and '
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7866
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7867
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7868
            msg := 'in '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7869
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7870
        subInstCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7871
            msg := msg , '(currently: ' , subInstCount printString, ') derived instances '
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7872
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7873
        msg := msg, 'of ' , searchClass name , ',\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7874
        msg := msg , name , ' '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7875
        ((values size == 1) 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7876
        or:[classes size == 1 and:[classes first == UndefinedObject]]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7877
            values size == 1 ifTrue:[value := values first].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7878
            (value isNumber or:[value isString]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7879
                msg := msg , 'is always the same:\\      ' , 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7880
                             value class name , ' (' , value storeString , ')'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7881
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7882
                (value isNil or:[value == true or:[value == false]]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7883
                    msg := msg , 'is always:\\      ' , 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7884
                                 value printString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7885
                ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7886
                    msg := msg , 'is always the same:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7887
                    msg := msg , '      ' , value class name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7888
                    value isLiteral ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7889
                        msg := msg , ' (' , value storeString , ')'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7890
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7891
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7892
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7893
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7894
            classes size == 1 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7895
                msg := msg , 'is always:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7896
                msg := msg , '      ' , classes first name , '\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7897
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7898
                msg := msg , 'is one of:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7899
                classes := classes asOrderedCollection.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7900
                classes size > 20 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7901
                    classes := classes copyFrom:1 to:20.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7902
                    cut := true
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7903
                ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7904
                    cut := false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7905
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7906
                names := classes collect:[:cls |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7907
                    |nm|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7908
                    cls == UndefinedObject ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7909
                        'nil'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7910
                    ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7911
                        cls == True ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7912
                            'true'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7913
                        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7914
                            cls == False ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7915
                                'false'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7916
                            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7917
                                cls name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7918
                            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7919
                        ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7920
                    ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7921
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7922
                names sort.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7923
                names do:[:nm |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7924
                    msg := msg , '      ' , nm , '\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7925
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7926
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7927
        ].
93
claus
parents: 92
diff changeset
  7928
    ].
claus
parents: 92
diff changeset
  7929
claus
parents: 92
diff changeset
  7930
    box := InfoBox title:msg withCRs.
claus
parents: 92
diff changeset
  7931
    box label:'variable type information'.
claus
parents: 92
diff changeset
  7932
    box showAtPointer
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7933
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7934
    "Modified: 13.12.1995 / 12:59:03 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7935
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7936
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7937
variableListMenu
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7938
    |labels selectors|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7939
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7940
    currentClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7941
        variableListView flash.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7942
        ^ nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7943
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7944
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7945
    labels := #(
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7946
                    'instvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7947
                    'classvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7948
                    'all instvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7949
                    'all classvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7950
                    '-'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7951
                    'instvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7952
                    'classvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7953
                    'all instvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7954
                    'all classvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7955
               ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7956
    selectors := #(
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7957
                    instVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7958
                    classVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7959
                    allInstVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7960
                    allClassVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7961
                    nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7962
                    instVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7963
                    classVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7964
                    allInstVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7965
                    allClassVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7966
                 ).
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7967
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7968
    ("showInstance and:[" variableListView hasSelection "]" ) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7969
        labels := labels , #(
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7970
                                '-'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7971
                                'type information'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7972
                           ).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7973
        selectors := selectors , #(
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7974
                                nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7975
                                varTypeInfo
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7976
                                ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7977
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7978
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7979
    ^ PopUpMenu labels:(resources array:labels)
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7980
                selectors:selectors
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7981
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  7982
    "Modified: 13.12.1995 / 12:49:49 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7983
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7984
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7985
variableSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7986
    "variable selection changed"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7987
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7988
    |name idx|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7989
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7990
    name := variableListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7991
    name isNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7992
        self unhilightMethodCategories.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7993
        self unhilightMethods.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7994
        self autoSearch:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7995
        ^ self
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7996
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7997
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7998
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7999
     first, check if the selected variable is really the one 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8000
     we get - reselect if its hidden (for example, a class variable
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8001
     with the same name could be defined in a subclass)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8002
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8003
    idx := variableListView list findLast:[:entry | entry = name].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8004
    idx ~~ lineNr ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8005
        "select it - user will see whats going on"
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8006
        variableListView setSelection:idx
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8007
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8008
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8009
    "search for methods in the current category, which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8010
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8011
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8012
    self hilightMethodsInMethodCategoryList:true inMethodList:true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8013
    self autoSearch:name.
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8014
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8015
    "Modified: 25.5.1996 / 12:26:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8016
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8017
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8018
!BrowserView methodsFor:'variable stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8019
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8020
hilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8021
    "helper; given a list itme, highlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8022
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8023
    |e|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8024
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8025
    methodCategoryListView font bold ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8026
        "/ already bold; use different color then
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8027
        methodCategoryListView foregroundColor brightness > 0.5 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8028
            methodCategoryListView backgroundColor brightness < 0.25 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8029
                e := #color->Color blue
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8030
            ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8031
                e := #color->Color black
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8032
            ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8033
        ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8034
            methodCategoryListView backgroundColor brightness > 0.75 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8035
                e := #color->Color red darkened
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8036
            ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8037
                e := #color->Color white.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8038
            ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8039
        ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8040
    ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8041
        e := #bold.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8042
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8043
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8044
    entry isString ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8045
        ^ entry asText emphasizeAllWith:e.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8046
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8047
    ^ entry copy string:(entry string asText emphasizeAllWith:e)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8048
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8049
    "Created: 22.10.1996 / 23:36:59 / cg"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8050
    "Modified: 22.10.1996 / 23:50:03 / cg"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8051
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8052
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8053
hilightMethodsInMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8054
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8055
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8056
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8057
    self hilightMethodsInMethodCategoryList:true inMethodList:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8058
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8059
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8060
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8061
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8062
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8063
hilightMethodsInMethodCategoryList:inCat inMethodList:inMethods 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8064
    "search for methods  which access the selected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8065
     variable, and highlight them"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8066
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8067
    |name redefinedSelectors methodList methodCategoryList entry|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8068
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8069
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8070
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8071
    inCat ifTrue:[self unhilightMethodCategories].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8072
    inMethods ifTrue:[self unhilightMethods].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8073
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8074
    actualClass isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8075
    (methodCategoryListView isNil 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8076
    and:[methodListView isNil]) ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8077
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8078
    name := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8079
    name isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8080
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8081
    self withSearchCursorDo:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8082
        |classes filter any supers|
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8083
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8084
        classes := Array with:actualClass.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8085
        (currentClassHierarchy notNil and:[fullProtocol]) ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8086
            supers := actualClass allSuperclasses.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8087
            supers notNil ifTrue:[    
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8088
                classes := classes , supers.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8089
            ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8090
            redefinedSelectors := IdentitySet new.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8091
        ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8092
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8093
        filter := SystemBrowser filterToSearchRefsTo:name classVars:showInstance not modificationsOnly:false. 
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8094
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8095
        methodListView notNil ifTrue:[
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8096
            methodList := methodListView list.
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8097
        ].
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8098
        methodCategoryListView notNil ifTrue:[
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8099
            methodCategoryList := methodCategoryListView list.
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8100
        ].
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8101
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8102
        any := false.
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8103
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8104
        "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8105
         highlight the method that ref this variable
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8106
        "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8107
        classes do:[:someClass |
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8108
            (fullProtocol
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8109
            and:[classListView valueIsInSelection:(someClass name)]) ifFalse:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8110
                someClass methodDictionary keysAndValuesDo:[:selector :method |
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8111
                    (inCat
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8112
                    or:[methodList notNil
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8113
                        and:[methodList includes:selector]])
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8114
                    ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8115
                        (redefinedSelectors isNil
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8116
                        or:[(redefinedSelectors includes:selector) not])
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8117
                       ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8118
                           (filter value:someClass value:method value:selector) ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8119
                               |idx cat|
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8120
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8121
                               (inCat
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8122
                               and:[methodCategoryList notNil]) ifTrue:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8123
                                   cat := method category.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8124
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8125
                                    highlight the methodCategory
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8126
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8127
                                   idx := methodCategoryListView list indexOf:cat.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8128
                                   idx ~~ 0 ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8129
                                        entry := methodCategoryListView at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8130
                                        entry := self hilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8131
                                        methodCategoryListView at:idx put:entry
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8132
"/                                       methodCategoryListView attributeAt:idx put:#bold.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8133
                                   ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8134
                               ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8135
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8136
                               (inMethods
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8137
                               and:[methodList notNil]) ifTrue:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8138
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8139
                                    highlight the method
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8140
                                   "
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8141
                                   idx := methodListView list 
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8142
                                                findFirst:[:item | item string = selector
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8143
                                                                   or:[item string startsWith:(selector , ' ')]
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8144
                                                          ].
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8145
                                   idx ~~ 0 ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8146
                                        entry := methodListView at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8147
                                        entry := self hilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8148
                                        methodListView at:idx put:entry
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8149
"/                                        methodListView attributeAt:idx put:#bold.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8150
                                   ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8151
                                   any := true
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8152
                               ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8153
                           ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8154
                           redefinedSelectors notNil ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8155
                               redefinedSelectors add:selector
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8156
                           ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8157
                        ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8158
                    ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8159
                ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8160
            ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8161
        ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8162
        any ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8163
            self setSearchPattern:name
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8164
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8165
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8166
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8167
    "Created: 23.11.1995 / 14:12:08 / cg"
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8168
    "Modified: 5.6.1996 / 11:38:19 / stefan"
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8169
    "Modified: 22.10.1996 / 23:37:25 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8170
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8171
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8172
hilightMethodsInMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8173
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8174
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8175
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8176
    self hilightMethodsInMethodCategoryList:false inMethodList:true 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8177
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8178
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8179
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8180
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8181
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8182
unhilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8183
    "helper; given a list itme, unhighlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8184
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8185
    entry isString ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8186
        ^ entry string
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8187
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8188
    ^ entry copy string:(entry string)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8189
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8190
    "Created: 22.10.1996 / 23:38:21 / cg"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8191
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8192
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8193
unhilightMethodCategories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8194
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8195
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8196
    |list entry sz "{ Class: SmallInteger }"|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8197
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8198
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8200
    methodCategoryListView notNil ifTrue:[
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8201
        list := methodCategoryListView list.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8202
        sz := list size.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8203
        1 to:sz do:[:idx |
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8204
            entry := list at:idx.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8205
            entry := self unhilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8206
            methodCategoryListView at:idx put:entry.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8207
"/            methodCategoryListView attributeAt:idx put:nil.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8208
        ]
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8209
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8210
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8211
    "Modified: 22.10.1996 / 23:40:52 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8212
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8213
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8214
unhilightMethods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8215
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8216
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8217
    |list entry sz "{Class: SmallInteger }" |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8218
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8219
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8220
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8221
    methodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8222
        list := methodListView list.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8223
        sz := list size.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8224
        1 to:sz do:[:idx |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8225
            entry := list at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8226
            entry := self unhilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8227
            methodListView at:idx put:entry.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8228
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8229
"/            methodListView attributeAt:idx put:nil.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8230
        ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8231
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8232
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8233
    "Modified: 22.10.1996 / 23:39:18 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8234
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8235
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8236
updateVariableList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8237
    |l subList last nameAccessSelector class oldSelection|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8238
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8239
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8240
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8241
    oldSelection := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8242
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8243
    l := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8244
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8245
     show classVars, if classProtocol is shown (instead of classInstance vars)
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8246
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8247
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8248
        nameAccessSelector := #instVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8249
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8250
        nameAccessSelector := #classVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8251
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8252
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8253
"/    class := currentClass notNil ifTrue:[currentClass] ifFalse:[actualClass].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8254
"/    class isNil ifTrue:[class := currentClassHierarchy].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8255
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8256
    class := currentClassHierarchy notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8257
        currentClassHierarchy
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8258
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8259
        currentClass
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8260
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8261
    class := currentClass.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8262
    fullProtocol ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8263
        class := currentClassHierarchy
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8264
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8265
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8266
    class isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8267
        variableListView list:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8268
        ^ self
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8269
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8270
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8271
    class withAllSuperclasses do:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8272
        |ignore|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8273
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8274
        ignore := fullProtocol 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8275
                  and:[classListView valueIsInSelection:(aClass name asString)].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8276
        ignore ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8277
            subList := aClass perform:nameAccessSelector.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8278
            subList size ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8279
                l := l , (subList asOrderedCollection reverse).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8280
                l := l , (OrderedCollection with:'---- ' , aClass name , ' ---------').
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8281
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8282
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8283
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8284
    l reverse.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8285
    variableListView setAttributes:nil.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8286
    l ~= variableListView list ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8287
        variableListView list:l.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8288
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8289
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8290
    l keysAndValuesDo:[:index :entry |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8291
        (entry startsWith:'---') ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8292
            variableListView attributeAt:index put:#disabled.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8293
            last := index
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8294
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8295
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8296
    last notNil ifTrue:[variableListView scrollToLine:last].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8297
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8298
    oldSelection notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8299
        variableListView setSelectElement:oldSelection.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8300
        self hilightMethodsInMethodCategoryList:true inMethodList:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8301
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  8302
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8303
    "Modified: 27.10.1996 / 15:48:02 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8304
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8305
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  8306
!BrowserView class methodsFor:'documentation'!
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
  8307
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
  8308
version
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8309
    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.201 1996-11-01 16:23:10 cg Exp $'
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
  8310
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8311
BrowserView initialize!