BrowserView.st
author ca
Mon, 23 Dec 1996 16:05:31 +0100
changeset 890 da8b66193d6c
parent 889 1d4a318a6eff
child 892 70512e323623
permissions -rw-r--r--
checkin from browser
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
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    14
	instanceVariableNames:'classCategoryListView classListView methodCategoryListView
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    15
		methodListView classMethodListView codeView classToggle
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    16
		instanceToggle currentNamespace currentClassCategory
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    17
		currentClassHierarchy currentClass currentMethodCategory
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    18
		currentMethod currentSelector showInstance actualClass fullClass
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    19
		lastMethodCategory aspect variableListView fullProtocol
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    20
		lockUpdates autoSearch myLabel acceptClass lastSourceLogMessage
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
    21
		lastCategory lastModule lastPackage lastMethodMoveClass
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
    22
		namespaceList allNamespaces'
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    23
	classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    24
		StopIcon TraceIcon'
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    25
	poolDictionaries:''
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    26
	category:'Interface-Browsers'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    27
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    28
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    29
!BrowserView class methodsFor:'documentation'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    30
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    31
copyright
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    32
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    33
 COPYRIGHT (c) 1989 by Claus Gittinger
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
    34
              All Rights Reserved
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    35
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    36
 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
    37
 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
    38
 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
    39
 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
    40
 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
    41
 hereby transferred.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    42
"
165
df29ee4514c1 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 161
diff changeset
    43
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    44
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    45
documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    46
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    47
    this class implements all kinds of class browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    48
    Typically, it is started with 'SystemBrowser open', but there are many other 
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    49
    startup messages, to launch special browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    50
    See the categories 'startup' and 'special search startup' in the classes
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    51
    protocol.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    52
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    53
    Alse, see the extra document 'doc/misc/sbrowser.doc' or the HTML online doc
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    54
    for how to use the browser.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    55
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    56
    written winter 89 by claus
106
claus
parents: 105
diff changeset
    57
claus
parents: 105
diff changeset
    58
    Notice: SystemBrowser is currently being rewritten to be an instance
claus
parents: 105
diff changeset
    59
    of ApplicationModel - this transition is not yet complete and you see
claus
parents: 105
diff changeset
    60
    here intermediate versions of BrowserView/SystemBrowser. 
claus
parents: 105
diff changeset
    61
    All action is (currently) still done here in BrowserView, although the
claus
parents: 105
diff changeset
    62
    SystemBrowsers class methods are used to startup a browser.
claus
parents: 105
diff changeset
    63
    This will certainly change ...
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    64
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    65
    [author:]
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    66
        Claus Gittinger
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    67
"
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    68
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    69
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    70
!BrowserView class methodsFor:'initialization'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    71
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    72
initialize
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    73
    "Browser configuration;
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    74
     (values can be changed from your private startup file)"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    75
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    76
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    77
     setting this to false, the removeClass function will remove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    78
     classes WITHOUT checking for instances. Otherwise,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    79
     it will check and let you confirm in case there are instances.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    80
     Checking for instances may be a bit time consuming, though.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    81
     The default is true - therefore, it will check
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    82
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    83
    CheckForInstancesWhenRemovingClasses := true.
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
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    86
     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
    87
     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
    88
     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
    89
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    90
    RememberAspect := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    91
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    92
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    93
     CheckForInstancesWhenRemovingClasses := true
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    94
     CheckForInstancesWhenRemovingClasses := false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    95
     RememberAspect := true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    96
     RememberAspect := false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    97
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    98
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    99
    "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
   100
    "Modified: 23.11.1995 / 11:36:34 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   101
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   102
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   103
!BrowserView class methodsFor:'cleanup'!
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   104
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   105
lowSpaceCleanup
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   106
    DefaultIcon := nil
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   107
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   108
    "Created: 18.4.1996 / 16:46:40 / cg"
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   109
! !
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   110
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   111
!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
   112
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   113
defaultIcon
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   114
    DefaultIcon isNil ifTrue:[
877
abb5e8b1a04d use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 863
diff changeset
   115
        DefaultIcon := Image fromFile:'bitmaps/SBrowser.xbm' resolution:100
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   116
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   117
    ^ DefaultIcon
877
abb5e8b1a04d use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 863
diff changeset
   118
abb5e8b1a04d use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 863
diff changeset
   119
    "Modified: 1.1.1970 / 14:04:42 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   120
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   121
132
claus
parents: 131
diff changeset
   122
!BrowserView methodsFor:'change & update'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   123
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   124
refetchClass
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   125
    "after a class definition change in another browser,
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   126
     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
   127
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   128
"/    currentClass := Smalltalk at:(currentClass name asSymbol).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   129
    self switchToClass:(Smalltalk at:(currentClass name asSymbol)).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   130
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   131
"/    showInstance ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   132
"/        actualClass := currentClass
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   133
"/    ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   134
"/        actualClass := currentClass class
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   135
"/    ].
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
    "Created: 8.2.1996 / 13:22:27 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   138
    "Modified: 8.2.1996 / 13:40:18 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   139
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   140
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   141
update:something with:someArgument from:changedObject
273
0fc84937f240 check oldMethod in method-update notification
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   142
    |list selector oldMethod|
93
claus
parents: 92
diff changeset
   143
701
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   144
    (changedObject == ObjectMemory) ifTrue:[
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   145
        (something == #earlyRestart 
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   146
        or:[something == #restarted
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   147
        or:[something == #returnFromSnapshot]]) ifTrue:[
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   148
            "/ those are to be ignored.
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   149
            ^ self
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   150
        ]
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   151
    ].
45bde553b0eb ignore restart-updates from ObjectMemory
Claus Gittinger <cg@exept.de>
parents: 694
diff changeset
   152
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   153
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   154
     avoid update/warn after my own changes
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   155
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   156
    lockUpdates == true ifTrue:[
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   157
"/         'ignored my change' printNL.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   158
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   159
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   160
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   161
"/ changedObject print. ' ' print. someArgument print. ' ' print.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   162
"/ something printNL.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   163
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
   164
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   165
    (changedObject == Smalltalk) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   166
        allNamespaces := nil.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   167
        namespaceList notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   168
            self setListOfNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   169
        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   170
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   171
        something == #newClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   172
            (currentClass notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   173
            and:[someArgument name = currentClass name]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   174
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   175
                 the current class was autoloaded
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   176
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   177
                self warnLabel:'the selected class has changed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   178
                self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   179
            ].
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
            ((someArgument category = currentClassCategory)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   182
            or:[currentClassCategory notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   183
                and:[currentClassCategory startsWith:'*']]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   184
                self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   185
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   186
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   187
            someArgument category ~= currentClassCategory ifTrue:[
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
                 category new ?
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   190
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   191
                (classCategoryListView notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   192
                and:[(list := classCategoryListView list) notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   193
                and:[(list includes:someArgument category) not]])
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   194
                ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   195
                    self updateClassCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   196
                ]
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
            ^ self
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
        something == #classRemove ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   202
            someArgument == currentClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   203
                self warnLabel:'the selected class was removed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   204
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   205
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   206
            " fall into general update "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   207
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   208
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   209
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   210
         any other (unknown) change 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   211
         with the Smalltalk dictionary ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   212
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   213
        self updateClassCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   214
        self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   215
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   216
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   217
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   218
    changedObject isBehavior ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   219
        "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   220
        "/ its a class, that has changed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   221
        "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   222
        fullClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   223
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   224
            "/ full-class browser ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   225
            "/ (must check for both class and metaclass changes)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   226
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   227
            (currentClass == changedObject
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   228
            or:[currentClass class == changedObject]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   229
                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
   230
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   231
            ^ self
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
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   234
        (currentClass notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   235
        and:[changedObject name = currentClass name]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   236
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   237
            "/ its the current class that has changed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   238
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   239
            something == #methodDictionary ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   240
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   241
                "/ 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
   242
                "/ the selector and the oldMethod
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   243
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   244
                someArgument isArray ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   245
                    oldMethod := someArgument at:2.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   246
                    selector := someArgument at:1.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   247
                ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   248
                    selector := someArgument
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   249
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   250
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   251
                (selector isSymbol) ifTrue:[
792
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   252
                    |changedMethod s1 s2|
353
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
                    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   255
                     the method with selector was changed or removed
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
                    self updateMethodCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   258
                    self updateMethodListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   259
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   260
                    selector == currentSelector ifTrue:[
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
                         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
   263
                         changed somehow in another browser (or via fileIn)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   264
                        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   265
                        changedMethod := currentClass compiledMethodAt:currentSelector.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   266
                        changedMethod isNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   267
                            self warnLabel:'the method shown was removed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   268
                            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   269
                        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   270
                        "compare the source codes"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   271
                        currentMethod notNil ifTrue:[
792
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   272
                            s1 := changedMethod source asString asCollectionOfLines copy.
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   273
                            [s1 last isEmpty] whileTrue:[s1 removeLast].
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   274
                            s2 := codeView contents  asCollectionOfLines copy.
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   275
                            [s2 last isEmpty] whileTrue:[s2 removeLast].
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   276
                            s1 = s2 ifFalse:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   277
                                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
   278
                            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   279
                        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   280
                        ^ self    
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
                ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   283
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   284
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   285
            something == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   286
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   287
                 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
   288
                 currently showing the comment
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
                aspect == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   291
                    codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   292
                        self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   293
                        self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   294
                    ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   295
                        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
   296
                    ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   297
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   298
                self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   299
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   300
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   301
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   302
            something == #definition ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   303
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   304
                 the class has changed its definition.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   305
                 Warn, except if showing a method.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   306
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   307
                aspect notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   308
                    codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   309
                        self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   310
                        self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   311
                    ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   312
                        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
   313
                    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   314
                    ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   315
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   316
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   317
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   318
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   319
            "/ 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
   320
            "/ warn if modified
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   321
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   322
            aspect notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   323
                codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   324
                    self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   325
                    self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   326
                ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   327
                    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
   328
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   329
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   330
            ].
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
            "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   333
             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
   334
             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
   335
            "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   336
            self refetchClass.
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
            self updateMethodCategoryListWithScroll:false.
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
            "dont update codeView ...."
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   341
            "self update"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   342
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   343
            self warnLabel:'the class has changed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   344
            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   345
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   346
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   347
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   348
         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
   349
         that is cought in the above case).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   350
         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
   351
         or hierarchy ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   352
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   353
        currentClassHierarchy notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   354
            fullProtocol ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   355
                (currentClass isSubclassOf:changedObject) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   356
                    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
   357
                ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   358
            ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   359
                ((currentClass isSubclassOf:changedObject)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   360
                or:[changedObject isSubclassOf:currentClass]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   361
                    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
   362
                ]                
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   363
            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   364
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   365
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   366
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   367
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   368
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   369
    (changedObject isMethod) ifTrue:[
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   370
    ]
236
d94505a6f697 release currentMethod when compiling or change notification arrives
Claus Gittinger <cg@exept.de>
parents: 229
diff changeset
   371
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   372
    "Modified: 20.12.1996 / 18:57:49 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   373
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   374
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   375
!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
   376
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   377
classCategoryClone
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   378
    "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
   379
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   380
    SystemBrowser openInClass:actualClass selector:currentSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   381
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   382
    "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
   383
    "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
   384
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   385
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   386
classCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   387
    "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
   388
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   389
    |aStream fileName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   390
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   391
    self checkClassCategorySelected ifFalse:[^ self].
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   392
    (currentClassCategory startsWith:'*') ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   393
        self warn:(resources string:'try a real category').
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   394
        ^ self
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   395
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   396
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   397
    fileName := currentClassCategory asString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   398
    fileName replaceAll:Character space by:$_.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   399
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   400
     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
   401
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   402
    Project notNil ifTrue:[
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   403
        fileName := Project currentProjectDirectory , fileName.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   404
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   405
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   406
    self withWaitCursorDo:[
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   407
        "
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   408
         if file exists, save original in a .sav file
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   409
        "
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   410
        fileName asFilename exists ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   411
            self busyLabel:'saving existing %1' with:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   412
            fileName asFilename copyTo:(fileName , '.sav')
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
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   415
        aStream := FileStream newFileNamed:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   416
        aStream isNil ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   417
            self warn:'cannot create: %1' with:fileName
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   418
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   419
            self busyLabel:'writing: %1' with:fileName.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   420
            self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   421
                aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   422
                    self busyLabel:'writing: %1' with:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   423
                    aClass fileOutOn:aStream.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   424
                ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   425
            ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   426
            aStream close.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   427
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   428
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   429
    self normalLabel.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   430
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   431
    "Modified: 23.12.1996 / 10:30:35 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   432
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   433
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   434
classCategoryFileOutBinaryEach
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   435
    "fileOut each class in the current category as binary bytecode."
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   436
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   437
    |mode|
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   438
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   439
    (currentClassCategory startsWith:'*') ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   440
        self warn:(resources string:'try a real category').
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   441
        ^ self
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   442
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   443
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   444
    mode := Dialog choose:(resources string:'save including sources ?')
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   445
                   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
   446
                   values:#(nil #discard #reference #keep)
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   447
                   default:#keep.
338
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
    mode isNil ifTrue:[^ self].
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   450
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   451
    self withWaitCursorDo:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   452
        self allClassesInCategory:currentClassCategory do:[:aClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   453
            aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   454
                self busyLabel:'saving binary of: %1' with:aClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   455
                Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   456
                    self warn:'cannot create: %1' with:ex parameter.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   457
                    ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   458
                ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   459
                    aClass binaryFileOutWithSourceMode:mode.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   460
                ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   461
            ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   462
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   463
        self normalLabel.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   464
    ]
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   465
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   466
    "Created: 25.1.1996 / 17:27:45 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   467
    "Modified: 20.12.1996 / 22:35:54 / cg"
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   468
!
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   469
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   470
classCategoryFileOutEach
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   471
    (currentClassCategory startsWith:'*') ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   472
        self warn:(resources string:'try a real category').
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   473
        ^ self
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   474
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   475
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   476
    self withWaitCursorDo:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   477
        self allClassesInCategory:currentClassCategory do:[:aClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   478
            aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   479
                self busyLabel:'saving: %1' with:aClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   480
                Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   481
                    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
   482
                    ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   483
                ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   484
                    aClass fileOut
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   485
                ]
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   486
            ]
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   487
        ].
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   488
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   489
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   490
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   491
    "Modified: 20.12.1996 / 22:36:15 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   492
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   493
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   494
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
   495
    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
   496
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
    "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
   498
!
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
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
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
   501
    "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
   502
     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
   503
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
   504
    |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
   505
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
   506
    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
   507
    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
   508
        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
   509
        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
   510
        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
   511
    ] 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
   512
        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
   513
        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
   514
        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
   515
    ].
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
    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
   517
    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
   518
    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
   519
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
    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
   521
       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
   522
       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
   523
       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
   524
    ].
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
   525
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   526
    box entryCompletionBlock:[:contents |
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   527
        |s what m|
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   528
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   529
        s := contents withoutSpaces.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   530
        what := Smalltalk classnameCompletion:s.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   531
        box contents:what first.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   532
        (what at:2) size ~~ 1 ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   533
            self beep
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   534
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   535
    ].
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
   536
    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
   537
                        |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
   538
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
   539
                        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
   540
                            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
   541
                        ] 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
   542
                            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
   543
                        ].
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
   544
                        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
   545
                ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   546
    box showAtPointer
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   547
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
   548
    "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
   549
    "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
   550
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   551
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   552
classCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   553
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   554
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   555
    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
   556
    box entryCompletionBlock:[:contents |
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   557
        |s what m|
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   558
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   559
        s := contents withoutSpaces.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   560
        box topView withWaitCursorDo:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   561
            what := Smalltalk selectorCompletion:s.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   562
            box list:(what at:2).
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   563
            box contents:what first.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   564
            (what at:2) size ~~ 1 ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   565
                self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   566
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   567
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   568
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   569
    box action:[:aString | self switchToAnyMethod:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   570
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   571
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   572
    "Modified: 30.8.1995 / 22:49:49 / claus"
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   573
    "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
   574
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   575
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   576
classCategoryMenu
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   577
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   578
    <resource: #keyboard ( #Find ) >
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   579
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   580
    |specialMenu m labels selectors shorties|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   581
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   582
    currentClassCategory notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   583
        labels :=  #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   584
                        'fileOut each binary ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   585
                        '-'
714
3caae72f99d2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 712
diff changeset
   586
                        'repository history ...'
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   587
                        'validate class revisions'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   588
                        '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   589
                        'checkin each ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   590
                    ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   591
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   592
                        classCategoryFileOutBinaryEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   593
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   594
                        classCategoryRepositoryHistory
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   595
                        classCategoryValidateClassRevisions
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   596
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   597
                        classCategoryCheckinEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   598
                     ).
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   599
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   600
        labels :=  #(
714
3caae72f99d2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 712
diff changeset
   601
                        'repository history ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   602
                    ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   603
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   604
                        classCategoryRepositoryHistory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   605
                     ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   606
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   607
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   608
    specialMenu := PopUpMenu 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   609
                        labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   610
                        selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   611
                        receiver:self.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   612
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   613
    Smalltalk sourceCodeManager isNil ifTrue:[
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   614
        specialMenu disableAll:#(classCategoryRepositoryHistory  
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   615
                                 classCategoryCheckinEach
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   616
                                 classCategoryValidateClassRevisions).
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   617
    ].
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   618
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   619
    device ctrlDown ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   620
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   621
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   622
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   623
    currentClassCategory isNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   624
        labels := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   625
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   626
"/                    '-'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   627
                    'clone'
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   628
                    'open for class ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   629
                    'spawn full class'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   630
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   631
                    'update'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   632
                    'find class ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   633
                    'find method ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   634
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   635
                    'new class category ...'
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   636
                    '='
812
17980094b4a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 811
diff changeset
   637
                    'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   638
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   639
        selectors := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   640
"/                    namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   641
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   642
                    classCategoryClone
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   643
                    classCategoryOpenInClass
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   644
                    classCategorySpawnFullClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   645
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   646
                    classCategoryUpdate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   647
                    classCategoryFindClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   648
                    classCategoryFindMethod
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   649
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   650
                    classCategoryNewCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   651
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   652
                    otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   653
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   654
        shorties := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   655
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   656
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   657
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   658
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   659
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   660
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   661
                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   662
                    Find
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   663
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   664
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   665
                    Cmdn
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   666
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   667
                    #'Ctrl'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   668
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   669
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   670
        labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   671
                    'fileOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   672
                    'fileOut each'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   673
                    'printOut' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   674
                    'printOut protocol'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   675
                    '-'
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   676
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   677
"/                    '-'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   678
                    'clone'
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   679
                    'open for class ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   680
                    'SPAWN_CATEGORY'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   681
                    'spawn full class'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   682
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   683
                    'update'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   684
                    'find class ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   685
                    'find method ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   686
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   687
                    'new class category ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   688
                    'rename ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   689
                    'remove'
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   690
                    '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   691
                    'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   692
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   693
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   694
                   classCategoryFileOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   695
                   classCategoryFileOutEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   696
                   classCategoryPrintOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   697
                   classCategoryPrintOutProtocol
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   698
                   nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   699
"/                   namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   700
"/                   nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   701
                   classCategoryClone
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   702
                    classCategoryOpenInClass
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   703
                   classCategorySpawn
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   704
                   classCategorySpawnFullClass
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
                   classCategoryUpdate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   707
                   classCategoryFindClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   708
                   classCategoryFindMethod
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
                   classCategoryNewCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   711
                   classCategoryRename
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   712
                   classCategoryRemove
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
                   otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   715
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   716
        shorties := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   717
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   718
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   719
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   720
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   721
                    nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   722
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   723
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   724
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   725
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   726
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   727
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   728
                    nil
506
1f3cf6d5d343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 501
diff changeset
   729
                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   730
                    Find
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   731
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   732
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   733
                    Cmdn
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   734
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   735
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   736
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   737
                    #'Ctrl'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   738
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   739
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   740
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   741
    m := PopUpMenu 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   742
                labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   743
                selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   744
                accelerators:shorties.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   745
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   746
    m subMenuAt:#otherMenu put:specialMenu.
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   747
    ^ m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   748
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   749
    "Created: 14.9.1995 / 10:50:17 / claus"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   750
    "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
   751
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   752
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   753
classCategoryNewCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   754
    |box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   755
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   756
    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
   757
    box action:[:aString |
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   758
        |categories|
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   759
        categories := classCategoryListView list.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   760
        (categories includes:aString) ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   761
            categories add:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   762
            categories sort.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   763
            classCategoryListView setContents:categories.
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   764
        ].
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   765
        currentClassCategory := aString.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   766
        classCategoryListView setSelectElement:aString.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   767
        self switchToClass:nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   768
        actualClass := acceptClass := nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   769
        self classCategorySelectionChanged
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
   770
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   771
    box showAtPointer
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   772
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   773
    "Modified: 26.5.1996 / 15:02:33 / cg"
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   774
    "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
   775
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   776
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   777
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
   778
    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
   779
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
   780
    "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
   781
!
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   782
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   783
classCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   784
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   785
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   786
    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   787
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   788
        aClass printOutOn:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   789
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   790
    ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   791
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   792
    "Modified: 23.12.1996 / 10:31:15 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   793
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   794
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   795
classCategoryPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   796
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   797
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   798
    Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   799
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   800
        aClass printOutProtocolOn:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   801
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   802
    ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   803
!
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
classCategoryRemove
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   806
    "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
   807
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
   808
    |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
   809
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   810
    self checkClassCategorySelected ifFalse:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   811
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   812
    classesToRemove := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   813
    Smalltalk allBehaviorsDo:[:aClass |
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   814
        aClass category = currentClassCategory ifTrue:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   815
            classesToRemove add:aClass
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   816
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   817
    ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   818
    subclassesRemoved := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   819
    classesToRemove do:[:aClass |
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   820
        aClass allSubclassesDo:[:aSubclass |
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   821
            (classesToRemove includes:aSubclass) ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   822
                (subclassesRemoved includes:aSubclass) ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   823
                    subclassesRemoved add:aSubclass
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   824
                ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   825
            ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   826
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   827
    ].
149
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
    count := classesToRemove size.
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   830
    t := resources string:'remove "%1" ?' with:currentClassCategory.
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   831
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   832
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   833
       count == 1 ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   834
           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
   835
       ] ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   836
           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
   837
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   838
       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
   839
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   840
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   841
    count := subclassesRemoved size.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   842
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   843
       count == 1 ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   844
           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
   845
       ] ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   846
           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
   847
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   848
       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
   849
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   850
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   851
    t := t withCRs.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   852
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   853
    box := YesNoBox 
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   854
               title:t
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   855
               yesText:(resources at:'remove')
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   856
               noText:(resources at:'abort').
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   857
    box label:(resources at:'remove category').
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   858
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   859
    box confirm ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   860
        "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
   861
        |keep idx|
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   862
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   863
        keep := false.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   864
        (subclassesRemoved asOrderedCollection
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   865
         , classesToRemove asOrderedCollection) do:[:aClassToRemove |
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   866
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   867
            (CheckForInstancesWhenRemovingClasses not
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   868
             or:[aClassToRemove hasInstances not
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   869
             or:[self confirm:(aClassToRemove name , ' has instances - remove anyway ?')]] 
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   870
            ) ifTrue:[   
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   871
                Smalltalk removeClass:aClassToRemove
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   872
            ] ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   873
                keep := true.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   874
            ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   875
        ].
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   876
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   877
        self updateClassCategoryList.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   878
        (classCategoryListView list includes:currentClassCategory) ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   879
            currentClassCategory := nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   880
        ].
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   881
        self classCategorySelectionChanged.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   882
        
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   883
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   884
        self switchToClass:nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   885
"/        keep ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   886
"/            idx := classCategoryListView list indexOf:currentClassCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   887
"/            currentClassCategory := nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   888
"/            idx ~= 0 ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   889
"/                classCategoryListView removeIndex:idx.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   890
"/            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   891
"/        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   892
    ]
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   893
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   894
    "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
   895
    "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
   896
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   897
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   898
classCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   899
    "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
   900
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   901
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   902
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   903
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   904
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   905
    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
   906
    box initialText:currentClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   907
    box action:[:aString | self renameCurrentClassCategoryTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   908
    box showAtPointer
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
classCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   912
    "create a new SystemBrowser browsing current classCategory"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   913
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   914
    currentClassCategory notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   915
        self withWaitCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   916
            SystemBrowser browseClassCategory:currentClassCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   917
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   918
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   919
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   920
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   921
classCategorySpawnFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   922
    "create a new SystemBrowser browsing full class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   923
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   924
    |newBrowser|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   925
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   926
    self withWaitCursorDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   927
        newBrowser := SystemBrowser browseFullClasses
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   928
" "
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   929
        .
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   930
        currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   931
            newBrowser switchToClassNamed:(currentClass name)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   932
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   933
" "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   934
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   935
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   936
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   937
classCategoryUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   938
    "update class category list and dependants"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   939
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   940
    |oldClassName oldMethodCategory|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   941
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   942
    classCategoryListView notNil ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   943
        self setListOfNamespaces.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   944
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   945
        currentClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   946
            oldClassName := currentClass name.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   947
            (oldClassName endsWith:'-old') ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   948
                oldClassName := oldClassName copyWithoutLast:4 "copyTo:(oldClassName size - 4)"
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   949
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   950
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   951
        oldMethodCategory := currentMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   952
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   953
        classCategoryListView setContents:(self listOfAllClassCategories).
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   954
        currentClassCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   955
            classCategoryListView setSelectElement:currentClassCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   956
            self classCategorySelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   957
            oldClassName notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   958
                classListView setSelectElement:oldClassName.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   959
                self switchToClass:(Smalltalk at:oldClassName asSymbol).
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   960
                self classSelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   961
                oldMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   962
                    methodCategoryListView setSelectElement:oldMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   963
                    currentMethodCategory := oldMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   964
                    self methodCategorySelectionChanged
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   965
                ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   966
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   967
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   968
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   969
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   970
    "Modified: 20.12.1996 / 18:58:27 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   971
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   972
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   973
!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
   974
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   975
classCategoryCheckinEach
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   976
    (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
   977
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
   978
    self withWaitCursorDo:[
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   979
        |logMessage classes|
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   980
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
   981
        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
   982
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   983
        logMessage notNil ifTrue:[
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   984
            (currentClassCategory = '* all *'
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   985
            or:[currentClassCategory = '* hierarchy *']) ifTrue:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   986
                classes := self allClasses
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   987
            ] ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   988
                classes := self allClassesInCategory:currentClassCategory.
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   989
            ].
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   990
            lastSourceLogMessage := logMessage.
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
   991
            classes do:[:aClass |
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   992
                self busyLabel:'checking in %1' with:aClass name.
466
Claus Gittinger <cg@exept.de>
parents: 465
diff changeset
   993
                "/ 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
   994
                InformationSignal handle:[:ex |
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
   995
                    Transcript showCR:ex errorString
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   996
                ] do:[
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   997
                    self classCheckin:aClass withLog:logMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   998
"/                    (aClass sourceCodeManager) 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   999
"/                        checkinClass:aClass 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1000
"/                        logMessage:logMessage.
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1001
                ].
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1002
                self normalLabel.
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1003
            ]
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1004
        ].
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1005
        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
  1006
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1007
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1008
    "Created: 23.11.1995 / 11:41:38 / cg"
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  1009
    "Modified: 15.6.1996 / 00:25:58 / stefan"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1010
    "Modified: 20.12.1996 / 22:37:04 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1011
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1012
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1013
classCategoryRepositoryHistory
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1014
    (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
  1015
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1016
    self withWaitCursorDo:[
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1017
        |timeGoal aStream box y component timeGoalListPop|
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1018
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1019
        box := Dialog new.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1020
        (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
  1021
        box addVerticalSpace:20.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1022
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1023
        timeGoal := 'yesterday' asValue. 
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
        y := box yPosition.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1026
        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
  1027
        component width:0.5; adjust:#right; borderWidth:0.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1028
        box yPosition:y.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1029
        timeGoalListPop := box addComboBoxOn:timeGoal tabable:true.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1030
        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
  1031
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1032
        timeGoalListPop list:#('yesterday'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1033
                               'a week ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1034
                               'a month ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1035
                               'a year ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1036
                               'all'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1037
                              ).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1038
        box addAbortButton; addOkButton.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1039
        box open.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1040
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1041
        box accepted ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1042
            timeGoal := timeGoal value.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1043
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1044
"/        timeGoal := Dialog 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1045
"/                         request:'list changed repository containers since (mm/dd):
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1046
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1047
"/You can also specify the date as 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1048
"/''yesterday'', ''a week ago'' or ''a month ago''
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1049
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1050
"/'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1051
"/                         initialAnswer:'yesterday'  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1052
"/                         onCancel:nil.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1053
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1054
"/        timeGoal notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1055
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1056
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1057
            self busyLabel:'extracting history ...' with:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1058
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1059
            aStream := WriteStream on:(String new:200).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1060
            Processor activeProcess withLowerPriorityDo:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1061
                SourceCodeManager notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1062
                    SourceCodeManager
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1063
                        writeHistoryLogSince:timeGoal
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1064
                        to:aStream.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1065
                ] ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1066
                    aStream nextPutLine:'no history available (no SourceCodeManagement installed)'
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1067
                ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1068
            ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1069
            codeView contents:(aStream contents).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1070
            codeView modified:false.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1071
            codeView acceptAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1072
            codeView explainAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1073
            methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1074
                methodListView setSelection:nil
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1075
            ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1076
            aspect := nil.      
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1077
            self normalLabel
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1078
        ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1079
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1080
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1081
    "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
  1082
    "Modified: 11.9.1996 / 14:02:49 / cg"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1083
!
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1084
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1085
classCategoryValidateClassRevisions
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1086
    "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
  1087
     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
  1088
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1089
    self withWaitCursorDo:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1090
        |logMessage classes repVersion clsVersion binVersion|
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
        (currentClassCategory = '* all *'
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1093
        or:[currentClassCategory = '* hierarchy *']) ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1094
            classes := Smalltalk allClasses
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1095
        ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1096
            classes := Smalltalk allClassesInCategory:currentClassCategory.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1097
        ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1098
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1099
        classes do:[:aClass |
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1100
            aClass isLoaded ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1101
                self busyLabel:'validating %1 ...' with:aClass name.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1102
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1103
                repVersion := aClass sourceCodeManager newestRevisionOf:aClass.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1104
                clsVersion := aClass revision.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1105
                binVersion := aClass binaryRevision.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1106
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1107
                clsVersion ~= repVersion ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1108
                     Transcript showCR:(aClass name , ' is not up-to-date.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1109
                ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1110
                    clsVersion ~= binVersion ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1111
                        binVersion notNil ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1112
                             Transcript showCR:(aClass name , ' should to be recompiled.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1113
                        ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1114
                    ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1115
"/                         Transcript showCR:(aClass name , ' is up-to-date.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1116
                    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1117
                ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1118
            ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1119
        ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1120
        self normalLabel.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1121
    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1122
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1123
    "Modified: 15.6.1996 / 00:25:58 / stefan"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1124
    "Created: 29.10.1996 / 13:21:08 / cg"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1125
    "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
  1126
! !
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1127
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1128
!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
  1129
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1130
checkClassCategorySelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1131
    currentClassCategory isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1132
        self warn:'select a class category first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1133
        ^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1134
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1135
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1136
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1137
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1138
classCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1139
    "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
  1140
     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
  1141
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1142
    |newCategory oldClass oldName classIndex list|
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
    newCategory := classCategoryListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1145
    (newCategory startsWith:'*') ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1146
        "etiher all or hierarchy;
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1147
         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
  1148
        oldClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1149
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1150
    currentClassCategory := newCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1151
    oldClass isNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1152
        self classCategorySelectionChanged
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1153
    ] ifFalse:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1154
        oldName := oldClass name.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1155
        self withWaitCursorDo:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1156
            self updateClassList
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1157
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1158
        "stupid - search for class name in (indented) list"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1159
        list := classListView list.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1160
        list notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1161
            classIndex := list findFirst:[:elem | elem endsWith:oldName].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1162
        ] ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1163
            classIndex := 0
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1164
        ].
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1165
        classIndex ~~ 0 ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1166
            classListView setSelection:classIndex.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1167
            self switchToClass:(Smalltalk at:(oldName asSymbol))
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1168
        ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1169
            self normalLabel.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1170
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1171
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1172
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1173
    "Modified: 20.12.1996 / 16:40:15 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1174
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1175
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1176
classCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1177
    "class category has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1178
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1179
    self withWaitCursorDo:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1180
        self switchToClass:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1181
        aspect := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1182
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1183
        actualClass := acceptClass := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1184
        currentMethodCategory := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1185
        currentMethod := currentSelector := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1186
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1187
        self updateClassList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1188
        self updateMethodCategoryList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1189
        self updateMethodList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1190
        self updateCodeView.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1191
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1192
        codeView explainAction:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1193
        codeView acceptAction:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1194
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1195
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1196
    "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
  1197
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1198
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1199
listOfAllClassCategories
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1200
    "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
  1201
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1202
    |newList cat|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1203
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1204
    newList := Set with:'* all *' with:'* hierarchy *'.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1205
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1206
    (self listOfNamespaces) do:[:aNamespace |
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1207
        aNamespace allBehaviorsDo:[:aClass |
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1208
            aClass isMeta ifFalse:[
848
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1209
                (aClass isNamespace not 
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1210
                or:[aClass == Namespace 
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1211
                or:[aClass == Smalltalk]]) ifTrue:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1212
                    aClass nameSpace == aNamespace ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1213
                        cat := aClass category.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1214
                        cat isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1215
                            cat := '* no category *'
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1216
                        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1217
                        cat ~= 'obsolete' ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1218
                            newList add:cat
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1219
                        ]
841
4d803d693dfa hide namespaces in class & category lists
Claus Gittinger <cg@exept.de>
parents: 839
diff changeset
  1220
                    ]
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1221
                ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1222
            ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1223
        ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1224
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1225
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1226
    ^ newList asOrderedCollection sort.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1227
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1228
    "Modified: 21.12.1996 / 20:53:21 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1229
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1230
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1231
listOfAllNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1232
    "return a list of all namespaces"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1233
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1234
    |set|
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1235
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1236
    allNamespaces isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1237
        set := IdentitySet with:Smalltalk.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1238
        Smalltalk allBehaviorsDo:[:aClass |
848
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1239
            (aClass isNamespace 
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1240
            and:[aClass ~~ Namespace
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1241
            and:[aClass ~~ Smalltalk]]) ifTrue:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1242
                set add:aClass
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1243
            ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1244
        ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1245
        allNamespaces := set
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1246
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1247
    ^ allNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1248
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1249
    "Created: 20.12.1996 / 19:18:03 / cg"
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1250
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1251
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1252
listOfNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1253
    "return a list of considered namespaces"
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1254
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1255
    currentNamespace isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1256
        ^ Array with:Smalltalk
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1257
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1258
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1259
    currentNamespace = '* all *' ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1260
        ^ self listOfAllNamespaces
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1261
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1262
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1263
    ^ Array with:currentNamespace
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1264
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1265
    "Created: 26.10.1996 / 11:25:39 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1266
    "Modified: 20.12.1996 / 19:18:18 / cg"
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
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1269
renameCurrentClassCategoryTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1270
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1271
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1272
    |any categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1273
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1274
    currentClassCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1275
        any := false.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1276
        Smalltalk allBehaviorsDo:[:aClass |
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1277
            aClass category = currentClassCategory ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1278
                aClass category:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1279
                any := true
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1280
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1281
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1282
        any ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1283
            categories := classCategoryListView list.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1284
            categories remove:currentClassCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1285
            categories add:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1286
            categories sort.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1287
            classCategoryListView setContents:categories.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1288
            currentClassCategory := aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1289
            classCategoryListView setSelectElement:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1290
        ] ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1291
            currentClassCategory := aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1292
            self updateClassCategoryList.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1293
            self updateClassListWithScroll:false
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1294
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1295
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1296
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1297
    "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
  1298
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1299
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1300
switchToAnyMethod:aSelectorString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1301
    "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
  1302
     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
  1303
     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
  1304
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1305
    |classes sel box theClassName|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1306
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1307
    classes := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1308
    aSelectorString knownAsSymbol ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1309
        sel := aSelectorString asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1310
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1311
        Smalltalk allClassesDo:[:aClass |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1312
            (aClass includesSelector:sel) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1313
                classes add:aClass.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1314
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1315
            (aClass class includesSelector:sel) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1316
                classes add:aClass class.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1317
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1318
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1319
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1320
    classes size == 0 ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1321
        SystemBrowser showNoneFound.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1322
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1323
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1324
    classes size > 1 ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1325
        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
  1326
        box okText:(resources string:'show').
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1327
        box list:(classes collect:[:aClass | aClass name]) asSortedCollection.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1328
        box action:[:aString | theClassName := aString].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1329
        box entryCompletionBlock:[:contents |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1330
            |s l what m|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1331
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1332
            s := contents withoutSpaces.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1333
            l := classes select:[:cls | cls name startsWith:s].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1334
            l size > 0 ifTrue:[    
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1335
                box list:(l collect:[:aClass | aClass name]) asSortedCollection.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1336
                box contents:l first name.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1337
                l size ~~ 1 ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  1338
                    self beep
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1339
                ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1340
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1341
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1342
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1343
    ] ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1344
        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
  1345
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1346
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1347
    theClassName notNil ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1348
        self switchToClassNamed:theClassName. 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1349
        self updateMethodCategoryList.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1350
        self switchToMethodNamed:aSelectorString.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1351
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1352
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1353
    "Modified: 1.9.1995 / 01:39:58 / claus"
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  1354
    "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
  1355
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1356
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1357
updateClassCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1358
    self updateClassCategoryListWithScroll:true
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1359
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1360
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1361
updateClassCategoryListWithScroll:scroll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1362
    |oldClassCategory oldClass oldMethodCategory oldMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1363
     oldSelector newCategoryList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1364
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1365
    classMethodListView notNil ifTrue:[ ^ self ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1366
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1367
    oldClassCategory := currentClassCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1368
    oldClass := currentClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1369
    oldMethodCategory := currentMethodCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1370
    oldMethod := currentMethod.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1371
    oldMethod notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1372
        oldSelector := currentSelector
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1373
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1374
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1375
    classCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1376
        newCategoryList := self listOfAllClassCategories.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1377
        newCategoryList = classCategoryListView list ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1378
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1379
                classCategoryListView contents:newCategoryList
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1380
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1381
                classCategoryListView setContents:newCategoryList
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1382
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1383
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1384
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1385
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1386
    oldClassCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1387
        classCategoryListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1388
            classCategoryListView setSelectElement:oldClassCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1389
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1390
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1391
    classListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1392
        oldClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1393
            classListView setSelectElement:(oldClass name)
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1394
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1395
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1396
    oldMethodCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1397
        methodCategoryListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1398
            methodCategoryListView setSelectElement:oldMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1399
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1400
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1401
    oldSelector notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1402
        methodListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1403
            methodListView setSelectElement:oldSelector
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1404
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1405
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1406
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1407
    "Modified: 26.5.1996 / 15:04:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1408
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1409
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1410
!BrowserView methodsFor:'class list menu'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1411
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1412
classClassInstVars
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1413
    "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
  1414
     for a class-instvar-definition change"
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1415
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1416
    self doClassMenu:[:currentClass |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1417
        |s|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1418
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1419
        s := WriteStream on:(String new).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1420
        currentClass fileOutClassInstVarDefinitionOn:s.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1421
        codeView contents:(s contents).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1422
        codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1423
        codeView acceptAction:[:theCode |
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1424
            codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1425
            Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1426
                Compiler evaluate:theCode asString notifying:codeView compile:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1427
                codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1428
                self normalLabel.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1429
                self updateClassList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1430
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1431
            codeView cursor:Cursor normal.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1432
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1433
        codeView explainAction:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1434
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1435
            methodListView setSelection:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1436
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1437
        aspect := #classInstVars.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1438
        self normalLabel
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1439
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1440
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1441
    "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
  1442
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1443
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1444
classComment
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1445
    "show the classes comment in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1446
     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
  1447
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1448
    self classShowFrom:#comment 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1449
                   set:#comment: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1450
                aspect:#comment 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1451
               default:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1452
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1453
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1454
classDefinition
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1455
    "show class definition in codeView and setup accept-action for
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1456
     a class-definition change.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1457
     Extract documentation either from a documentation method or
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1458
     from the comment - not a biggy, but beginners will like
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1459
     it when exploring the system."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1460
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1461
    self doClassMenu:[:currentClass |
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1462
        |m s aStream isComment|
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
        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
  1465
        currentClass fileOutDefinitionOn:aStream.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1466
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1467
        currentClass isLoaded ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1468
            "
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1469
             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
  1470
            "
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1471
            m := currentClass class compiledMethodAt:#documentation.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1472
            m notNil ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1473
                s := m comment.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1474
                isComment := false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1475
            ] ifFalse:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1476
                "try comment"
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1477
                s := currentClass comment.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1478
                s notNil ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1479
                    s isEmpty ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1480
                        s := nil
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1481
                    ] ifFalse:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1482
                        (s includes:$") ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1483
                            s := s copy replaceAll:$" by:$'.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1484
                        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1485
                        isComment := true
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1486
                    ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1487
                ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1488
            ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1489
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1490
        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
  1491
        s isNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1492
            aStream nextPut:$" ; cr; nextPutLine:' no comment or documentation found'.
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1493
        ] ifFalse:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1494
            aStream nextPut:$" ; cr; nextPutLine:' Documentation:'.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1495
            aStream cr; nextPutLine:s; cr.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1496
            aStream nextPutLine:' Notice: '.
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1497
            aStream nextPutAll:'   the above string has been extracted from the classes '.
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1498
            aStream nextPutLine:(isComment ifTrue:['comment.'] ifFalse:['documentation method.']).
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1499
            aStream nextPutLine:'   It will not be preserved when accepting a new class definition.'.
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1500
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1501
        aStream nextPut:$".
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1502
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1503
        codeView contents:(aStream contents).
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1504
        codeView modified:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1505
        codeView acceptAction:[:theCode |
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1506
            codeView cursor:Cursor execute.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1507
            Object abortSignal catch:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1508
                (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
  1509
                isBehavior ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1510
                    codeView modified:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1511
                    self classCategoryUpdate.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1512
                    self updateClassListWithScroll:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1513
                ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1514
            ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1515
            codeView cursor:Cursor normal.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1516
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1517
        codeView explainAction:nil.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1518
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1519
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1520
            methodListView setSelection:nil
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1521
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1522
        aspect := #definition.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1523
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1524
    ]
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1525
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1526
    "Modified: 8.11.1996 / 23:53:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1527
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1528
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1529
classDocumentation
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1530
    "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
  1531
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1532
    self doClassMenu:[:currentClass |
888
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1533
        |v|
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1534
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1535
        v := HTMLDocumentView
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1536
            openFullOnText:(HTMLDocGenerator htmlDocOf:currentClass) 
888
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1537
            inDirectory:(Smalltalk getSystemFileName:'doc/online/english').
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1538
        v nameSpaceForExecution:(currentClass nameSpace).
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1539
    ]
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1540
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1541
    "Created: 18.5.1996 / 12:12:20 / cg"
888
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1542
    "Modified: 23.12.1996 / 12:26:19 / cg"
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1543
!
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1544
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1545
classFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1546
    "fileOut the current class.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1547
     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
  1548
     warn if any)"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1549
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1550
    self doClassMenu:[:currentClass |
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1551
        |msg|
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1552
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1553
        currentClass isPrivate ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1554
            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
  1555
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1556
            self busyLabel:'saving %1' with:currentClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1557
            Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1558
                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
  1559
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1560
                ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1561
            ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1562
                currentClass fileOut.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1563
            ].
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1564
        ].
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1565
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1566
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1567
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1568
    "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
  1569
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1570
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1571
classFileOutBinary
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1572
    "fileOut the current class as binary bytecode."
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1573
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1574
    |mode|
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1575
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1576
    mode := Dialog choose:(resources string:'save including sources ?')
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1577
                   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
  1578
                   values:#(nil #discard #reference #keep)
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1579
                   default:#keep.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1580
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1581
    mode isNil ifTrue:[^ self].   "/ cancelled
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1582
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1583
    self doClassMenu:[:currentClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1584
        |msg|
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1585
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1586
        currentClass isPrivate ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1587
            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
  1588
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1589
            self busyLabel:'saving binary of %1' with:currentClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1590
            Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1591
                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
  1592
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1593
                ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1594
            ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1595
                currentClass binaryFileOutWithSourceMode:mode.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1596
            ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1597
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1598
        self normalLabel.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1599
    ]
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1600
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1601
    "Created: 24.1.1996 / 21:11:03 / cg"
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1602
    "Modified: 14.10.1996 / 20:12:46 / cg"
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1603
!
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1604
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1605
classHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1606
    "show current classes hierarchy in codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1607
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1608
    self doClassMenu:[:currentClass |
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1609
        |aStream|
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1610
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1611
        aStream := WriteStream on:(String new:200).
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1612
        actualClass printHierarchyOn:aStream.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1613
        codeView contents:(aStream contents).
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1614
        codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1615
        codeView acceptAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1616
        codeView explainAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1617
        methodListView notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1618
            methodListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1619
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1620
        aspect := #hierarchy. 
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1621
        self normalLabel
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1622
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1623
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1624
    "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
  1625
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1626
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1627
classInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1628
    "inspect the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1629
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1630
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1631
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1632
    currentClass inspect.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1633
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1634
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1635
classInstancesInspect
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1636
    "inspect the current classes instances"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1637
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1638
    self checkClassSelected ifFalse:[^ self].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1639
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1640
    currentClass allInstances inspect.
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1641
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1642
    "Created: 24.2.1996 / 16:12:14 / cg"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1643
!
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1644
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1645
classLoad
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1646
    "load an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1647
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  1648
    |nm nameShown|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1649
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1650
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1651
    nm := currentClass name.
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  1652
    nameShown := self displayedClassNameOf:currentClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1653
    Autoload autoloadFailedSignal handle:[:ex |
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1654
        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
  1655
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1656
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
  1657
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
  1658
        ex return.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1659
    ] do:[
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1660
        currentClass autoload.
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1661
        currentClass := actualClass := nil.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1662
        "/ reselect the current class
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1663
        showInstance ifFalse:[
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1664
            nameShown := nameShown , ' class'
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1665
        ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  1666
        self switchToClassNamed:nameShown
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1667
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1668
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1669
    "Modified: 20.12.1996 / 22:12:29 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1670
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1671
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1672
classMenu
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1673
    "sent by  classListView to ask for the menu"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1674
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1675
    |specialMenu labels selectors shorties m newClassMenu spawnMenu|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1676
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1677
    currentClass isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1678
        labels :=  #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1679
                       'fileIn new from repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1680
                    ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1681
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1682
        selectors := #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1683
                       classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1684
                      ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1685
    ] ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1686
        labels :=  #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1687
                       'fileOut binary'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1688
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1689
                       'inspect class'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1690
                       'inspect instances'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1691
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1692
                       'primitive definitions'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1693
                       'primitive variables'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1694
                       'primitive functions'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1695
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1696
                       'source container ...'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1697
                       'remove source container ...'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1698
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1699
                       'revision info' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1700
                       'compare with repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1701
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1702
                       'check into source repository'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1703
                       'fileIn from repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1704
                    ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1705
        selectors := #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1706
                       classFileOutBinary
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1707
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1708
                       classInspect
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1709
                       classInstancesInspect
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1710
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1711
                       classPrimitiveDefinitions
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1712
                       classPrimitiveVariables
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1713
                       classPrimitiveFunctions
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1714
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1715
                       classModifyContainer
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1716
                       classRemoveContainer
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1717
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1718
                       classRevisionInfo
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1719
                       classCompareWithNewestInRepository
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1720
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1721
                       classCheckin
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1722
                       classLoadRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1723
                      ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1724
    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1725
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1726
    specialMenu := PopUpMenu
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1727
                        labels:(resources array:labels)
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1728
                        selectors:selectors
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1729
                        receiver:self.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1730
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1731
    currentClass notNil ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1732
        currentClass sourceCodeManager isNil ifTrue:[
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1733
            specialMenu disableAll:#(classModifyContainer classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1734
                                     classRevisionInfo 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1735
                                     classLoadRevision classCheckin 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1736
                                     classCompareWithNewestInRepository).
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1737
        ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1738
        currentClass isPrivate ifTrue:[
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1739
            specialMenu disableAll:#(
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1740
                                     classFileOutBinary
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1741
                                     classModifyContainer 
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1742
                                     classRemoveContainer
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1743
                                     classRevisionInfo 
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1744
                                     classLoadRevision classCheckin
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1745
                                     classCompareWithNewestInRepository
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1746
                                     classPrimitiveDefinitions
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1747
                                     classPrimitiveVariables
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1748
                                     classPrimitiveFunctions).
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1749
        ]
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1750
    ] ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1751
        SourceCodeManager isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1752
            specialMenu disableAll:#(classLoadNewRevision)
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1753
        ]
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1754
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1755
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1756
    device ctrlDown ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1757
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1758
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1759
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1760
    currentClass isNil ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1761
        labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1762
                       'new class'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1763
                     ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1764
        selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1765
                       classNewClass
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1766
                     ).
246
9f1583be2b81 ask class for its SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  1767
    ] ifFalse:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1768
        currentClass isLoaded ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1769
            labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1770
                           'definition'
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1771
                           'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1772
                           '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1773
                           'new class'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1774
                           '-'
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1775
                           'load'
393
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
            selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1778
                           classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1779
                           classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1780
                           nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1781
                           classNewClass
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1782
                           nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1783
                           classLoad
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1784
                         ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1785
        ] ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1786
            fullProtocol ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1787
                labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1788
                               'hierarchy' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1789
                               'definition' 
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1790
                               'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1791
                               'comment' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1792
                               'class instvars' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1793
                             ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1794
                selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1795
                               classHierarchy
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1796
                               classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1797
                               classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1798
                               classComment
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1799
                               classClassInstVars
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1800
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1801
            ] ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1802
                labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1803
                               'fileOut'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1804
                               'printOut'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1805
                               'printOut protocol'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1806
                             " 'printOut full protocol' "
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1807
                               '-'
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1808
                               'spawn ...' 
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1809
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1810
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1811
                selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1812
                               classFileOut
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1813
                               classPrintOut
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1814
                               classPrintOutProtocol
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1815
                            "  classPrintOutFullProtocol "
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1816
                               nil
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1817
                               spawnMenu
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1818
                               nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1819
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1820
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1821
                spawnMenu := PopUpMenu 
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1822
                            labels:(resources array:#('class' 'full protocol' 'hierarchy' 'subclasses'))
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1823
                            selectors:#(classSpawn classSpawnFullProtocol classSpawnHierarchy classSpawnSubclasses).
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1824
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1825
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1826
                fullClass ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1827
                    labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1828
                               'hierarchy' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1829
                               'definition' 
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1830
                               'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1831
                               'comment' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1832
                               'class instvars' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1833
               "/              'protocols' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1834
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1835
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1836
                    selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1837
                               classHierarchy
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1838
                               classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1839
                               classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1840
                               classComment
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1841
                               classClassInstVars
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1842
               "/              classProtocols 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1843
                               nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1844
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1845
                ].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1846
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1847
                labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1848
                               'class refs'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1849
                               '-'
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1850
                               'new ...'
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1851
                              ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1852
                selectors := selectors , #(
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1853
                               classRefs
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1854
                               nil
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1855
                               newClassMenu
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1856
                              ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1857
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1858
                newClassMenu := PopUpMenu 
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1859
                            labels:(resources array:#('class' 'subclass' 'private class'))
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1860
                            selectors:#(classNewClass classNewSubclass classNewPrivateClass).
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1861
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1862
                labels := labels , #(
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1863
                               'rename ...'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1864
                               'remove'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1865
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1866
                selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1867
                               classRename
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1868
                               classRemove
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1869
                              ).
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1870
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1871
                currentClass wasAutoloaded ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1872
                    labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1873
                               'unload'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1874
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1875
                    selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1876
                               classUnload
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1877
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1878
                ]
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1879
            ]
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1880
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1881
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1882
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1883
    shorties := (Array new:labels size) , #(nil #'Ctrl').
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1884
    (selectors includes:#classNewClass) ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1885
        shorties at:(selectors indexOf:#classNewClass) put:#Cmdn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1886
    ].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1887
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1888
    labels := labels , #(
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
  1889
                          '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1890
                          'others'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1891
                        ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1892
    selectors := selectors , #(
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1893
                          nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1894
                          otherMenu
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1895
                        ).
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1896
    m := PopUpMenu 
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1897
            labels:(resources array:labels)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1898
            selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1899
            accelerators:shorties.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1900
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1901
    newClassMenu notNil ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1902
        m subMenuAt:#newClassMenu put:newClassMenu.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1903
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1904
    spawnMenu notNil ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1905
        m subMenuAt:#spawnMenu put:spawnMenu.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1906
    ].
768
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  1907
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  1908
    (currentClass notNil
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  1909
    and:[currentClass isPrivate]) ifTrue:[
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1910
        m disableAll:#(
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1911
                       classFileOut
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1912
                      )
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1913
    ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1914
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1915
    m subMenuAt:#otherMenu put:specialMenu.
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1916
    ^ m
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1917
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1918
    "Modified: 23.12.1996 / 13:10:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1919
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1920
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1921
classNewClass
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1922
    "create a class-definition prototype in codeview"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1923
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1924
    |nm cls|
105
claus
parents: 98
diff changeset
  1925
claus
parents: 98
diff changeset
  1926
    nm := 'Object'.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1927
    currentClass notNil ifTrue:[
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1928
        (cls := currentClass superclass) notNil ifTrue:[
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1929
            nm := cls name 
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1930
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1931
    ].
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1932
    self 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1933
        classClassDefinitionTemplateFor:nm 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1934
        in:currentClassCategory 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1935
        namespace:false 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1936
        private:false.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1937
    aspect := nil.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1938
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1939
    "Modified: 23.12.1996 / 13:02:44 / cg"
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1940
!
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1941
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1942
classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1943
    "create a class-definition prototype in codeview"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1944
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1945
    self 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1946
        classClassDefinitionTemplateFor:'Object' 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1947
        in:nil 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1948
        namespace:false 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1949
        private:true.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1950
    aspect := nil.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1951
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1952
    "Created: 11.10.1996 / 16:01:20 / cg"
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1953
    "Modified: 23.12.1996 / 13:03:09 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1954
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1955
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1956
classNewSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1957
    "create a subclass-definition prototype in codeview"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1958
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1959
    self doClassMenu:[:currentClass |
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1960
        self classClassDefinitionTemplateFor:(currentClass name) 
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1961
                                          in:(currentClass category)
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1962
                                          namespace:false
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1963
                                          private:false.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1964
        aspect := nil
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1965
    ]
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1966
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  1967
    "Modified: 23.12.1996 / 12:47:33 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1968
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1969
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1970
classPrimitiveDefinitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1971
    "show the classes primitiveDefinition in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1972
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1973
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1974
    self classShowFrom:#primitiveDefinitionsString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1975
                   set:#primitiveDefinitions: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1976
                aspect:#primitiveDefinitions 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1977
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1978
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1979
/*
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1980
 * includes, defines, structure definitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1981
 * and typedefs come here.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1982
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1983
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1984
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1985
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1986
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1987
classPrimitiveFunctions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1988
    "show the classes primitiveFunctions in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1989
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1990
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1991
    self classShowFrom:#primitiveFunctionsString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1992
                   set:#primitiveFunctions: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1993
                aspect:#primitiveFunctions 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1994
               default:'%{
199
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
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1997
 * any local C (helper) functions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1998
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1999
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2000
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2001
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2002
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2003
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2004
classPrimitiveVariables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2005
    "show the classes primitiveVariables in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2006
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2007
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2008
    self classShowFrom:#primitiveVariablesString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2009
                   set:#primitiveVariables: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2010
                aspect:#primitiveVariables 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2011
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2012
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2013
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2014
 * any local C variables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2015
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2016
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2017
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2018
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2019
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2020
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2021
classPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2022
    self classPrintOutWith:#printOutOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2023
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2024
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2025
classPrintOutFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2026
    self classPrintOutWith:#printOutFullProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2027
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2028
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2029
classPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2030
    self classPrintOutWith:#printOutProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2031
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2032
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2033
classPrintOutWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2034
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2035
        |printStream|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2036
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2037
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2038
        currentClass perform:aSelector with:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2039
        printStream close
152
d03618e99b3c show warnbox when autoload fails (instead of running into the debugger)
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
  2040
    ]
105
claus
parents: 98
diff changeset
  2041
!
claus
parents: 98
diff changeset
  2042
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2043
classProtocols
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2044
     ^ self
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2045
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2046
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2047
classRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2048
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2049
        self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2050
            SystemBrowser browseReferendsOf:currentClass name asSymbol
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2051
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2052
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2053
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2054
    "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
  2055
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2056
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2057
classRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2058
    "user requested remove of current class and all subclasses -
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2059
     count subclasses and let user confirm removal."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2060
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2061
    |count t box|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2062
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2063
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2064
        count := currentClass allSubclasses size.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2065
        t := 'remove %1'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2066
        count ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2067
           t := t , '\(with %2 subclass'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2068
           count ~~ 1 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2069
                t := t , 'es'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2070
           ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2071
           t := (t , ')') 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2072
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2073
        t := t , ' ?'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2074
        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
  2075
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2076
        box := YesNoBox 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2077
                   title:t
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2078
                   yesText:(resources at:'remove')
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2079
                   noText:(resources at:'abort').
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2080
        box confirm ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2081
            "after querying user - do really remove current class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2082
             and all subclasses
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2083
            "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2084
            self doClassMenu:[:currentClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2085
                |didRemove|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2086
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2087
                didRemove := false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2088
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2089
                "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2090
                 query ?
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2091
                "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2092
                currentClass allSubclassesDo:[:aSubClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2093
                    (CheckForInstancesWhenRemovingClasses not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2094
                    or:[aSubClass hasInstances not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2095
                    or:[self confirm:(aSubClass name , ' has instances - remove anyway ?')]])
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2096
                        ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2097
                            Smalltalk removeClass:aSubClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2098
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2099
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2100
                (CheckForInstancesWhenRemovingClasses not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2101
                or:[currentClass hasInstances not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2102
                or:[self confirm:(currentClass name , ' has instances - remove anyway ?')]])
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2103
                    ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2104
                        didRemove := true.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2105
                        Smalltalk removeClass:currentClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2106
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2107
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2108
                self switchToClass:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2109
                Smalltalk changed.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2110
                self updateClassList.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2111
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2112
                "if it was the last in its category, update class category list"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2113
"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2114
                classListView numberOfLines == 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2115
                    self updateClassCategoryListWithScroll:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2116
                ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2117
"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2118
                didRemove ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2119
                    methodCategoryListView notNil ifTrue:[methodCategoryListView contents:nil].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2120
                    methodListView notNil ifTrue:[methodListView contents:nil].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2121
                    codeView contents:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2122
                    codeView modified:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2123
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2124
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2125
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2126
    ]
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2127
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2128
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2129
classRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2130
    "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
  2131
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2132
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2133
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2134
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2135
    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
  2136
    box initialText:(currentClass name).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2137
    box action:[:aString | self renameCurrentClassTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2138
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2139
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2140
107
claus
parents: 106
diff changeset
  2141
classShowFrom:getSelector set:setSelector aspect:aspectSymbol default:default
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2142
    "common helper for comment, primitive-stuff etc.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2143
     show the string returned from the classes getSelector-method,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2144
     Set acceptaction to change it via setSelector."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2145
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2146
    self doClassMenu:[:currentClass |
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2147
        |text|
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2148
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2149
        text := currentClass perform:getSelector.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2150
        text isNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2151
            text := default
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2152
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2153
        codeView contents:text.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2154
        codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2155
        codeView acceptAction:[:theCode |
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2156
            Object abortSignal catch:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2157
                lockUpdates := true.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2158
                currentClass perform:setSelector with:theCode asString.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2159
                codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2160
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2161
            lockUpdates := false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2162
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2163
        codeView explainAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2164
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2165
        methodListView notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2166
            methodListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2167
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2168
        aspect := aspectSymbol.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2169
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2170
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2171
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2172
    "Modified: 25.5.1996 / 13:02:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2173
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2174
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2175
classSpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2176
    "create a new SystemBrowser browsing current class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2177
     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
  2178
     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
  2179
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2180
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2181
        |browser|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2182
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2183
        cls isMeta ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2184
            self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2185
                aNamespace allBehaviorsDo:[:aClass |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2186
                    aClass class == cls ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2187
                        browser := SystemBrowser browseClass:aClass.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2188
                        browser instanceProtocol:false.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2189
                        sel notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2190
                            browser switchToMethodNamed:sel
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2191
                        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2192
                        ^ self
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2193
                    ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2194
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2195
            ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2196
            self warn:'oops, no class for this metaclass'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2197
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2198
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2199
        browser := SystemBrowser browseClass:cls. 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2200
        cls hasMethods ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2201
            browser instanceProtocol:false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2202
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2203
        sel notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2204
            browser switchToMethodNamed:sel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2205
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2206
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2207
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2208
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2209
     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
  2210
     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
  2211
    "
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2212
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2213
    "Modified: 20.12.1996 / 15:41:16 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2214
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2215
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2216
classSpawnFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2217
    "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
  2218
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2219
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2220
        SystemBrowser browseFullClassProtocol:cls 
199
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
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2223
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2224
classSpawnHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2225
    "create a new HierarchyBrowser browsing current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2226
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2227
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2228
        SystemBrowser browseClassHierarchy:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2229
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2230
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2231
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2232
classSpawnSubclasses
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2233
    "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
  2234
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2235
    self doClassMenuWithSelection:[:cls :sel |
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2236
        |subs|
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2237
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2238
        subs := OrderedCollection new.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2239
        self classHierarchyOf:cls do:[:aClass :lvl |
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2240
            subs add:(String new:lvl*2) , aClass name
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2241
        ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2242
"/        subs := cls allSubclasses.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2243
        (subs notNil and:[subs size ~~ 0]) ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2244
            SystemBrowser browseClasses:subs 
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2245
                                  title:('subclasses of ' , cls name)
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2246
                                   sort:false
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2247
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2248
    ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2249
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2250
    "Modified: 28.5.1996 / 13:54:53 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2251
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2252
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2253
classUnload
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2254
    "unload an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2255
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2256
    |nm|
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
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2259
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2260
    currentClass unload.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2261
    self switchToClassNamed:nm
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2262
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2263
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2264
classUses
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2265
    "a powerful tool, when trying to learn more about where
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2266
     a class is used. This one searches all uses of a class,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2267
     and shows a list of uses - try it and like it"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2268
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2269
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2270
        self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2271
            SystemBrowser browseUsesOf:currentClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2272
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2273
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2274
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2275
    "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
  2276
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2277
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2278
doClassMenuWithSelection:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2279
    "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
  2280
     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
  2281
     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
  2282
     current class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2283
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2284
    |string words clsName cls sel isMeta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2285
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2286
    string := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2287
    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
  2288
        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
  2289
            clsName := c.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2290
            sel := s.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2291
            isMeta := m.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2292
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2293
        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
  2294
            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
  2295
            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
  2296
            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
  2297
                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
  2298
                (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
  2299
                    isMeta := true.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2300
                    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
  2301
                ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2302
                    isMeta := false
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2303
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2304
                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
  2305
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2306
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2307
        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
  2308
            (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
  2309
                isMeta ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2310
                    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
  2311
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2312
                self withWaitCursorDo:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2313
                    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
  2314
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2315
                ^ self
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2316
            ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2317
                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
  2318
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2319
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2320
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2321
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2322
    classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  2323
        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
  2324
        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
  2325
            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
  2326
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2327
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2328
    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
  2329
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2330
    "Modified: 17.6.1996 / 16:51:49 / stefan"
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  2331
    "Modified: 22.10.1996 / 17:02:11 / cg"
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2332
!
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2333
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2334
nameSpaceNewNameSpace
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2335
    "create a namespace-definition prototype in codeview"
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2336
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2337
    self classClassDefinitionTemplateFor:nil in:nil namespace:true private:false.
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2338
    aspect := nil.
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2339
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2340
    "Modified: 23.12.1996 / 12:47:06 / cg"
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2341
    "Created: 23.12.1996 / 13:11:48 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2342
! !
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2343
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2344
!BrowserView methodsFor:'class list source administration'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2345
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2346
classCheckin
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2347
    "check a class into the source repository"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2348
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2349
    currentClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2350
        self warn:'cannot checkin unloaded classes.'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2351
        ^ 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
  2352
    ].
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2353
    self doClassMenu:[:currentClass |
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2354
        self classCheckin:currentClass withLog:nil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2355
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2356
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2357
    "Created: 23.11.1995 / 11:41:38 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2358
    "Modified: 15.4.1996 / 17:07:07 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2359
!
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2360
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2361
classCheckin:aClass withLog:aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2362
    "check a class into the source repository"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2363
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2364
    |logMessage info mgr|
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2365
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2366
    aClass isLoaded ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2367
        self information:'cannot checkin unloaded classes (' , aClass name , ').'.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2368
        ^ self.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2369
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2370
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2371
    aLogMessage isNil ifTrue:[
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  2372
        logMessage := self getLogMessageFor:aClass name.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2373
        logMessage isNil ifTrue:[^ self].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2374
    ] ifFalse:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2375
        logMessage := aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2376
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2377
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2378
    mgr := (aClass sourceCodeManager).
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2379
    info := mgr sourceInfoOfClass:aClass.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2380
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2381
    (info isNil 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2382
    or:[(info at:#fileName ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2383
    or:[(info at:#module ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2384
    or:[(info at:#directory ifAbsent:nil) isNil]]]) ifTrue:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2385
        (self classCreateSourceContainerFor:aClass) ifFalse:[^ self]. 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2386
        ^ self.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2387
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2388
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2389
    lastSourceLogMessage := logMessage.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2390
    self busyLabel:'checking in %1' with:aClass name.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2391
    Processor activeProcess withLowerPriorityDo:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2392
        (mgr checkinClass:aClass logMessage:logMessage) ifFalse:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2393
            self warn:'checkin failed'.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2394
        ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2395
        aspect == #revisionInfo ifTrue:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2396
            self classListUpdate
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2397
        ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2398
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2399
    self normalLabel.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2400
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2401
    "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
  2402
    "Modified: 15.6.1996 / 00:22:49 / stefan"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2403
    "Modified: 21.12.1996 / 19:01:06 / 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
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2406
classCompareWithNewestInRepository
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2407
    "open a diff-textView comparing the current (in-image) version
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2408
     with the most recent version found in the repository."
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2409
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2410
    currentClass isLoaded ifFalse:[
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2411
        self warn:'cannot compare unloaded classes.'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2412
        ^ 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
  2413
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2414
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2415
    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
  2416
        |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
  2417
         nm msg|
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2418
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2419
        nm := currentClass name.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2420
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2421
        rev := currentClass binaryRevision.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2422
        mgr := currentClass sourceCodeManager.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2423
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2424
        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
  2425
        rev notNil ifTrue:[
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2426
            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
  2427
        ].
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2428
        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
  2429
                     onCancel:nil.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2430
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2431
        rev notNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2432
            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
  2433
                msg := 'extracting newest %1'.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2434
                aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2435
                revString := 'newest'
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2436
            ] ifFalse:[
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2437
                msg := 'extracting previous %1'.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2438
                aStream := mgr getSourceStreamFor:currentClass revision:rev.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2439
                revString := rev
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2440
            ].
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2441
            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
  2442
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2443
            aStream isNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2444
                self warn:'could not extract source from repository'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2445
                ^ self
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2446
            ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2447
            comparedSource := aStream contents asString.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2448
            aStream close.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2449
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2450
            self busyLabel:'generating current source ...' with:nil.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2451
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2452
            aStream := '' writeStream.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2453
            Method flushSourceStreamCache.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2454
            currentClass fileOutOn:aStream withTimeStamp:false.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2455
            currentSource := aStream contents asString.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2456
            aStream close.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2457
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2458
            self busyLabel:'comparing  ...' with:nil.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2459
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2460
            comparedSource = currentSource ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2461
                self information:'versions are identical'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2462
            ] ifFalse:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2463
                thisRevString := currentClass revision.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2464
                thisRevString isNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2465
                    thisRevString := 'no revision'
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2466
                ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2467
                v := DiffTextView 
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2468
                    openOn:currentSource label:'current (' , thisRevString , ')'
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2469
                    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
  2470
                v label:'comparing ' , nm.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2471
            ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2472
            self normalLabel.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2473
        ]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2474
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2475
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2476
    "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
  2477
    "Modified: 12.10.1996 / 17:22:35 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2478
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2479
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2480
classCreateSourceContainerFor:aClass
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2481
    "let user specify the source-repository values for aClass"
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2482
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
  2483
    ^ 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
  2484
        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
  2485
        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
  2486
        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
  2487
        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
  2488
        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
  2489
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2490
    "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
  2491
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2492
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2493
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
  2494
    "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
  2495
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2496
    |box className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2497
     moduleHolder packageHolder fileNameHolder
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2498
     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
  2499
     module package fileName 
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2500
     y component info project nm mgr creatingNew msg|
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2501
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2502
    aClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2503
        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
  2504
        ^ 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
  2505
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2506
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2507
    className := aClass name.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2508
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2509
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2510
    "/ defaults, if nothing at all is known
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2511
    "/
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
  2512
    (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
  2513
        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
  2514
    ].
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
  2515
    (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
  2516
        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
  2517
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2518
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2519
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2520
    "/ 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
  2521
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2522
    (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
  2523
        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
  2524
            (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
  2525
                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
  2526
            ].
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
  2527
            package := nm.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2528
        ].
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
  2529
        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
  2530
            (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
  2531
                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
  2532
            ]
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2533
        ].
257
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
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2536
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2537
    "/ 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
  2538
    "/ if so, take that as a default.
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2539
    "/
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
  2540
    info := (mgr := aClass sourceCodeManager) sourceInfoOfClass:aClass.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2541
    info notNil ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2542
        (info includesKey:#module) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2543
            module := (info at:#module).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2544
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2545
        (info includesKey:#directory) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2546
            package := (info at:#directory).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2547
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2548
        fileName := mgr containerFromSourceInfo:info.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2549
"/        (info includesKey:#fileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2550
"/            fileName := (info at:#fileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2551
"/        ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2552
"/            (info includesKey:#expectedFileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2553
"/                fileName := (info at:#expectedFileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2554
"/            ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2555
"/                (info includesKey:#classFileNameBase) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2556
"/                    fileName := (info at:#classFileNameBase) , '.st'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2557
"/                ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2558
"/            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2559
"/        ]
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2560
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2561
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2562
    fileName isNil ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2563
        fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2564
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2565
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2566
    fileNameHolder := fileName asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2567
    moduleHolder := module asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2568
    packageHolder := package asValue.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2569
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2570
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2571
    "/ 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
  2572
    "/
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2573
    (mgr checkForExistingContainerInModule:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2574
                                   package:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2575
                                 container:fileName) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2576
        "/ for now - this needs more work.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2577
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2578
"/        self information:(resources 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2579
"/                            string:'%1 is already contained in the container:
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2580
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2581
"/    %2 / %3 / %4'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2582
"/                            with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2583
"/                            with:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2584
"/                            with:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2585
"/                            with:fileName).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2586
"/        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2587
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2588
        (Dialog confirm:(resources 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2589
                            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
  2590
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2591
    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2592
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2593
To change it, press continue.'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2594
                            with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2595
                            with:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2596
                            with:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2597
                            with:fileName)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2598
                yesLabel:(resources string:'continue')
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2599
                noLabel:(resources string:'cancel'))
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2600
        ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2601
            ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2602
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2603
        oldModule := module.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2604
        oldPackage := package.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2605
        oldFileName := fileName
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2606
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2607
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2608
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2609
    "/ open a dialog for this
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2610
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2611
    box := DialogBox new.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2612
    box label:title.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2613
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2614
    component := box addTextLabel:boxText withCRs.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2615
    component adjust:#left; borderWidth:0.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2616
    box addVerticalSpace.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2617
    box addVerticalSpace.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2618
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2619
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2620
    component := box addTextLabel:(resources string:'Module:').
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2621
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2622
    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
  2623
    component := box addInputFieldOn:moduleHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2624
    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
  2625
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2626
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2627
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2628
    component := box addTextLabel:'Package:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2629
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2630
    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
  2631
    component := box addInputFieldOn:packageHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2632
    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
  2633
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2634
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2635
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2636
    component := box addTextLabel:'Filename:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2637
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2638
    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
  2639
    component := box addInputFieldOn:fileNameHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2640
    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
  2641
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2642
    box addVerticalSpace.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2643
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2644
    (mgr checkForExistingContainerInModule:module 
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2645
                                   package:package 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2646
                                 container:fileName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2647
        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
  2648
        component adjust:#left; borderWidth:0.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2649
        creatingNew := true.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2650
    ] ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2651
        creatingNew := false.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2652
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2653
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2654
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2655
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2656
    box addAbortButton; addOkButton.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2657
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2658
    box showAtPointer.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2659
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2660
    box accepted ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2661
        module := moduleHolder value withoutSpaces.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2662
        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
  2663
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2664
        fileName := fileNameHolder value withoutSpaces.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2665
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2666
        (fileName endsWith:',v') ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2667
            fileName := fileName copyWithoutLast:2
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2668
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2669
        (fileName endsWith:'.st') ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2670
            fileName := fileName , '.st'
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2671
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2672
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2673
        info := aClass revisionInfo.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2674
        info notNil ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2675
            (info includesKey:#repositoryPathName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2676
                info := nil
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2677
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2678
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2679
        info isNil ifTrue:[
712
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2680
            creatingNew ifFalse:[
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2681
                (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
  2682
                         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
  2683
                    ifFalse:[
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2684
                        ^ false
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2685
                    ].
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2686
            ].
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2687
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2688
            (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
  2689
                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
  2690
                    ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2691
                ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2692
            aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2693
                                               inModule:module 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2694
                                               package:package 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2695
                                               container:fileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2696
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2697
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2698
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2699
        "/ check for the module
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2700
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2701
        (mgr checkForExistingModule:module) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2702
            (createDirs or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2703
                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
  2704
                ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2705
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2706
            (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
  2707
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2708
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2709
            (mgr createModule:module) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2710
                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
  2711
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2712
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2713
        ].
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
  2714
        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
  2715
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2716
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2717
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2718
        "/ check for the package
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2719
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2720
        (mgr checkForExistingModule:module package:package) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2721
            (createDirs or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2722
                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
  2723
                ^ false
349
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
            (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
  2726
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2727
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2728
            (mgr createModule:module package:package) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2729
                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
  2730
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2731
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2732
        ].
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
  2733
        lastPackage := package.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2734
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2735
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2736
        "/ check for the container itself
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2737
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2738
        (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2739
            creatingNew ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2740
                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
  2741
            ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2742
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2743
"/            (oldModule notNil
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2744
"/            and:[(oldModule ~= module)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2745
"/                 or:[oldPackage ~= package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2746
"/                 or:[oldFileName ~= fileName]]])
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2747
"/            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2748
"/                self warn:(resources string:'no change').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2749
"/                ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2750
"/            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2751
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2752
            (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
  2753
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2754
    %2 / %3 / %4  ?'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2755
                                with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2756
                                with:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2757
                                with:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2758
                                with:fileName) withCRs) 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2759
            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2760
                ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2761
            ].  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2762
881
f14c44f081db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
  2763
            aClass updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS-expansion
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2764
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2765
            oldFileName notNil ifTrue:[
878
c7b082dead36 fixed no-version checkin into an existing container
Claus Gittinger <cg@exept.de>
parents: 877
diff changeset
  2766
                msg := ('forced checkin / source container change from ' , oldFileName).
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2767
            ] ifFalse:[
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2768
                msg := 'defined source container'
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2769
            ].
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2770
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2771
            (mgr
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2772
                checkinClass:aClass 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2773
                fileName:fileName 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2774
                directory:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2775
                module:module 
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2776
                logMessage:msg)
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2777
            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2778
                (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
  2779
                    self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2780
                    ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2781
                ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2782
                (mgr
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2783
                    checkinClass:aClass 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2784
                    fileName:fileName 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2785
                    directory:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2786
                    module:module 
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2787
                    logMessage:msg
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2788
                    force:true)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2789
                ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2790
                    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
  2791
                    self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2792
                    ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2793
                ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2794
            ].
878
c7b082dead36 fixed no-version checkin into an existing container
Claus Gittinger <cg@exept.de>
parents: 877
diff changeset
  2795
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2796
            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
  2797
            ^ true
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2798
        ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2799
            (createContainer or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2800
                (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
  2801
                                          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
  2802
                    ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2803
                ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2804
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2805
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2806
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2807
        (mgr
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2808
                createContainerFor:aClass
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2809
                inModule:module
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2810
                package:package
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2811
                container:fileName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2812
            self warn:(resources string:'failed to create container.').
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  2813
            self normalLabel.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2814
            ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2815
        ].
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  2816
        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
  2817
        ^ 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
  2818
    ].
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
  2819
    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
  2820
    ^ 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
  2821
881
f14c44f081db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
  2822
    "Modified: 20.12.1996 / 13:18:42 / cg"
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2823
!
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2824
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2825
classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2826
    "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
  2827
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2828
    |box
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2829
     moduleHolder packageHolder fileNameHolder
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2830
     module package fileName aStream
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2831
     y component mgr|
730
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
    mgr := SourceCodeManager.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2834
    mgr isNil ifTrue:[^ false].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2835
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2836
    fileNameHolder := '' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2837
    moduleHolder := (OperatingSystem getLoginName) asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2838
    packageHolder := 'private' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2839
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2840
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2841
    "/ 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
  2842
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2843
    box := DialogBox new.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2844
    box label:'container fileIn'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2845
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2846
    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
  2847
    component adjust:#left; borderWidth:0.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2848
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2849
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2850
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2851
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2852
    component := box addTextLabel:(resources string:'Module:').
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2853
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2854
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2855
    component := box addInputFieldOn:moduleHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2856
    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
  2857
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2858
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2859
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2860
    component := box addTextLabel:'Package:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2861
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2862
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2863
    component := box addInputFieldOn:packageHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2864
    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
  2865
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2866
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2867
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2868
    component := box addTextLabel:'Filename:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2869
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2870
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2871
    component := box addInputFieldOn:fileNameHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2872
    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
  2873
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2874
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2875
    box addAbortButton; addOkButton.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2876
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2877
    box showAtPointer.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2878
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2879
    box destroy.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2880
    box accepted ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2881
        ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2882
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2883
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2884
    module := moduleHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2885
    package := packageHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2886
    fileName := fileNameHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2887
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2888
    (fileName endsWith:',v') ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2889
        fileName := fileName copyWithoutLast:2
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2890
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2891
    (fileName endsWith:'.st') ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2892
        fileName := fileName , '.st'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2893
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2894
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2895
    (mgr checkForExistingContainerInModule:module 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2896
                                   package:package 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2897
                                 container:fileName) ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2898
        self warn:'no such container'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2899
        ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2900
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2901
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2902
    aStream := mgr 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2903
            streamForClass:nil 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2904
            fileName:fileName 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2905
            revision:#newest
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2906
            directory:package
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2907
            module:module
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2908
            cache:false.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2909
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2910
    aStream isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2911
        self warn:'could not fileIn from repository'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2912
        ^ false.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2913
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2914
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2915
    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
  2916
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2917
    Class withoutUpdatingChangesDo:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2918
        [
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2919
            aStream fileIn.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2920
        ] valueNowOrOnUnwindDo:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2921
            aStream close.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2922
            self normalLabel.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2923
            Smalltalk changed.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2924
        ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2925
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2926
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2927
    ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2928
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2929
    "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
  2930
    "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
  2931
!
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2932
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2933
classLoadRevision
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2934
    "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
  2935
     upgrade a class to the newest revision"
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2936
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  2937
    currentClass isLoaded ifFalse:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2938
        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
  2939
        ^ self.
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  2940
    ].
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  2941
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2942
    self doClassMenu:[:currentClass |
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2943
        |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
  2944
         newClass prevCategory ok|
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2945
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2946
        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
  2947
        rev notNil ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2948
            className := currentClass name.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2949
            (className includesString:'_rev_') ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2950
                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
  2951
                ^ self
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2952
            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2953
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2954
            mgr := currentClass sourceCodeManager.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2955
            ok := false.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2956
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2957
            rev withoutSpaces isEmpty ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2958
                what := className , '(newest)'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2959
                self busyLabel:'extracting %1' with:what.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2960
                aStream := mgr getMostRecentSourceStreamForClassNamed:className.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2961
                revString := 'newest'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2962
                keep := false.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2963
            ] ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2964
                what := className , '(' , rev , ')'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2965
                self busyLabel:'extracting %1' with:what.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2966
                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
  2967
                revString := rev.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2968
                keep := true.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2969
            ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2970
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2971
            aStream isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2972
                self warn:'cannot find classes source.'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2973
                ^ self.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2974
            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2975
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2976
            self busyLabel:'loading %1' with:what .
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2977
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2978
            [
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2979
                Class withoutUpdatingChangesDo:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2980
                    "/ rename the current class - for backup
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2981
                    prevCategory := currentClass category.    
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2982
                    currentClass category:'* obsolete *'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2983
                    Smalltalk renameClass:currentClass to:className , '_saved'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2984
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2985
                    aStream fileIn.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2986
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2987
                    "/ did that work ?
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2988
                    newClass := Smalltalk at:className ifAbsent:nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2989
                    newClass isNil ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2990
                        self warn:'fileIn failed - undoing changes ...'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2991
                        Smalltalk renameClass:currentClass to:className.                        
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2992
                        currentClass category:prevCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2993
                    ] ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2994
                        "/
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2995
                        "/ 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
  2996
                        "/ current class
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2997
                        "/
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2998
                        keep ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  2999
                            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
  3000
                            newClass category:'* old versions *'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3001
                            Smalltalk renameClass:currentClass to:className.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3002
                            currentClass category:prevCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3003
                        ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3004
                        ok := true.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3005
                    ]
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3006
                ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3007
            ] valueNowOrOnUnwindDo:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3008
                aStream close.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3009
                self normalLabel.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3010
                Smalltalk changed.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3011
            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3012
            ok ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3013
                self switchToClassNamed:newClass name.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3014
            ]    
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3015
        ]
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3016
    ]
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3017
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3018
    "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
  3019
    "Modified: 12.10.1996 / 17:22:40 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3020
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3021
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3022
classModifyContainer
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3023
    "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
  3024
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3025
    currentClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3026
        self warn:'dont know anything about unloaded classes.'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3027
        ^ self.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3028
    ].
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3029
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3030
    self doClassMenu:[:currentClass |
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3031
        self 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3032
            classDefineSourceContainerFor:currentClass 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3033
            title:(resources string:'Repository information for %1' with:currentClass name)
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3034
            text:'defining/changing the source code container'
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3035
            createDirectories:true createContainer:true. 
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3036
    ]
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3037
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3038
    "Created: 23.11.1995 / 11:41:38 / cg"
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3039
    "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
  3040
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3041
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3042
classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3043
    "remove a container from the source repository"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3044
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3045
    currentClass isLoaded ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3046
        self warn:'please load the class first'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3047
        ^ self.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3048
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3049
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3050
    self doClassMenu:[:currentClass |
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3051
        self 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3052
            classRemoveSourceContainerFor:currentClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3053
    ]
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
    "Created: 23.11.1995 / 11:41:38 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3056
    "Modified: 11.9.1996 / 12:55:42 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3057
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3058
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3059
classRemoveSourceContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3060
    "show container & let user confirm twice."
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3061
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  3062
    |module package fileName info mgr|
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3063
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3064
    aClass isLoaded ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3065
        self warn:'please load the class first'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3066
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3067
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3068
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3069
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3070
    "/ 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
  3071
    "/ if so, take that as a default.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3072
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3073
    mgr := aClass sourceCodeManager.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3074
    mgr isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3075
        self warn:'No sourceCodeManagement.'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3076
        ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3077
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3078
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3079
    info := mgr sourceInfoOfClass:aClass.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3080
    info notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3081
        (info includesKey:#module) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3082
            module := (info at:#module).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3083
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3084
        (info includesKey:#directory) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3085
            package := (info at:#directory).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3086
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3087
        fileName := mgr containerFromSourceInfo:info.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3088
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3089
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3090
    module isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3091
        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
  3092
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3093
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3094
    package isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3095
        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
  3096
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3097
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3098
    fileName isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3099
        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
  3100
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3101
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3102
        
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3103
    (mgr checkForExistingContainerInModule:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3104
                                   package:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3105
                                 container:fileName) ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3106
        self warn:'Class has no source container.' withCRs.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3107
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3108
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3109
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3110
    (Dialog
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3111
        choose:(resources 
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3112
                    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
  3113
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3114
container:    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3115
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3116
Really remove ?' 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3117
                    with:aClass name 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3118
                    with:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3119
                    with:package 
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3120
                    with:fileName) 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3121
        labels:(Array 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3122
                    with:(resources string:'no') 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3123
                    with:(resources string:'remove'))
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3124
        values:#(false true)
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3125
        default:false) ifFalse:[
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3126
        ^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3127
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3128
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3129
    (mgr removeContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3130
                   inModule:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3131
                    package:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3132
                  container:fileName) ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3133
        self warn:(resources string:'failed to remove container.').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3134
        self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3135
        ^ true.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3136
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3137
    ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3138
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3139
    "Created: 11.9.1996 / 13:06:14 / cg"
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3140
    "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
  3141
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3142
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3143
classRevisionInfo
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3144
    "show current classes revision info in codeView"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3145
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3146
    self doClassMenu:[:currentClass |
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3147
        |aStream info info2 s rv mgr fn msg|
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3148
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3149
        aStream := WriteStream on:(String new:200).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3150
        currentClass notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3151
            Processor activeProcess withLowerPriorityDo:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3152
                self busyLabel:'extracting revision info' with:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3153
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3154
                info := currentClass revisionInfo.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3155
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3156
                rv := currentClass binaryRevision.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3157
                rv notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3158
                    aStream nextPutLine:'**** Loaded classes binary information ****'; cr.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3159
                    aStream nextPutLine:'  Binary based upon : ' , rv.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3160
                    aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3161
                ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3162
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3163
                info notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3164
                    (info includesKey:#revision) ifFalse:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3165
                        aStream nextPutLine:'WARNING:'; cr.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3166
                        aStream nextPutLine:'  The class seems not to be loaded from the repository.'.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3167
                        aStream nextPutLine:'  Check carefully before checking anything in.'.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3168
                        aStream nextPutLine:'  (i.e. compare with repository for renamed class(es), same-name but unrelated etc.)'.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3169
                        aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3170
                    ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3171
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3172
                    aStream nextPutLine:'**** Classes source information ****'; cr.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3173
                    s := info at:#repositoryPath ifAbsent:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3174
                    s notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3175
                        aStream nextPutLine:'  Source repository : ' , s
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3176
                    ].
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3177
                    aStream nextPutLine:'  Filename ........ : ' , (info at:#fileName ifAbsent:'?').
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3178
                    aStream nextPutLine:'  Revision ........ : ' , (info at:#revision ifAbsent:'?').
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3179
                    aStream nextPutLine:'  Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?').
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3180
                    aStream nextPutLine:'  Checkin user .... : ' , (info at:#user ifAbsent:'?').
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3181
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3182
                    (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3183
                        aStream nextPutLine:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?').
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3184
                        aStream nextPutLine:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?').
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3185
                    ].
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3186
                    aStream nextPutLine:'  Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?').
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3187
                    aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3188
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3189
                    (mgr := currentClass sourceCodeManager) notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3190
                        aStream nextPutLine:'**** Repository information ****'; cr.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3191
                        mgr writeRevisionLogOf:currentClass to:aStream.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3192
                    ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3193
                ] ifFalse:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3194
                    aStream nextPutLine:'No revision info found'.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3195
                    currentClass isLoaded ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3196
                        aStream cr; nextPutAll:'This is an autoloaded class - you may see more after its loaded.'
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3197
                    ] ifTrue:[
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3198
                        fn := currentClass classFilename.
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3199
                        currentClass wasAutoloaded ifTrue:[
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3200
                            msg := 'This class was autoloaded.'.
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3201
                            fn notNil ifTrue:[
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3202
                                msg := msg , ' (from ''' , fn , ''')'.
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3203
                            ].
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3204
                        ] ifFalse:[
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3205
                            fn notNil ifTrue:[
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3206
                                msg := 'This class was loaded from ''' , fn , '''.'
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3207
                            ].
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3208
                        ].
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3209
                        msg notNil ifTrue:[
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3210
                            aStream cr; nextPutAll:msg.
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3211
                        ]
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3212
                    ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3213
                ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3214
            ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3215
        ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3216
        codeView contents:(aStream contents).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3217
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3218
        codeView modified:false.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3219
        codeView acceptAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3220
        codeView explainAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3221
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3222
            methodListView setSelection:nil
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3223
        ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3224
        aspect := #revisionInfo. 
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3225
        self normalLabel
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3226
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3227
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3228
    "Created: 14.11.1995 / 16:43:15 / cg"
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3229
    "Modified: 11.11.1996 / 10:09:28 / cg"
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3230
!
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3231
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3232
getLogMessageFor:aString
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3233
    "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
  3234
     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
  3235
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3236
    |dialog textView|
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3237
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3238
    dialog := Dialog new.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3239
    (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
  3240
    textView := dialog addTextBoxOn:nil 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3241
                        class:EditTextView
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3242
                        withNumberOfLines:10 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3243
                        hScrollable:true 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3244
                        vScrollable:true.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3245
    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
  3246
    textView contents:lastSourceLogMessage.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3247
    dialog addAbortButton; addOkButton.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3248
    dialog open.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3249
    dialog accepted ifTrue:[
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3250
        ^ textView contents
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3251
    ].
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3252
    ^ nil
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3253
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3254
    "Created: 15.6.1996 / 00:20:46 / stefan"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3255
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3256
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3257
!BrowserView methodsFor:'class stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3258
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3259
allClassesInCategory:aCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3260
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3261
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3262
    currentNamespace = '* all *' ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3263
        ^ Smalltalk allClassesInCategory:currentClassCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3264
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3265
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3266
    classes := Set new.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3267
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3268
    (self listOfNamespaces) do:[:aNamespace |
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3269
        aNamespace allBehaviorsDo:[:aClass |
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3270
            |actualNamespace nm|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3271
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3272
            aClass isMeta ifFalse:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3273
                (aCategory = '* all *'
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3274
                or:[aClass category = aCategory]) ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3275
                    (aClass isNamespace not
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3276
                    or:[aClass == Smalltalk]) ifTrue:[
887
ad1d6b0ed970 namespace fixes
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  3277
                        actualNamespace := aClass nameSpace.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3278
                        (actualNamespace isNamespace not "/ a private class
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3279
                        or:[actualNamespace == aNamespace]) ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3280
                            classes add:aClass
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3281
                        ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3282
                    ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3283
                ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3284
            ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3285
        ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3286
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3287
    ^ classes
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3288
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3289
    "Created: 23.12.1996 / 10:26:28 / cg"
887
ad1d6b0ed970 namespace fixes
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  3290
    "Modified: 23.12.1996 / 11:33:13 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3291
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3292
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3293
allClassesInCategory:aCategory do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3294
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3295
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3296
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3297
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3298
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3299
    "Modified: 23.12.1996 / 10:30:00 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3300
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3301
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3302
allClassesInCategory:aCategory inOrderDo:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3303
    "evaluate the argument, aBlock for all classes in aCategory;
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3304
     superclasses come first - then subclasses"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3305
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3306
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3307
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3308
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3309
    classes topologicalSort:[:a :b | b isSubclassOf:a].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3310
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3311
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3312
    "Created: 23.12.1996 / 10:27:52 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3313
    "Modified: 23.12.1996 / 10:30:07 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3314
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3315
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3316
checkClassSelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3317
    "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
  3318
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3319
    currentClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3320
        self warn:'select a class first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3321
        ^ false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3322
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3323
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3324
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3325
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3326
classClassDefinitionTemplateFor:name in:cat namespace:isNameSpace private:isPrivate
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3327
    "common helper for newClass and newSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3328
     - 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
  3329
     Also, set acceptaction to install the class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3330
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3331
    currentMethodCategory := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3332
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3333
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3334
    classListView setSelection:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3335
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3336
    fullClass ifFalse:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3337
        methodCategoryListView contents:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3338
        methodListView contents:nil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3339
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3340
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3341
    codeView contents:(self classTemplateFor:name in:cat namespace:isNameSpace private:isPrivate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3342
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3343
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3344
    codeView acceptAction:[:theCode |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3345
        codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3346
        Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3347
            |cls|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3348
746
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3349
            Object errorSignal handle:[:ex |
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3350
                codeView error:ex errorString
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3351
                         position:1 to:nil from:nil.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3352
            ] do:[
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3353
                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
  3354
                cls isBehavior ifTrue:[
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3355
                    codeView modified:false.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3356
                    self classCategoryUpdate.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3357
                    self updateClassListWithScroll:false.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3358
                    cls isNamespace ifFalse:[
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3359
                        self switchToClassNamed:(cls name).
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3360
                    ]
746
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3361
                ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3362
            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3363
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3364
        codeView cursor:(Cursor normal).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3365
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3366
    codeView explainAction:nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3367
    self switchToClass:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3368
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3369
    "Created: 23.12.1996 / 12:45:43 / cg"
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3370
    "Modified: 23.12.1996 / 12:52:51 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3371
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3372
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3373
classListUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3374
    RememberAspect ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3375
        aspect == #hierarchy ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3376
            ^ self classHierarchy
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3377
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3378
        aspect == #classInstVars ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3379
            ^ self classClassInstVars
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3380
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3381
        aspect == #comment ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3382
            ^ self classComment
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3383
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3384
        aspect == #primitiveDefinitions ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3385
            ^ self classPrimitiveDefinitions
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3386
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3387
        aspect == #primitiveFunctions ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3388
            ^ self classPrimitiveFunctions
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3389
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3390
        aspect == #primitiveVariables ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3391
            ^ self classPrimitiveVariables
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3392
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3393
        aspect == #revisionInfo ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3394
            ^ self classRevisionInfo
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3395
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3396
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3397
    self classDefinition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3398
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3399
    "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
  3400
    "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
  3401
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3402
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3403
classSelection:lineNr
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3404
    "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
  3405
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  3406
    |cls nm oldSelector|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3407
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3408
    (currentClassHierarchy notNil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3409
     and:[fullProtocol]) ifTrue:[
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3410
        oldSelector := currentSelector.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3411
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3412
        self updateMethodCategoryListWithScroll:false.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3413
        self updateMethodListWithScroll:false.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3414
        fullProtocol ifFalse:[
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3415
            self updateVariableList.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3416
        ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3417
        oldSelector notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3418
            self switchToMethod:oldSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3419
            currentMethod notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3420
                self switchToMethodCategory:(currentMethod category).
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3421
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3422
        ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3423
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3424
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3425
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  3426
    nm := classListView selectionValue withoutSpaces.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3427
    cls := self findClassNamed:nm.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3428
    cls notNil ifTrue:[
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3429
        self switchToClass:cls.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3430
        self classSelectionChanged
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  3431
    ] ifFalse:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3432
        self warn:'oops - no class named: ' , nm , ' found in selected namespace(s)'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3433
    ]
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3434
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3435
    "Modified: 20.12.1996 / 16:41:35 / cg"
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
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3438
classSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3439
    |oldMethodCategory oldMethod oldSelector|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3440
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3441
    self withWaitCursorDo:[
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3442
        aspect := #definition.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3443
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3444
        oldMethodCategory := currentMethodCategory.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3445
        oldMethod := currentMethod.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3446
        oldSelector := currentSelector.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3447
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3448
        showInstance ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3449
            actualClass := acceptClass := currentClass
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3450
        ] ifFalse:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3451
            actualClass := acceptClass := currentClass class
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3452
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3453
        currentMethodCategory := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3454
        currentMethod := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3455
        currentSelector := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3456
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3457
        self updateMethodCategoryList.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3458
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3459
        oldMethodCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3460
            methodCategoryListView setSelectElement:oldMethodCategory.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3461
            methodCategoryListView hasSelection ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3462
                currentMethodCategory := oldMethodCategory.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3463
                self methodCategorySelectionChanged
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3464
            ]
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3465
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3466
        self updateMethodList.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3467
        self updateCodeView.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  3468
        self updateVariableList.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3469
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3470
        fullClass ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3471
            codeView acceptAction:[:theCode |
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3472
                codeView cursor:Cursor execute.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3473
                Object abortSignal catch:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3474
                    self compileCode:theCode asString.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3475
                    codeView modified:false.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3476
                ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3477
                codeView cursor:Cursor normal.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3478
            ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3479
        ] ifFalse:[
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3480
"/            self classDefinition.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3481
self classListUpdate.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3482
            codeView acceptAction:[:theCode |
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3483
                codeView cursor:Cursor execute.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3484
                Object abortSignal catch:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3485
                    (Compiler evaluate:theCode asString notifying:codeView compile:false)
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3486
                    isBehavior ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3487
                        self classCategoryUpdate.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3488
                        self updateClassListWithScroll:false.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3489
                        codeView modified:false.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3490
                    ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3491
                ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3492
                codeView cursor:Cursor normal.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3493
            ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3494
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3495
        codeView explainAction:nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3496
888
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  3497
        (classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3498
            (currentClassCategory = currentClass category) ifFalse:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3499
                currentClassCategory := currentClass category.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3500
                classCategoryListView setSelectElement:currentClassCategory
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3501
            ]
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3502
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3503
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3504
        self setDoitActionForClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3505
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3506
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3507
    "Created: 23.11.1995 / 11:32:03 / cg"
888
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  3508
    "Modified: 23.12.1996 / 12:24:16 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3509
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3510
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3511
classTemplateFor:className in:categoryString namespace:isNameSpace private:isPrivate
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3512
    "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
  3513
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3514
    |cat aString name nameProto namePrefix i existingNames|
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3515
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3516
    isNameSpace ifTrue:[
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3517
        ^ 'Namespace name:''NewNameSpace'''
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3518
    ].
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3519
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3520
    cat := categoryString.
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3521
    (cat isNil or:[cat startsWith:'*']) ifTrue:[
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3522
        cat := '* no category *'
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3523
    ].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3524
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3525
    nameProto := 'NewClass'.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3526
    i := 1.
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3527
    isPrivate ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3528
        namePrefix := currentClass name , '::'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3529
        existingNames := currentClass privateClasses.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3530
        existingNames notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3531
            existingNames := existingNames collect:[:cls | cls name].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3532
        ]
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3533
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3534
        namePrefix := ''.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3535
        existingNames := Smalltalk keys
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3536
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3537
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3538
    name := 'NewClass' , i printString.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3539
    existingNames notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3540
        nameProto := namePrefix , name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3541
        [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3542
            i := i + 1.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3543
            name := 'NewClass' , i printString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3544
            nameProto := namePrefix , name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3545
        ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3546
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3547
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3548
    isPrivate ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3549
        aString := className , ' subclass:#' , name  , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3550
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3551
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3552
' , '    poolDictionaries: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3553
' , '    privateIn:' , currentClass name printString
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3554
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3555
        aString := className , ' subclass:#' , name , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3556
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3557
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3558
' , '    poolDictionaries: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3559
' , '    category: '''.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3560
        cat notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3561
            aString := aString , cat
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3562
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3563
        aString := aString , ''''
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3564
    ].
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3565
    aString := aString , '
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3566
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3567
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3568
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3569
 Replace ''' , className , ''', ''', name , ''' and
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3570
 the empty string arguments by true values.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3571
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3572
 Install (or change) the class by ''accepting'',
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3573
 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
  3574
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3575
 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
  3576
 add some documentation; preferably under the classes documentation
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3577
 protocol.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3578
 (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
  3579
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3580
'.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3581
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3582
    (currentNamespace notNil 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3583
    and:[currentNamespace ~= '* all *'
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3584
    and:[currentNamespace ~= Smalltalk]]) ifTrue:[
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3585
        aString := '"{ Namespace: ''' , currentNamespace name , ''' }"
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3586
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3587
' , aString
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3588
    ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3589
    ^ aString
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3590
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3591
    "Created: 23.12.1996 / 12:46:31 / cg"
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3592
    "Modified: 23.12.1996 / 13:02:08 / cg"
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3593
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3594
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3595
doClassMenu:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3596
    "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
  3597
     while showing waitCursor"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3598
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3599
    self checkClassSelected ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3600
        self withWaitCursorDo:[aBlock value:currentClass]
199
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
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3603
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3604
listOfAllClassesInCategory:aCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3605
    "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
  3606
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3607
    |newList classNames searchCategory nm owner|
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3608
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3609
    "/ keep track of added names (care for obsolete classes)
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3610
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3611
    classNames := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3612
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3613
    (aCategory = '* hierarchy *') ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3614
        newList := OrderedCollection new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3615
        self classHierarchyOf:Object do:[:aClass :lvl|
848
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  3616
            (aClass isNamespace not
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3617
            or:[aClass == Smalltalk]) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3618
                nm := self displayedClassNameOf:aClass.
841
4d803d693dfa hide namespaces in class & category lists
Claus Gittinger <cg@exept.de>
parents: 839
diff changeset
  3619
                (classNames includes:nm) ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3620
                    "/ show classes from other nameSpaces in italic
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3621
                    (currentNamespace ~= '* all *'
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3622
                    and:[(self findClassNamedInNameSpace:nm) isNil]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3623
                        nm := (String new:lvl*2) , (nm asText emphasizeAllWith:#italic).
841
4d803d693dfa hide namespaces in class & category lists
Claus Gittinger <cg@exept.de>
parents: 839
diff changeset
  3624
                    ] ifFalse:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3625
                        nm := (String new:lvl*2) , nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3626
                    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3627
                    classNames add:nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3628
                    newList add:nm
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  3629
                ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3630
                
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3631
"/                nm := aClass nameWithoutPrefix.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3632
"/            
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3633
"/                "/ is it in one of the selected namespaces ?
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3634
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3635
"/                (self findClassNamed:aClass name) isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3636
"/                    classNames add:(aClass name).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3637
"/                    newList add:(((String new:lvl) , nm) asText emphasizeAllWith:#italic)
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3638
"/                ] ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3639
"/                    currentNamespace = aClass nameSpace ifFalse:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3640
"/                        nm := aClass nameSpace name , '::' , aClass nameWithoutPrefix
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3641
"/                    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3642
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3643
"/                    (classNames includes:nm) ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3644
"/                        classNames add:nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3645
"/                        newList add:(String new:lvl) , nm
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3646
"/                    ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3647
"/                ]
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3648
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3649
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3650
        ^ newList
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3651
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3652
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
  3653
    newList := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3654
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3655
    (aCategory = '* all *') ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3656
        (self listOfNamespaces) do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3657
            aNamespace allBehaviorsDo:[:aClass |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3658
                |actualNamespace nm|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3659
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3660
                aClass isMeta ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3661
                    (aClass isNamespace not
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3662
                    or:[aClass == Smalltalk]) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3663
                        nm := self displayedClassNameOf:aClass.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3664
                        (classNames includes:nm) ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3665
                            actualNamespace := aClass nameSpace.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3666
                            (actualNamespace isNamespace not "/ a private class
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3667
                            or:[actualNamespace == aNamespace]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3668
                                classNames add:nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3669
                                newList add:aClass
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3670
                            ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3671
                        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3672
                    ]
841
4d803d693dfa hide namespaces in class & category lists
Claus Gittinger <cg@exept.de>
parents: 839
diff changeset
  3673
                ]
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3674
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3675
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3676
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3677
        (aCategory = '* no category *') ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3678
            searchCategory := nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3679
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3680
            searchCategory := aCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3681
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3682
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3683
        (self listOfNamespaces) do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3684
            aNamespace allBehaviorsDo:[:aClass |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3685
                |thisCategory actualNamespace nm|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3686
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3687
                aClass isMeta ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3688
                    (aClass isNamespace not
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3689
                    or:[aClass == Smalltalk]) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3690
                        thisCategory := aClass category.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3691
                        ((thisCategory = searchCategory) 
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3692
                        or:[thisCategory = aCategory]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3693
                            nm := self displayedClassNameOf:aClass.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3694
                            (classNames includes:nm) ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3695
                                actualNamespace := aClass nameSpace.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3696
                                (actualNamespace isNamespace not "/ a private class
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3697
                                or:[actualNamespace == aNamespace]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3698
                                    classNames add:nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3699
                                    newList add:aClass
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3700
                                ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3701
                            ]
841
4d803d693dfa hide namespaces in class & category lists
Claus Gittinger <cg@exept.de>
parents: 839
diff changeset
  3702
                        ]
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3703
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3704
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3705
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3706
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3707
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3708
    (newList size == 0) ifTrue:[^ nil].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3709
    newList := newList asOrderedCollection sort:[:a :b | (self displayedClassNameOf:a) < (self displayedClassNameOf:b)].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3710
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3711
    "/ collect names & indent after sorting
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3712
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3713
    newList := newList collect:[:cls |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3714
        | nm owner s |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3715
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3716
        nm := self displayedClassNameOf:cls.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3717
        s := nm.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3718
        owner := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3719
        [ (owner := owner owningClass) notNil ] whileTrue:[    
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3720
            s := '  ' , s
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3721
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3722
        s
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3723
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3724
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  3725
    ^ newList
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  3726
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3727
    "Modified: 21.12.1996 / 20:53:17 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3728
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3729
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3730
listOfClassHierarchyOf:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3731
    "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
  3732
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3733
    |startClass classes thisOne|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3734
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3735
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3736
        startClass := aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3737
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3738
        startClass := aClass class.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3739
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3740
    classes := startClass allSuperclasses.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3741
    thisOne := Array with:startClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3742
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3743
    classes notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3744
        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
  3745
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3746
        classes := thisOne
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3747
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3748
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3749
    fullProtocol ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3750
        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
  3751
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3752
    ^ classes collect:[:c | c name]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3753
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3754
    "Modified: 20.12.1996 / 17:13:36 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3755
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3756
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3757
renameCurrentClassTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3758
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3759
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3760
    self doClassMenu:[:currentClass |
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3761
        |oldName oldSym newSym cls|
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3762
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3763
        (cls := Smalltalk classNamed:aString) notNil ifTrue:[
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3764
            (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
  3765
                ifFalse:[^ self]
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3766
        ].
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3767
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3768
        oldName := currentClass name.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3769
        oldSym := oldName asSymbol.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3770
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3771
        currentClass setName:aString.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3772
        newSym := aString asSymbol.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3773
        Smalltalk at:oldSym put:nil.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3774
        Smalltalk removeKey:oldSym.            
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3775
        Smalltalk at:newSym put:currentClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3776
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3777
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3778
        currentClass renameTo:aString.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3779
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3780
        Smalltalk renameClass:currentClass to:aString.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3781
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3782
        self updateClassList.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3783
        self updateMethodCategoryListWithScroll:false.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3784
        self updateMethodListWithScroll:false.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3785
        self withWaitCursorDo:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  3786
            Transcript showCR:('searching for users of ' , oldSym); endEntry.
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3787
            SystemBrowser browseReferendsOf:oldSym warnIfNone:false
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3788
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3789
    ]
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
  3790
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
  3791
    "Created: 25.11.1995 / 13:02:53 / cg"
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  3792
    "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
  3793
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3794
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3795
switchToClass:newClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3796
    "switch to some other class;
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3797
     keep instance protocol as it was ..."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3798
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3799
    |cls meta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3800
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
  3801
"/    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
  3802
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
  3803
    self releaseClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3804
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3805
    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
  3806
    cls isMeta ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3807
        meta := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3808
        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
  3809
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3810
        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
  3811
    ].
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
  3812
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3813
    currentClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3814
    showInstance ifTrue:[
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3815
       actualClass := acceptClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3816
    ] 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
  3817
       actualClass := acceptClass := meta.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3818
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3819
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3820
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3821
        cls addDependent:self.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3822
        meta addDependent:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3823
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3824
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3825
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3826
    "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
  3827
    "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
  3828
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3829
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3830
switchToClassNameMatching:aMatchString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3831
    |classNames thisName box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3832
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3833
    classNames := Set new.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3834
    Smalltalk allBehaviorsDo:[:aClass |
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3835
        thisName := aClass name.
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3836
        (aMatchString match:thisName) ifTrue:[
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3837
            classNames add:thisName
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3838
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3839
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3840
    (classNames size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3841
    (classNames size == 1) ifTrue:[
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3842
        ^ self switchToClassNamed:(classNames first)
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3843
    ].
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3844
    classNames := classNames asArray sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3845
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3846
    box := self listBoxTitle:'select class to switch to:'
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3847
                      okText:'ok'
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3848
                        list:classNames.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3849
    box action:[:aString | self switchToClassNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3850
    box showAtPointer
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3851
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3852
    "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
  3853
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3854
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3855
switchToClassNamed:aString
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3856
    |meta str classSymbol theClass newCat element idx l|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3857
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3858
    meta := false.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3859
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3860
    str := aString.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3861
    (aString endsWith:' class') ifTrue:[
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3862
        str := aString copyWithoutLast:6.
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3863
        meta := true
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3864
    ].
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3865
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3866
    theClass := self findClassNamed:str.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3867
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3868
    classCategoryListView notNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3869
        classCategoryListView list size == 0 ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3870
            classCategoryListView list:(self listOfAllClassCategories).
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3871
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3872
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3873
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3874
    theClass == currentClass ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3875
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3876
    theClass isBehavior ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3877
        classCategoryListView notNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3878
            currentClassHierarchy isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3879
                ((newCat := theClass category) ~= currentClassCategory) ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3880
                    currentClassCategory := newCat.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3881
                    newCat isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3882
                        element := '* no category *'
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3883
                    ] ifFalse:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3884
                        element := newCat.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3885
                    ].
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3886
                    classCategoryListView setSelectElement:element.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3887
                    "/ classCategoryListView makeSelectionVisible.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3888
                ]
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3889
            ]
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3890
        ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3891
        self updateClassList.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3892
        self switchToClass:theClass.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3893
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3894
        l := classListView list.
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3895
        l notNil ifTrue:[
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3896
            idx := l findFirst:[:line | line withoutSpaces = str].
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3897
            classListView selection:idx.
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3898
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3899
"/            classListView setSelectElement:str.
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  3900
        ].
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  3901
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3902
        self instanceProtocol:meta not.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3903
        self classSelectionChanged.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3904
        classCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3905
            classCategoryListView setSelectElement:theClass category
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  3906
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3907
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3908
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3909
    "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
  3910
    "Modified: 17.6.1996 / 16:54:55 / stefan"
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  3911
    "Modified: 20.12.1996 / 22:09:13 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3912
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3913
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3914
updateClassList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3915
    self updateClassListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3916
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3917
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3918
updateClassListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3919
    |classes oldClassName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3920
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3921
    classListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3922
        "
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3923
         refetch in case we are not up to date
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3924
        "
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3925
        (currentClass notNil and:[fullProtocol not]) ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3926
            oldClassName := currentClass name.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3927
            currentClass := self findClassNamed:oldClassName.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3928
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3929
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3930
        currentClassCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3931
            classes := self listOfAllClassesInCategory:currentClassCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3932
        ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3933
            currentClassHierarchy notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3934
                classes := self listOfClassHierarchyOf:currentClassHierarchy
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3935
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3936
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3937
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3938
        classListView list = classes ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3939
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3940
                classListView contents:classes
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3941
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3942
                classListView setContents:classes
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3943
            ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3944
            oldClassName notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3945
                classListView setContents:classes.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3946
                classListView setSelectElement:oldClassName
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3947
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3948
                variableListView notNil ifTrue:[variableListView contents:nil]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3949
            ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3950
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3951
            scroll ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3952
                fullProtocol ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3953
                    classListView scrollToBottom
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3954
                ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3955
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3956
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3957
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3958
883
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
  3959
    "Modified: 20.12.1996 / 21:18:44 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3960
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3961
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3962
!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
  3963
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
  3964
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
  3965
    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
  3966
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
  3967
    "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
  3968
    "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
  3969
!
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
  3970
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3971
classMethodFileOutAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3972
    "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
  3973
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3974
    |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
  3975
     fileBox|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3976
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3977
    append := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3978
    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
  3979
                        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
  3980
                        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
  3981
                        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
  3982
                        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
  3983
    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
  3984
    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
  3985
    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
  3986
        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
  3987
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3988
    fileBox showAtPointer.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3989
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3990
    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
  3991
        "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3992
         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
  3993
        "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3994
        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
  3995
            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
  3996
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3997
        append ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3998
            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
  3999
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4000
            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
  4001
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4002
        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
  4003
            ^ 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
  4004
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4005
        self withWaitCursorDo:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4006
            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
  4007
            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
  4008
                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
  4009
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4010
                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
  4011
                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
  4012
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4013
                cls := self findClassNamed:classString.
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4014
                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
  4015
                    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
  4016
                ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4017
                    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
  4018
                    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
  4019
                        |box|
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4020
                        box := YesNoBox 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4021
                                    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
  4022
                                           , ex errorString 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4023
                                           , '\\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
  4024
                                    yesText:'continue' 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4025
                                    noText:'abort'.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4026
                        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
  4027
                            ex proceed
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4028
                        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4029
                        self normalLabel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4030
                        ^ self
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4031
                    ] do:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4032
                        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
  4033
                    ]    
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4034
                ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4035
            ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4036
            outStream close.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4037
            self normalLabel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4038
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4039
    ]
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
  4040
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4041
    "Modified: 17.6.1996 / 16:51:11 / stefan"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4042
    "Modified: 20.12.1996 / 15:41:37 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4043
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4044
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4045
classMethodMenu
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4046
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
587
74d27450aa79 added resource info
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
  4047
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4048
    |labels selectors shorties|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4049
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4050
    labels := #(
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4051
                                'fileOut'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4052
                                'fileOut all'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4053
                                'printOut'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4054
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4055
                                'browse'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4056
                                'spawn'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4057
                                'spawn class'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4058
                                'spawn full protocol'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4059
                                'spawn hierarchy'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4060
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4061
                                'senders ...'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4062
                                'implementors ...'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4063
                                'globals ...'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4064
"/                              '-'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4065
"/                              'breakpoint' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4066
"/                              'trace' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4067
"/                              'trace sender' 
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4068
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4069
                                'remove'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4070
               ).
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4071
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4072
    shorties := #(
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4073
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4074
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4075
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4076
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4077
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4078
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4079
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4080
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4081
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4082
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4083
                                #Cmds
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4084
                                #Cmdi
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4085
                                #Cmdg
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4086
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4087
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4088
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4089
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4090
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4091
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4092
               ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4093
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4094
    selectors := #(
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4095
                                methodFileOut
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4096
                                classMethodFileOutAll
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4097
                                methodPrintOut
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4098
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4099
                                classMethodBrowse
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4100
                                methodSpawn
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4101
                                classSpawn
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4102
                                classSpawnFullProtocol
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4103
                                classSpawnHierarchy
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4104
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4105
                                methodSenders
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4106
                                methodImplementors
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4107
                                methodGlobalReferends
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4108
"/                              nil
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4109
"/                              methodBreakPoint 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4110
"/                              methodTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4111
"/                              methodTraceSender
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4112
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4113
                                methodRemove
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4114
                  ).
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4115
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4116
    ^ PopUpMenu 
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4117
        labels:(resources array:labels)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4118
        selectors:selectors
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4119
        accelerators:shorties
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4120
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4121
    "Modified: 10.7.1996 / 12:46:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4122
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4123
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4124
!BrowserView methodsFor:'class-method stuff'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4125
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4126
classFromClassMethodString:aString
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4127
    "helper for classMethod-list - extract class name from the string"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4128
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4129
    |pos s|
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4130
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4131
    s := aString string withoutSpaces.
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4132
    (s endsWith:' !!') ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4133
        s := s copyWithoutLast:2
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4134
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4135
    (s endsWith:')') ifTrue:[
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4136
        s := aString copyTo:(aString lastIndexOf:$()-1.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4137
        s := s withoutSpaces.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4138
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4139
    (s endsWith:' !!') ifTrue:[
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4140
        s := s copyWithoutLast:2
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4141
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4142
    pos := s lastIndexOf:(Character space).
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4143
    ^ 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
  4144
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4145
    "Modified: 17.6.1996 / 17:06:59 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4146
    "Modified: 4.11.1996 / 23:56:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4147
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4148
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4149
classMethodSelection:lineNr
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4150
    "user clicked on a class/method line - show code"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4151
131
claus
parents: 130
diff changeset
  4152
    |cls string classString selectorString meta|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4153
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4154
    string := classMethodListView selectionValue string.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4155
    classString := self classFromClassMethodString:string.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4156
    selectorString := self selectorFromClassMethodString:string.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4157
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4158
    ((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
  4159
        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
  4160
        meta := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4161
    ] ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4162
        meta := false.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4163
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4164
    self switchToClass:(self findClassNamed:classString).
131
claus
parents: 130
diff changeset
  4165
    meta ifTrue:[cls := currentClass class] ifFalse:[cls := currentClass].
claus
parents: 130
diff changeset
  4166
    actualClass := acceptClass := cls.
129
claus
parents: 126
diff changeset
  4167
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4168
    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
  4169
        self warn:'oops class is gone'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4170
    ] ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4171
        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
  4172
        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
  4173
        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
  4174
        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
  4175
            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
  4176
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4177
            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
  4178
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4179
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4180
        self methodSelectionChanged
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4181
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4182
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4183
    self setDoitActionForClass
131
claus
parents: 130
diff changeset
  4184
claus
parents: 130
diff changeset
  4185
    "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
  4186
    "Modified: 17.6.1996 / 16:51:28 / stefan"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4187
    "Modified: 20.12.1996 / 15:40:29 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4188
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4189
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4190
selectorFromClassMethodString:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4191
    "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
  4192
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4193
    |pos s|
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4194
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4195
    s := aString withoutSpaces.
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4196
    (s endsWith:' !!') ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4197
        s := s copyWithoutLast:2
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4198
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4199
    (s endsWith:')') ifTrue:[
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4200
        s := aString copyTo:(aString lastIndexOf:$()-1.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4201
        s := s withoutSpaces.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4202
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4203
    (s endsWith:' !!') ifTrue:[
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4204
        s := s copyWithoutLast:2
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4205
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4206
    pos := s lastIndexOf:(Character space).
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4207
    ^ 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
  4208
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4209
    "Modified: 17.6.1996 / 17:04:38 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4210
    "Modified: 4.11.1996 / 23:57:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4211
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4212
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4213
!BrowserView methodsFor:'event handling'!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4214
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4215
handlesKeyPress:key inView:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4216
    "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
  4217
     a keyPress in some other view ?"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4218
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4219
    <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
  4220
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4221
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4222
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4223
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4224
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4225
    view == classCategoryListView ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4226
        (key == #Find) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4227
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4228
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4229
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4230
    view == classListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4231
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4232
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4233
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4234
    view == methodCategoryListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4235
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4236
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4237
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4238
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4239
    or:[view == classMethodListView]) ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4240
        (untranslatedKey == #Cmdi) ifTrue:[^ true].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4241
        (untranslatedKey == #Cmds) ifTrue:[^ true].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4242
        (untranslatedKey == #Cmdg) ifTrue:[^ true].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4243
        (untranslatedKey == #Cmdt) ifTrue:[^ true].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4244
        (untranslatedKey == #Cmda) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4245
    ].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4246
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4247
    ^ false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4248
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4249
    "Created: 2.3.1996 / 14:33:30 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4250
    "Modified: 27.10.1996 / 14:14:54 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4251
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4252
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4253
keyPress:key x:x y:y view:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4254
    "this method is reached via delegation from the classCategoryListView"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4255
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4256
    <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
  4257
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4258
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4259
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4260
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4261
    "/ have to untranslate (since we get #Inspect / #Search
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4262
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4263
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4264
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4265
    view == classCategoryListView ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4266
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4267
        (untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4268
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4269
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4270
    view == classListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4271
        (untranslatedKey == #Cmdn) ifTrue:[^ self classNewClass].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4272
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4273
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4274
    view == methodCategoryListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4275
        (untranslatedKey == #Cmdn) ifTrue:[^ self methodCategoryNewCategory].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4276
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4277
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4278
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4279
    or:[view == classMethodListView]) ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4280
        (untranslatedKey == #Cmdi) ifTrue:[^ self methodImplementors].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4281
        (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
  4282
        (untranslatedKey == #Cmdg) ifTrue:[^ self methodGlobalReferends].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4283
        (untranslatedKey == #Cmdt) ifTrue:[^ self methodStringSearch].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4284
        (untranslatedKey == #Cmda) ifTrue:[^ self methodAproposSearch].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4285
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4286
    view keyPress:key x:x y:y
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4287
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4288
    "Created: 2.3.1996 / 14:37:52 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4289
    "Modified: 27.10.1996 / 14:14:44 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4290
! !
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4291
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4292
!BrowserView methodsFor:'help'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4293
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4294
helpTextFor:aComponent
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4295
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4296
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4297
    aComponent == classCategoryListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4298
        s := 'HELP_CCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4299
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4300
    aComponent == classListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4301
        fullProtocol ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4302
            s := 'HELP_PCLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4303
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4304
            currentClassHierarchy notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4305
                s := 'HELP_HCLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4306
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4307
                s := 'HELP_CLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4308
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4309
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4310
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4311
    aComponent == methodCategoryListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4312
        s := 'HELP_MCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4313
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4314
    aComponent == methodListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4315
        s := 'HELP_METHOD_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4316
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4317
    aComponent == variableListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4318
        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
  4319
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4320
    aComponent == codeView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4321
        fullClass ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4322
            s := 'HELP_FULLCODE_VIEW'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4323
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4324
            s := 'HELP_CODE_VIEW'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4325
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4326
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4327
    (aComponent == instanceToggle 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4328
    or:[aComponent == classToggle]) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4329
        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
  4330
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4331
    aComponent == classMethodListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4332
        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
  4333
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4334
    s notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4335
        ^ resources string:s
105
claus
parents: 98
diff changeset
  4336
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4337
    ^ nil
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
    "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
  4340
! !
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
!BrowserView methodsFor:'initialize / release'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4343
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4344
autoSearch:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4345
    "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
  4346
     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
  4347
     search for the searchstring in the codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4348
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4349
    self setSearchPattern:aString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4350
    autoSearch := aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4351
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4352
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4353
destroy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4354
    "relese dependant - destroy popups"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4355
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4356
    Smalltalk removeDependent:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4357
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4358
        self releaseClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4359
        "/
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4360
        "/ 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
  4361
        "/ ... release refs to my class (not really needed)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4362
        "/
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4363
        currentClass := actualClass := acceptClass := nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4364
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4365
    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
  4366
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
  4367
    "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
  4368
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4369
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4370
initialize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4371
    super initialize.
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
    showInstance := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4374
    fullClass := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4375
    fullProtocol := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4376
    aspect := nil.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4377
    currentNamespace := '* all *'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4378
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4379
    "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
  4380
    Smalltalk addDependent:self
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4381
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4382
    "Modified: 20.12.1996 / 15:23:33 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4383
!
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
realize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4386
    |v checkBlock|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4387
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4388
    super realize.
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
    checkBlock := [:lineNr | self checkSelectionChangeAllowed].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4391
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4392
    v := classCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4393
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4394
        v action:[:lineNr | self classCategorySelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4395
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4396
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4397
        v list size == 0 ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4398
            v list:(self listOfAllClassCategories).
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4399
        ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4400
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4401
         tell classCategoryListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4402
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4403
        v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
107
claus
parents: 106
diff changeset
  4404
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4405
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4406
    v := classListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4407
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4408
        v action:[:lineNr | self classSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4409
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4410
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4411
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4412
         tell classListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4413
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4414
        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
  4415
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4416
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4417
    v := methodCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4418
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4419
        v action:[:lineNr | self methodCategorySelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4420
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4421
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4422
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4423
         tell methodCategoryListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4424
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4425
        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
  4426
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4427
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4428
    v := methodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4429
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4430
        v action:[:lineNr | self methodSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4431
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4432
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4433
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4434
         tell methodListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4435
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4436
        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
  4437
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4438
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4439
    v := classMethodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4440
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4441
        v action:[:lineNr | self classMethodSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4442
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4443
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4444
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4445
         tell classMethodListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4446
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4447
        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
  4448
    ].
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
    v := variableListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4451
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4452
        v action:[:lineNr | self variableSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4453
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4454
        v toggleSelect:true.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4455
        v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
117
claus
parents: 114
diff changeset
  4456
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4457
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4458
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4459
     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
  4460
     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
  4461
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4462
    fullProtocol ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4463
        classListView scrollToBottom.
123
claus
parents: 120
diff changeset
  4464
    ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4465
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4466
    "Modified: 26.5.1996 / 15:59:13 / cg"
124
claus
parents: 123
diff changeset
  4467
!
claus
parents: 123
diff changeset
  4468
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4469
terminate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4470
    (self checkSelectionChangeAllowed) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4471
        super terminate
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4472
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4473
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4474
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4475
title:someString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4476
    myLabel := someString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4477
    self label:someString.
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
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4480
!BrowserView methodsFor:'initialize subviews'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4481
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4482
createClassListViewIn:frame
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4483
    "setup the classlist subview, with its toggles"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4484
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4485
    |v panel spc|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4486
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4487
    self createTogglesIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4488
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4489
    panel := VariableVerticalPanel
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4490
                    origin:(0.0 @ 0.0) corner:(1.0 @ 1.0)
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4491
                    in:frame.
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4492
    styleSheet is3D ifTrue:[
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4493
        spc := ViewSpacing.
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4494
    ] ifFalse:[
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4495
        spc := 0
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4496
    ].
811
fde69dbb949a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 810
diff changeset
  4497
    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
  4498
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4499
    v := HVScrollableView 
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4500
                for:SelectionInListView 
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4501
                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
  4502
                in:panel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4503
    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
  4504
    classListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4505
    classListView delegate:self.
199
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 := ScrollableView for:SelectionInListView in:panel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4508
    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
  4509
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4510
    variableListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4511
    variableListView delegate:self.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4512
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4513
    "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
  4514
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4515
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4516
createCodeViewIn:aView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4517
    "setup the code view"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4518
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4519
    ^ self createCodeViewIn:aView atY:0.25
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4520
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4521
    "Modified: 2.3.1996 / 16:08:46 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4522
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4523
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4524
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
  4525
    "setup the code view"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4526
    |v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4527
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4528
    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
  4529
    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
  4530
    codeView := v scrolledView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4531
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4532
    "Created: 2.3.1996 / 16:09:03 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4533
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4534
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4535
createMethodListViewIn:aView atX:relX
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4536
    "setup the method list view"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4537
    |v|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4538
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4539
    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
  4540
    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
  4541
    methodListView := v scrolledView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4542
    methodListView delegate:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4543
    ^ v
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4544
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4545
    "Created: 2.3.1996 / 16:07:10 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4546
    "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
  4547
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4548
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4549
createTogglesIn:aFrame
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4550
    "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
  4551
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4552
    |h halfSpace classAction instanceAction|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4553
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4554
    classAction := [self instanceProtocol:false].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4555
    instanceAction := [self instanceProtocol:true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4556
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4557
    halfSpace := ViewSpacing // 2.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4558
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4559
    instanceToggle := Toggle label:(resources at:'instance') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  4560
    h := instanceToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4561
    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
  4562
    instanceToggle topInset:h negated.
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
    instanceToggle turnOn.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4565
    instanceToggle pressAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4566
    instanceToggle releaseAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4567
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4568
    classToggle := Toggle label:(resources at:'class') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  4569
    h := classToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4570
    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
  4571
    classToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4572
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4573
    classToggle turnOff.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4574
    classToggle pressAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4575
    classToggle releaseAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4576
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4577
    styleSheet is3D ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4578
        instanceToggle bottomInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4579
        classToggle bottomInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4580
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4581
        instanceToggle leftInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4582
        classToggle leftInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4583
        instanceToggle rightInset:ViewSpacing - halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4584
        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
  4585
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4586
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4587
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4588
focusSequence
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4589
    |s|
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
    s := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4592
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4593
    classCategoryListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4594
        s add:classCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4595
    ].
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
    classListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4598
        s add:classListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4599
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4600
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4601
"/    variableListView notNil ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4602
"/        s add:variableListView
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4603
"/    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4604
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4605
    instanceToggle notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4606
        s add:instanceToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4607
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4608
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4609
    methodCategoryListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4610
        s add:methodCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4611
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4612
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4613
    methodListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4614
        s add:methodListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4615
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4616
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4617
    classMethodListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4618
        s add:classMethodListView
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4619
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4620
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4621
    s add:codeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4622
    ^ s
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4623
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4624
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4625
setupForAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4626
    "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
  4627
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4628
    |vpanel hpanel frame v spc nsHolder|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4629
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4630
    styleSheet is3D ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4631
        spc := ViewSpacing.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4632
    ] ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4633
        spc := 0
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4634
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4635
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4636
    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
  4637
                  in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4638
    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
  4639
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4640
    v := HVScrollableView for:SelectionInListView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4641
                          miniScrollerH:true miniScrollerV:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4642
                          in:hpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4643
    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
  4644
    classCategoryListView := v scrolledView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4645
    classCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4646
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4647
    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
  4648
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4649
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4650
    v bottomInset:(instanceToggle height + spc + instanceToggle borderWidth).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4651
    nsHolder := currentNamespace asValue.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4652
    namespaceList := ComboListView origin:(0.0@1.0) corner:(0.25@1.0) in:hpanel.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4653
    namespaceList topInset:(v bottomInset negated) + (spc // 2).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4654
    namespaceList bottomInset:(spc // 2).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4655
    namespaceList leftInset:(classCategoryListView originRelativeTo:v) x.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4656
"/    namespaceList rightInset:(classCategoryListView cornerRelativeTo:v) x.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4657
    self setListOfNamespaces.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4658
    namespaceList model:nsHolder.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4659
"/    namespaceList label menuHolder:self; menuMessage:#nameSpaceMenu.
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4660
    namespaceList label middleButtonMenu:(PopUpMenu
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4661
                                                labels:(resources array:#('new namespace'))
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4662
                                                selectors:#(nameSpaceNewNameSpace)
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4663
                                                receiver:self).
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4664
    nsHolder onChangeSend:#value
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4665
                       to:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4666
                               |nsName n ok|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4667
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4668
                               nsName := nsHolder value.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4669
                               nsName = '* all *' ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4670
                                  currentNamespace := nsName.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4671
                                  ok := true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4672
                               ] ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4673
                                  n := Smalltalk at:nsName asSymbol.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4674
                                  n isNamespace ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4675
                                       currentNamespace := n.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4676
                                       ok := true
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4677
                                  ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4678
                               ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4679
                               ok ifTrue:[
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4680
                                   currentClass := actualClass := nil.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4681
                                   self classCategoryUpdate
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4682
                               ] 
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4683
                          ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4684
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4685
    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
  4686
    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
  4687
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4688
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4689
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4690
    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
  4691
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4692
    self createCodeViewIn:vpanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4693
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4694
    "Modified: 23.12.1996 / 13:22:26 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4695
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4696
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4697
setupForClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4698
    "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
  4699
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4700
    |vpanel hpanel frame v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4701
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4702
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4703
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4704
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4705
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4706
    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
  4707
    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
  4708
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4709
    self createTogglesIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4710
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4711
    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
  4712
    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
  4713
      extent:[frame width
422
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
              (frame height 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4716
               - ViewSpacing
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4717
               - instanceToggle height
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4718
               - instanceToggle borderWidth
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4719
               + v borderWidth)].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4720
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4721
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4722
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4723
    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
  4724
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4725
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4726
    self switchToClass:aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4727
    actualClass := acceptClass := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4728
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4729
    self updateMethodList.
151
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  4730
    self updateCodeView.
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  4731
    self classDefinition.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4732
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4733
    "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
  4734
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4735
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4736
setupForClass:aClass methodCategory:aMethodCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4737
    "setup subviews to browse a method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4738
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4739
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4740
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4741
    vpanel := VariableVerticalPanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4742
                        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
  4743
                            in:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4744
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4745
    v := self createMethodListViewIn:vpanel atX:0.0.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4746
    v corner:(1.0 @ 0.25).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4747
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4748
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4749
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4750
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4751
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4752
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4753
    currentMethodCategory := aMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4754
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4755
    self updateCodeView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4756
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4757
    "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
  4758
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4759
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4760
setupForClass:aClass selector:selector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4761
    "setup subviews to browse a single method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4762
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4763
    |v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4764
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4765
    v := ScrollableView for:CodeView in:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4766
    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
  4767
    codeView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4768
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4769
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4770
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4771
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4772
    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
  4773
    currentMethod := actualClass compiledMethodAt:selector.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4774
    currentMethodCategory := currentMethod category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4775
    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
  4776
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
  4777
    "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
  4778
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4779
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4780
setupForClassCategory:aClassCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4781
    "setup subviews to browse a class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4782
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4783
    |vpanel hpanel frame v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4784
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4785
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4786
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4787
                                        in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4788
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4789
    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
  4790
    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
  4791
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4792
    self createClassListViewIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4793
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4794
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4795
    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
  4796
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4797
    methodCategoryListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4798
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4799
    self createMethodListViewIn:hpanel atX:0.66.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4800
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4801
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4802
    currentClassCategory := aClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4803
    self updateClassList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4804
    self updateMethodCategoryList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4805
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4806
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4807
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4808
    "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
  4809
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4810
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4811
setupForClassHierarchy:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4812
    "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
  4813
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4814
    |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
  4815
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4816
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4817
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4818
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4819
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4820
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4821
     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
  4822
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4823
    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
  4824
    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
  4825
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4826
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4827
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4828
    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
  4829
    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
  4830
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4831
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4832
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4833
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4834
    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
  4835
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4836
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4837
    cls isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4838
        cls := cls soleInstance
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4839
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4840
    currentClassHierarchy := currentClass := actualClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4841
    self updateClassList.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4842
    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
  4843
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4844
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4845
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4846
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4847
    aClass isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4848
        self instanceProtocol:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4849
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  4850
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4851
    "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
  4852
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4853
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4854
setupForClassList:aList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4855
    "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
  4856
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4857
    self setupForClassList:aList sort:true
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4858
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4859
    "Modified: 28.5.1996 / 13:53:03 / cg"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4860
!
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4861
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4862
setupForClassList:aList sort:doSort
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4863
    "setup subviews to browse classes from a list"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4864
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4865
    |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
  4866
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4867
    vpanel := VariableVerticalPanel 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4868
                 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
  4869
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4870
    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
  4871
    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
  4872
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4873
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4874
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4875
    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
  4876
    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
  4877
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4878
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4879
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4880
    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
  4881
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4882
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4883
    l := (aList collect:[:entry | 
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4884
                entry isBehavior ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4885
                    entry name
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4886
                ] ifFalse:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4887
                    entry
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4888
                ]]) asOrderedCollection.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4889
    doSort ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4890
        l sort.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4891
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4892
    classListView list:l.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4893
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4894
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4895
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4896
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4897
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  4898
    "Created: 28.5.1996 / 13:52:47 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4899
    "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
  4900
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4901
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4902
setupForFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4903
    "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
  4904
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4905
    |vpanel hpanel v|
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
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4908
                                    corner:(1.0 @ 1.0)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4909
                                        in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4910
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4911
    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
  4912
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4913
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4914
    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
  4915
    classCategoryListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4916
    classCategoryListView contents:(self listOfAllClassCategories).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4917
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4918
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4919
    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
  4920
    classListView := v scrolledView.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4921
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4922
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4923
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4924
    fullClass := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4925
    self updateCodeView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4926
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4927
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4928
setupForFullClassProtocol:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4929
    "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
  4930
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4931
    |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
  4932
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4933
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4934
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4935
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4936
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4937
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4938
     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
  4939
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4940
    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
  4941
    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
  4942
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4943
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4944
    classListView multipleSelectOk:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4945
    classListView toggleSelect:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4946
    classListView strikeOut:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4947
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4948
    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
  4949
    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
  4950
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4951
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4952
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4953
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4954
    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
  4955
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4956
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4957
    cls isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4958
        cls := cls soleInstance
107
claus
parents: 106
diff changeset
  4959
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4960
    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
  4961
    fullProtocol := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4962
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4963
    self updateClassList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4964
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4965
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4966
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4967
    self updateVariableList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4968
    aClass isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4969
        self instanceProtocol:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4970
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4971
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4972
    "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
  4973
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4974
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4975
setupForList:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4976
    "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
  4977
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4978
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4979
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4980
    vpanel := VariableVerticalPanel
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4981
                        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
  4982
                        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
  4983
                            in:self.
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
    v := ScrollableView for:SelectionInListView in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4986
    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
  4987
    classMethodListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4988
    classMethodListView contents:aList.
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4989
    classMethodListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4990
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4991
    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
  4992
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4993
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4994
    aList size == 1 ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  4995
        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
  4996
        self classMethodSelection:1. 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4997
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4998
    self updateCodeView
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  4999
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  5000
    "Modified: 25.5.1996 / 12:26:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5001
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5002
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5003
!BrowserView methodsFor:'method category list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5004
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5005
methodCategoryCopyCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5006
    "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
  5007
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5008
    |title box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5009
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5010
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5011
        title := 'class to copy instance method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5012
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5013
        title := 'class to copy class method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5014
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5015
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5016
    box := self listBoxTitle:title 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5017
                      okText:'ok' 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5018
                        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
  5019
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5020
    box action:[:aString | self copyMethodsFromClass:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5021
    box showAtPointer
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5022
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5023
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5024
methodCategoryCreateAccessMethods
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5025
    "create access methods for instvars.
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5026
     If no variable is selected, for all instvars;
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5027
     otherwise for that selected instvar."
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5028
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5029
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5030
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5031
    showInstance ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5032
        self warn:'select instance - and try again'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5033
        ^ self.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5034
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5035
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5036
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5037
        |nm names source|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5038
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5039
        (variableListView notNil
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5040
        and:[(nm := variableListView selectionValue) notNil]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5041
            names := Array with:nm
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5042
        ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5043
            names := currentClass instVarNames 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5044
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5045
        names do:[:name |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5046
            "check, if method is not already present"
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5047
            (currentClass includesSelector:(name asSymbol)) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5048
                source := (name , '\    "return ' , name , '"\\    ^ ' , name) withCRs.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5049
                Compiler compile:source forClass:currentClass inCategory:'accessing'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5050
            ] ifTrue:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  5051
                Transcript showCR:'method ''', name , ''' already present'
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5052
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5053
            (currentClass includesSelector:((name , ':') asSymbol)) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5054
                source := (name , ':something\    "set ' , name , '"\\    ' , name , ' := something.') withCRs.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5055
                Compiler compile:source forClass:currentClass inCategory:'accessing'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5056
            ] ifTrue:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  5057
                Transcript showCR:'method ''', name , ':'' already present'
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5058
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5059
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5060
        self updateMethodCategoryListWithScroll:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5061
        self updateMethodListWithScroll:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5062
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5063
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5064
    "Modified: 22.5.1996 / 13:36:59 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5065
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5066
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5067
methodCategoryCreateDocumentationMethods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5068
    "create empty documentation methods"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5069
120
claus
parents: 118
diff changeset
  5070
    |cls histStream|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5071
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5072
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5073
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5074
    cls := currentClass class.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5075
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5076
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5077
        |nm names source|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5078
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5079
        "/ add version method containing RCS template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5080
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5081
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5082
        (cls includesSelector:#version) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5083
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5084
'version
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  5085
    ^ ''$' , 'Header$''
120
claus
parents: 118
diff changeset
  5086
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5087
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5088
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5089
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5090
        "/ add documentation method containing doc template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5091
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5092
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5093
        (cls includesSelector:#documentation) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5094
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5095
'documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5096
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5097
    documentation to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5098
"
120
claus
parents: 118
diff changeset
  5099
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5100
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5101
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5102
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5103
        "/ add examples method containing examples template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5104
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5105
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5106
        (cls includesSelector:#examples) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5107
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5108
'examples
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5109
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5110
    examples to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5111
"
120
claus
parents: 118
diff changeset
  5112
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5113
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5114
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5115
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5116
        "/ add history method containing created-entry
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5117
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5118
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5119
        (cls includesSelector:#history) ifFalse:[ 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5120
            histStream := ReadWriteStream on: String new.
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  5121
            histStream nextPutLine: 'history'.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5122
            HistoryLine isBehavior ifTrue:[ 
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  5123
                histStream nextPutLine: (HistoryLine newCreated printString).
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5124
            ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5125
                histStream cr.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5126
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5127
            Compiler compile:(histStream contents)
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5128
                    forClass:cls 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5129
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5130
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5131
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5132
        self instanceProtocol:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5133
        self switchToMethodNamed:#documentation 
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5134
"/        self updateMethodCategoryListWithScroll:false.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5135
"/        self updateMethodListWithScroll:false
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5136
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5137
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  5138
    "Modified: 8.11.1996 / 23:53:09 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5139
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5140
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5141
methodCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5142
    "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
  5143
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5144
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5145
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5146
    self whenMethodCategorySelected:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5147
        self busyLabel:'saving: %1' with:currentClass name , '-' , currentMethodCategory.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5148
        Class fileOutErrorSignal handle:[:ex |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5149
            self warn:'cannot create: %1' with:ex parameter.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5150
            ex return.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5151
        ] do:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5152
            actualClass fileOutCategory:currentMethodCategory.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5153
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5154
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5155
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5156
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5157
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5158
methodCategoryFileOutAll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5159
    "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
  5160
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5161
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5162
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5163
    self whenMethodCategorySelected:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5164
        |fileName outStream|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5165
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5166
        fileName := currentMethodCategory , '.st'.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5167
        fileName replaceAll:Character space by:$_.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5168
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5169
         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
  5170
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5171
        Project notNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5172
            fileName := Project currentProjectDirectory , fileName.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5173
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5174
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5175
         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
  5176
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5177
        fileName asFilename exists ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5178
            fileName asFilename copyTo:(fileName , '.sav')
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5179
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5180
        outStream := FileStream newFileNamed:fileName.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5181
        outStream isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5182
            ^ self warn:'cannot create: %1' with:fileName
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5183
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5184
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5185
        self busyLabel:'saving: ' with:currentMethodCategory.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5186
        Class fileOutErrorSignal handle:[:ex |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5187
            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
  5188
            ex return
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5189
        ] do:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5190
            Smalltalk allBehaviorsDo:[:class |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5191
                |hasMethodsInThisCategory|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5192
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5193
                hasMethodsInThisCategory := false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5194
                class methodDictionary do:[:method |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5195
                    method category = currentMethodCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5196
                        hasMethodsInThisCategory := true
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5197
                    ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5198
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5199
                hasMethodsInThisCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5200
                    class fileOutCategory:currentMethodCategory on:outStream.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5201
                    outStream cr
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5202
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5203
                hasMethodsInThisCategory := false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5204
                class class methodDictionary do:[:method |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5205
                    method category = currentMethodCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5206
                        hasMethodsInThisCategory := true
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5207
                    ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5208
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5209
                hasMethodsInThisCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5210
                    class class fileOutCategory:currentMethodCategory on:outStream.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5211
                    outStream cr
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5212
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5213
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5214
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5215
        outStream close.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5216
        self normalLabel.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5217
    ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5218
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5219
    "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
  5220
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5221
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5222
methodCategoryFindAnyMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5223
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5224
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5225
    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
  5226
    box action:[:aString | self switchToAnyMethodNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5227
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5228
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5229
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5230
methodCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5231
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5232
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5233
    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
  5234
    box action:[:aString | self switchToMethodNamed:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5235
    box showAtPointer
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5236
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5237
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5238
methodCategoryMenu
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5239
    |labels selectors shorties i|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5240
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5241
    currentClass isNil ifTrue:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5242
        methodCategoryListView flash.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5243
        ^ nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5244
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5245
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5246
    currentMethodCategory isNil ifTrue:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5247
        labels := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5248
                    'find method here ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5249
                    'find method ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5250
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5251
                    'new category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5252
                    'copy category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5253
                    'create access methods' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5254
                   ).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5255
        selectors := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5256
                    methodCategoryFindMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5257
                    methodCategoryFindAnyMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5258
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5259
                    methodCategoryNewCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5260
                    methodCategoryCopyCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5261
                    methodCategoryCreateAccessMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5262
                   ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5263
    ] ifFalse:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5264
        labels := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5265
                    'fileOut' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5266
                    'fileOut all' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5267
                    'printOut'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5268
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5269
                    'SPAWN_METHODCATEGORY'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5270
                    'spawn category'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5271
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5272
                    'find method here ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5273
                    'find method ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5274
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5275
                    'new category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5276
                    'copy category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5277
                    'create access methods' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5278
                    'rename ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5279
                    'remove'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5280
                   ).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5281
        selectors := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5282
                    methodCategoryFileOut
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5283
                    methodCategoryFileOutAll
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5284
                    methodCategoryPrintOut
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5285
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5286
                    methodCategorySpawn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5287
                    methodCategorySpawnCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5288
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5289
                    methodCategoryFindMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5290
                    methodCategoryFindAnyMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5291
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5292
                    methodCategoryNewCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5293
                    methodCategoryCopyCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5294
                    methodCategoryCreateAccessMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5295
                    methodCategoryRename
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5296
                    methodCategoryRemove
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5297
                   ).
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5298
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5299
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5300
    showInstance ifFalse:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5301
        labels := labels copy.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5302
        selectors := selectors copy.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5303
        i := labels indexOf:'create access methods'.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5304
        labels at:i put:'create documentation stubs'. 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5305
        selectors at:i put:#methodCategoryCreateDocumentationMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5306
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5307
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5308
    shorties := Array new:(selectors size).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5309
    (selectors includes:#methodCategoryNewCategory) ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5310
        shorties at:(selectors indexOf:#methodCategoryNewCategory) put:#Cmdn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5311
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5312
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5313
    ^ PopUpMenu 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5314
        labels:(resources array:labels)
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5315
        selectors:selectors
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5316
        accelerators:shorties
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5317
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5318
    "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
  5319
!
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
methodCategoryNewCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5322
    "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
  5323
     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
  5324
     useless typing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5325
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5326
    |someCategories existingCategories box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5327
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5328
    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
  5329
        someCategories := actualClass allCategories
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5330
    ] 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
  5331
        "
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
  5332
         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
  5333
        "
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
  5334
        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
  5335
            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
  5336
                                '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
  5337
                                '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
  5338
                                '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
  5339
                                '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
  5340
                                '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
  5341
                               )
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
  5342
        ] 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
  5343
            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
  5344
                                '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
  5345
                                '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
  5346
                                '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
  5347
                               ).
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
  5348
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5349
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5350
    someCategories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5351
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5352
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5353
     remove existing categories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5354
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5355
    existingCategories := methodCategoryListView list.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5356
    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
  5357
        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
  5358
    ].
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  5359
    someCategories := someCategories asSet asOrderedCollection sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5360
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5361
    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
  5362
                      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
  5363
                        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
  5364
    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
  5365
    box action:[:aString | self newMethodCategory:aString. lastCategory := aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5366
    box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5367
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  5368
    "Modified: 6.11.1996 / 21:49:03 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5369
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5370
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5371
methodCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5372
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5373
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5374
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5375
    self whenMethodCategorySelected:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5376
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5377
        actualClass printOutCategory:currentMethodCategory on:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5378
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5379
    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5380
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5381
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5382
methodCategoryRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5383
    "show number of methods to remove and query user"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5384
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5385
    |t box sels count|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5386
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5387
    currentMethodCategory notNil ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5388
        sels := OrderedCollection new.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5389
        actualClass methodDictionary keysAndValuesDo:[:selector :aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5390
            (aMethod category = currentMethodCategory) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5391
                sels add:selector
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5392
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5393
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5394
        count := sels size.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5395
        (count ~~ 0) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5396
            (count == 1) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5397
                t := 'remove %1\(with 1 method) ?'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5398
            ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5399
                t := 'remove %1\(with %2 methods) ?'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5400
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5401
            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
  5402
            t := t withCRs.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5403
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5404
            box := YesNoBox 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5405
                       title:t
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5406
                       yesText:(resources at:'remove')
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5407
                       noText:(resources at:'abort').
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5408
            box confirm ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5409
                ^ self.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5410
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5411
            sels do:[:selector|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5412
                actualClass removeSelector:selector.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5413
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5414
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5415
        currentMethodCategory := nil.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5416
        currentMethod := currentSelector := nil.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5417
        self updateMethodCategoryListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5418
        self updateMethodList
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5419
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5420
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5421
    "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
  5422
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5423
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5424
methodCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5425
    "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
  5426
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5427
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5428
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5429
    self checkMethodCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5430
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5431
    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
  5432
                okText:(resources at:'rename').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5433
    box initialText:currentMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5434
    box action:[:aString | 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5435
        actualClass renameCategory:currentMethodCategory to:aString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5436
        currentMethodCategory := aString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5437
        currentMethod := currentSelector := nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5438
        self updateMethodCategoryList.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5439
        self updateMethodListWithScroll:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5440
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5441
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5442
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5443
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5444
methodCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5445
    "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
  5446
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5447
    currentMethodCategory notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5448
        self withWaitCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5449
            SystemBrowser browseClass:actualClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5450
                    methodCategory:currentMethodCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5451
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5452
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5453
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5454
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5455
methodCategorySpawnCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5456
    "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
  5457
     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
  5458
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5459
    self askAndBrowseMethodCategory:'category to browse methods:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5460
                             action:[:aString | 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5461
                                        SystemBrowser browseMethodCategory:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5462
                                    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5463
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5464
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5465
!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
  5466
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5467
checkMethodCategorySelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5468
    currentMethodCategory isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5469
        self warn:'select a method category first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5470
        ^ false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5471
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5472
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5473
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5474
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5475
copyMethodsFromClass:aClassName
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5476
    |class box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5477
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5478
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5479
        class := Smalltalk classNamed:aClassName.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5480
        class isBehavior ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5481
            self warn:'no class named %1' with:aClassName.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5482
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5483
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5484
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5485
        showInstance ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5486
            class := class class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5487
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5488
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5489
        "show enterbox for category to copy from"
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5490
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5491
        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
  5492
                           okText:'copy'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5493
        box action:[:aString | self copyMethodsFromClass:class category:aString].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5494
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5495
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5496
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5497
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5498
copyMethodsFromClass:class category:category
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5499
    currentClass notNil ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5500
        Object abortSignal catch:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5501
            class methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5502
                |source|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5503
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5504
                (category match:aMethod category) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5505
                    source := aMethod source.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5506
                    codeView contents:source.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5507
                    codeView modified:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5508
                    actualClass compilerClass
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5509
                         compile:source 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5510
                         forClass:actualClass 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5511
                         inCategory:aMethod category
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5512
                         notifying:codeView.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5513
                    self updateMethodCategoryListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5514
                    self updateMethodListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5515
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5516
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5517
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5518
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5519
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5520
    "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
  5521
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5522
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5523
listOfAllMethodCategoriesInClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5524
    "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
  5525
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5526
    |newList|
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
    newList := Set new.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5529
    aClass methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5530
        |cat|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5531
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5532
        cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5533
        cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5534
            cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5535
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5536
        newList add:cat
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5537
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5538
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5539
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5540
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5541
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5542
    "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
  5543
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5544
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5545
listOfAllMethodCategoriesInFullProtocolHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5546
    "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
  5547
     and all of its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5548
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5549
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5550
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5551
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5552
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5553
    self classesInFullProtocolHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5554
        |cat|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5555
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5556
        c methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5557
            cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5558
            cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5559
                cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5560
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5561
            newList add:cat
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5562
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5563
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5564
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5565
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5566
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5567
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5568
    "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
  5569
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5570
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5571
methodCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5572
    "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
  5573
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5574
    self switchToMethodCategory:(methodCategoryListView selectionValue string).
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5575
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5576
    "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
  5577
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5578
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5579
methodCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5580
    "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
  5581
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5582
    self withWaitCursorDo:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5583
        currentMethod := currentSelector := nil.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5584
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5585
        self updateMethodList.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5586
        self updateCodeView.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5587
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5588
        currentMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5589
            methodCategoryListView setSelectElement:currentMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5590
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5591
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5592
        aspect isNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5593
            self setAcceptAndExplainActionsForMethod.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5594
        ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5595
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5596
"/ this is now done in
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5597
"/ #updateMethodList
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5598
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5599
"/        (variableListView notNil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5600
"/        and:[variableListView hasSelection]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5601
"/            self hilightMethodsInMethodCategoryList:false inMethodList:true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5602
"/        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5603
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5604
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5605
    "Created: 23.11.1995 / 14:17:38 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5606
    "Modified: 20.12.1996 / 16:51:09 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5607
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5608
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5609
newMethodCategory:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5610
    |categories|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5611
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5612
    currentClass isNil ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5613
        ^ 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
  5614
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5615
    categories := methodCategoryListView list.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5616
    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
  5617
    (categories includes:aString) ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5618
        categories add:aString.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5619
        categories sort.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5620
        methodCategoryListView contents:categories
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5621
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5622
    currentMethodCategory := aString.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5623
    aspect := nil.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5624
    self methodCategorySelectionChanged
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5625
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5626
    "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
  5627
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5628
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5629
switchToMethodCategory:aCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5630
    |oldSelector|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5631
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5632
    oldSelector := currentSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5633
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5634
    aspect := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5635
    (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
  5636
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5637
    currentMethodCategory := aCategory.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5638
    self methodCategorySelectionChanged.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5639
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5640
    "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
  5641
    methodListView list size == 1 ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5642
        methodListView setSelection:1.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5643
        self methodSelection:1
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5644
    ] ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5645
      oldSelector notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5646
          methodListView setSelectElement:oldSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5647
          methodListView hasSelection ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5648
              self methodSelection:methodListView selection.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5649
          ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5650
      ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5651
    ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5652
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5653
    "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
  5654
    "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
  5655
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5656
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5657
updateMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5658
    self updateMethodCategoryListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5659
!
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
updateMethodCategoryListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5662
    |categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5663
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5664
    methodCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5665
        fullProtocol ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5666
            currentClassHierarchy notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5667
                categories := self listOfAllMethodCategoriesInFullProtocolHierarchy:actualClass 
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5668
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5669
        ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5670
            currentClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5671
                categories := self listOfAllMethodCategoriesInClass:actualClass
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5672
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5673
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5674
        methodCategoryListView list = categories ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5675
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5676
                methodCategoryListView contents:categories
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5677
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5678
                methodCategoryListView setContents:categories
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5679
            ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5680
            currentMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5681
                methodCategoryListView setSelectElement:currentMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5682
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5683
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5684
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5685
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5686
    "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
  5687
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5688
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5689
whenMethodCategorySelected:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5690
    self checkMethodCategorySelected ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5691
        self withWaitCursorDo:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5692
    ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5693
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5694
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5695
!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
  5696
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5697
commonTraceHelperWith:aSelector
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  5698
    "install a break/trace or countPoint for the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  5699
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5700
    currentMethod := MessageTracer perform:aSelector with:currentMethod.
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5701
"/    self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5702
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5703
"/    (currentMethod notNil and:[currentMethod isWrapped not]) ifTrue:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5704
        Class withoutUpdatingChangesDo:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5705
            currentClass changed:#methodDictionary with:currentSelector.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5706
        ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5707
"/    ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5708
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5709
    "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
  5710
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5711
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5712
commonTraceHelperWith:aSelector with:argument
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5713
    "install a break/trace or countPoint for the current method"
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5714
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5715
    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
  5716
"/    self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5717
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5718
"/    (currentMethod notNil and:[currentMethod isWrapped not]) ifTrue:[
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5719
        Class withoutUpdatingChangesDo:[
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5720
            currentClass changed:#methodDictionary with:currentSelector.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5721
        ]
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5722
"/    ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5723
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5724
    "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
  5725
    "Modified: 22.10.1996 / 21:24:52 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5726
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5727
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5728
methodAproposSearch
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5729
    "launch an enterBox for a keyword search"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5730
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5731
    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
  5732
                  openWith:#aproposSearch:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5733
                isSelector:true
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  5734
                searchArea:#class
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  5735
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  5736
    "Modified: 11.11.1996 / 12:43:54 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5737
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5738
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5739
methodBreakPoint
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5740
    "set a breakpoint on the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5741
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5742
    self commonTraceHelperWith:#trapMethod:
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5743
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5744
    "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
  5745
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5746
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5747
methodBreakPointInProcess
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5748
    "set a breakpoint on the current method, which only triggers if
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5749
     executed by some particular process."
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5750
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5751
    |processes processNames box|
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5752
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5753
    processes := ProcessorScheduler knownProcesses asOrderedCollection.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5754
    processes := processes select:[:aProcess |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5755
                        aProcess notNil 
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5756
                        and:[aProcess id notNil]
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5757
                 ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5758
    processes := processes sort:[:a :b | a id < b id].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5759
    processNames := processes collect:[:aProcess |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5760
                        aProcess id printString , ' -> ' , aProcess nameOrId
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5761
                    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5762
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5763
    "/ let user specify which one ...
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5764
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5765
    box := ListSelectionBox new.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5766
    box noEnterField.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5767
    box list:processNames.
766
40cc3873c426 box title
Claus Gittinger <cg@exept.de>
parents: 764
diff changeset
  5768
    box label:'process selection'.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5769
    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
  5770
    box action:[:selection |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5771
        self commonTraceHelperWith:#trapMethod:inProcess: 
757
e11e8984a976 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 756
diff changeset
  5772
                              with:(processes at:box selectionIndex)
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5773
    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5774
    box showAtPointer.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5775
    box destroy
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5776
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5777
    "Created: 14.10.1996 / 15:40:53 / cg"
766
40cc3873c426 box title
Claus Gittinger <cg@exept.de>
parents: 764
diff changeset
  5778
    "Modified: 15.10.1996 / 12:51:28 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5779
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5780
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5781
methodChangeCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5782
    "move the current method into another category -
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5783
     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
  5784
     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
  5785
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5786
    |box txt|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5787
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5788
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5789
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5790
    actualClass isNil ifTrue:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5791
        box := self enterBoxTitle:'' okText:'change'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5792
    ] ifFalse:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5793
        |someCategories|
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5794
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5795
        someCategories := actualClass categories sort.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5796
        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
  5797
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5798
    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
  5799
    lastMethodCategory isNil ifTrue:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5800
        txt := currentMethod category.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5801
    ] ifFalse:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5802
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5803
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5804
    box initialText:txt.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5805
    box action:[:aString |
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5806
                    |method|
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5807
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5808
                    lastMethodCategory := aString.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5809
                    method := currentMethod.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5810
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5811
                    method category:aString asSymbol.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5812
                    actualClass changed.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5813
                    method changed:#category.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5814
                    actualClass addChangeRecordForMethodCategory:method category:aString.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5815
                    self updateMethodCategoryListWithScroll:false.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5816
                    self updateMethodListWithScroll:false
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5817
               ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5818
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5819
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5820
    "Created: 29.10.1995 / 19:59:22 / cg"
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5821
    "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
  5822
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5823
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5824
methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5825
    "compare with previous version"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5826
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5827
    |prev v|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5828
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5829
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5830
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5831
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5832
    prev isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5833
        self warn:'oops - previous version is gone'.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5834
        ^ self
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5835
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5836
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5837
    v := DiffTextView 
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5838
        openOn:codeView contents
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5839
        label:(resources string:'code here')
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5840
        and:prev source
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5841
        label:'previous version'.      
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5842
    v label:'comparing ' , currentMethod whoString.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5843
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5844
    "Modified: 7.11.1996 / 18:53:55 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5845
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5846
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5847
methodDecompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5848
    "decompile the current methods bytecodes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5849
     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
  5850
     avaliable with the system."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5851
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5852
    |s|
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5853
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5854
    self checkMethodSelected ifFalse:[^ self].
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5855
    self checkSelectionChangeAllowed ifFalse:[^ self].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5856
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5857
    s := '' writeStream.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5858
    (currentMethod decompileTo:s) ifFalse:[
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5859
        self warn:'No decompiler available'.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5860
    ].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5861
    codeView contents:s contents.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5862
    codeView modified:false.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5863
    codeView acceptAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5864
    codeView explainAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5865
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  5866
    "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
  5867
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5868
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5869
methodFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5870
    "file out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5871
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5872
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5873
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5874
    self busyLabel:'saving:' with:currentSelector.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5875
    Class fileOutErrorSignal handle:[:ex |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5876
        self warn:'cannot create: %1' with:ex parameter.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5877
        ex return
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5878
    ] do:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5879
        actualClass fileOutMethod:currentMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5880
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5881
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5882
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5883
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5884
methodGlobalReferends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5885
    "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
  5886
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5887
    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
  5888
                  openWith:#browseReferendsOf:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5889
                isSelector:false
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5890
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5891
"/    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
  5892
"/                         action:[:aString | 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5893
"/                                    SystemBrowser browseReferendsOf:aString asSymbol
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5894
"/                                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5895
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5896
    "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
  5897
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5898
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5899
methodImplementors
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5900
    "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
  5901
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5902
    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
  5903
                  openWith:#browseImplementorsOf:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5904
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5905
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5906
    "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
  5907
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5908
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5909
methodInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5910
    "inspect  the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5911
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5912
    self checkMethodSelected ifFalse:[^ self].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5913
    currentMethod inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5914
"/    (actualClass compiledMethodAt:currentSelector) inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5915
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5916
    "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
  5917
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5918
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5919
methodLocalSuperSends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5920
    "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
  5921
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5922
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5923
    self withSearchCursorDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5924
        SystemBrowser browseSuperCallsUnder:currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5925
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5926
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5927
    "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
  5928
    "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
  5929
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5930
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
  5931
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
  5932
    "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
  5933
     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
  5934
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
  5935
    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
  5936
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
  5937
    "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
  5938
!
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
  5939
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5940
methodMakePrivate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5941
    "make the current method private.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5942
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5943
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5944
    self methodPrivacy:#private 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5945
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5946
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5947
methodMakeProtected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5948
    "make the current method protected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5949
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5950
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5951
    self methodPrivacy:#protected 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5952
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5953
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5954
methodMakePublic
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5955
    "make the current method public.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5956
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5957
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5958
    self methodPrivacy:#public 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5959
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5960
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5961
methodMenu
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5962
    "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
  5963
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5964
    <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
  5965
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5966
    |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
  5967
     newLabels newSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5968
     mthdLabels mthdSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5969
     brkLabels brkSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5970
     fileLabels fileSelectors
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5971
     searchLabels searchSelectors searchShorties
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5972
     sepLocalLabels sepLocalSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5973
     localSearchLabels localSearchSelectors|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5974
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  5975
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5976
        currentMethod isWrapped ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5977
            (MessageTracer isCountingMemoryUsage:currentMethod) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5978
                brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5979
                                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5980
                                    'stop mem usage' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5981
                              ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5982
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5983
                brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5984
                                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5985
                                    methodStopMemoryUsage
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5986
                                 )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5987
            ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5988
                (MessageTracer isCounting:currentMethod) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5989
                    brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5990
                                        '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5991
                                        'stop counting' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5992
                                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5993
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5994
                    brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5995
                                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5996
                                        methodStopCounting
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5997
                                     )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5998
                ] ifFalse:[
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  5999
                    (MessageTracer isTiming:currentMethod) ifTrue:[
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6000
                        brkLabels := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6001
                                            '-'
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6002
                                            'stop timing' 
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6003
                                      ).
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6004
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6005
                        brkSelectors := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6006
                                            nil
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6007
                                            methodStopTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6008
                                         )
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6009
                    ] ifFalse:[
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6010
                        brkLabels := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6011
                                            '-'
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6012
                                            'remove break/trace' 
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6013
                                      ).
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6014
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6015
                        brkSelectors := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6016
                                            nil
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6017
                                            methodRemoveBreakOrTrace
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6018
                                         )
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6019
                    ]
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6020
                ]
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6021
            ]
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6022
        ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6023
            brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6024
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6025
                                'breakpoint' 
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  6026
                                'breakpoint in ...' 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6027
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6028
                                'trace' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6029
                                'trace sender' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6030
                                'trace full walkback' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6031
                                '-'
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6032
                                'start timing'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6033
                                'start counting'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6034
                                'start mem usage'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6035
                          ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6036
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6037
            brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6038
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6039
                                methodBreakPoint
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  6040
                                methodBreakPointInProcess
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6041
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6042
                                methodTrace
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6043
                                methodTraceSender
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6044
                                methodTraceFull
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6045
                                nil
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6046
                                methodStartTiming
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6047
                                methodStartCounting
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6048
                                methodStartMemoryUsage
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6049
                             )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6050
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6051
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6052
        Method methodPrivacySupported ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6053
            labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6054
                            'inspect method'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6055
                            'compile to machine code'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6056
                            'decompile'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6057
                            '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6058
                            'make public'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6059
                            'make private'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6060
                            'make protected'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6061
                            'make ignored'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6062
                       ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6063
            selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6064
                            methodInspect
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6065
                            methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6066
                            methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6067
                            nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6068
                            methodMakePublic
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6069
                            methodMakePrivate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6070
                            methodMakeProtected
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6071
                            methodMakeIgnored
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6072
                          )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6073
        ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6074
            labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6075
                            'inspect method'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6076
                            'compile to machine code'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6077
                            'decompile'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6078
                       ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6079
            selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6080
                            methodInspect
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6081
                            methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6082
                            methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6083
                          )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6084
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6085
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6086
        labels := labels , brkLabels.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6087
        selectors := selectors , brkSelectors.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6088
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6089
        specialMenu := PopUpMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6090
                            labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6091
                            selectors:selectors.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6092
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6093
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6094
    device ctrlDown ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6095
        currentMethod isNil ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6096
            methodListView flash.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6097
            ^ nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6098
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6099
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6100
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6101
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6102
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6103
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6104
    sepLocalLabels := sepLocalSelectors := #().
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6105
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6106
    searchLabels := #(
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6107
                                'senders ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6108
                                'implementors ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6109
                                'globals ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6110
                                'string search ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6111
                                'apropos ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6112
                    ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6113
    searchSelectors := #(
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6114
                                methodSenders
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6115
                                methodImplementors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6116
                                methodGlobalReferends
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6117
                                methodStringSearch
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6118
                                methodAproposSearch
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6119
                        ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6120
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6121
    searchShorties := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6122
                                Cmds
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6123
                                Cmdi
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6124
                                Cmdg
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6125
                                Cmdt
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6126
                                Cmda
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6127
                       ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6128
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6129
"/    currentClass notNil ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6130
"/        localSearchLabels := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6131
"/                                '-'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6132
"/                                'local senders ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6133
"/                                'local implementors ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6134
"/                                'local super sends ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6135
"/                                'local string search ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6136
"/                                'local apropos ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6137
"/                            ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6138
"/        localSearchSelectors := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6139
"/                                nil
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6140
"/                                methodLocalSenders
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6141
"/                                methodLocalImplementors
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6142
"/                                methodLocalSuperSends
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6143
"/                                methodLocalStringSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6144
"/                                methodLocalAproposSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6145
"/                              ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6146
"/    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6147
"/        localSearchLabels := localSearchSelectors := #()
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6148
"/    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6149
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6150
    currentMethodCategory notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6151
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6152
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6153
        newLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6154
                                'new method' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6155
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6156
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6157
        newSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6158
                                methodNewMethod
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6159
                             ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6160
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6161
        newLabels := newSelectors := #()
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6162
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6163
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6164
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6165
        fileLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6166
                                'fileOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6167
                                'printOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6168
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6169
                                'SPAWN_METHOD'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6170
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6171
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6172
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6173
        fileSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6174
                                methodFileOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6175
                                methodPrintOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6176
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6177
                                methodSpawn
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6178
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6179
                             ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6180
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6181
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6182
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6183
        mthdLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6184
                                'change category ...' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6185
                                'move ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6186
                                'remove'
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6187
                                '-'
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6188
                                'compare with previous'
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6189
                                'back to previous'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6190
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6191
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6192
        mthdSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6193
                                methodChangeCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6194
                                methodMove
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6195
                                methodRemove
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6196
                                nil
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6197
                                methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6198
                                methodPreviousVersion
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6199
                             ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6200
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6201
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6202
        fileLabels := fileSelectors := #().
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6203
        mthdLabels := mthdSelectors := #().
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6204
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6205
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6206
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6207
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6208
    labels :=
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6209
                fileLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6210
                searchLabels ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6211
"/                localSearchLabels ,
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6212
                sepLocalLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6213
                newLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6214
                mthdLabels.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6215
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6216
    selectors :=
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6217
                fileSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6218
                searchSelectors ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6219
"/                localSearchSelectors ,
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6220
                sepLocalSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6221
                newSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6222
                mthdSelectors .
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6223
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6224
    shorties := (Array new:(fileSelectors size))
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6225
                , searchShorties
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6226
                , (Array new:(localSearchSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6227
                              + sepLocalSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6228
                              + newSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6229
                              + mthdSelectors size)).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6230
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6231
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6232
    specialMenu notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6233
        labels := labels , #(
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
  6234
                        '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  6235
                        'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6236
                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6237
        selectors := selectors , #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6238
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6239
                        #otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6240
                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6241
        shorties := shorties , #( nil #'Ctrl')
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6242
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6243
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6244
    m := PopUpMenu
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6245
         labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6246
         selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6247
         accelerators:shorties.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6248
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6249
    specialMenu notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6250
        m subMenuAt:#otherMenu put:specialMenu.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6251
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6252
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6253
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6254
        currentMethod isPrivate ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6255
            m disable:#methodMakePrivate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6256
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6257
        currentMethod isProtected ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6258
            m disable:#methodMakeProtected
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6259
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6260
        currentMethod isPublic ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6261
            m disable:#methodMakePublic
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6262
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6263
        currentMethod isIgnored ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6264
            m disable:#methodMakeIgnored
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6265
        ].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6266
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6267
        (currentMethod code notNil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6268
        or:[Compiler canCreateMachineCode not]) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6269
            m disable:#methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6270
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6271
        currentMethod byteCode isNil ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6272
            m disable:#methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6273
        ].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6274
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6275
        currentMethod previousVersion isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6276
            m disable:#methodPreviousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6277
            m disable:#methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6278
        ]
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
    ^ m
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6281
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6282
    "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
  6283
    "Modified: 18.12.1995 / 16:20:07 / stefan"
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6284
    "Modified: 7.11.1996 / 18:50:43 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6285
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6286
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6287
methodMove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6288
    "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
  6289
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6290
    |newClass newClassName sup initial|
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6291
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6292
    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
  6293
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6294
    (initial := lastMethodMoveClass) isNil ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6295
        (sup := currentClass superclass) notNil ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6296
            initial := sup name
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6297
        ] ifFalse:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6298
            initial := nil.
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6299
        ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6300
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6301
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6302
    newClassName := Dialog 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6303
                    request:'move current method to which class:'
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6304
                    initialAnswer:initial
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6305
                    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
  6306
    newClassName isNil ifTrue:[^ self].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6307
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6308
    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
  6309
    newClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6310
        self warn:'no such class'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6311
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6312
    ].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6313
    lastMethodMoveClass := newClassName.
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6314
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6315
    showInstance ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6316
        newClass isMeta ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6317
            newClass := newClass class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6318
        ]
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6319
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6320
    (newClass compile:(currentMethod source) classified:currentMethodCategory) isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6321
        self warn:'not moved - compilation failed due'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6322
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6323
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6324
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6325
    self methodRemove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6326
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6327
    "Created: 13.12.1995 / 10:56:42 / cg"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6328
    "Modified: 4.11.1996 / 23:59:53 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6329
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6330
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6331
methodNewMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6332
    "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
  6333
     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
  6334
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6335
    currentClass isNil ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6336
        ^ 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
  6337
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6338
    currentMethodCategory isNil ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6339
        ^ 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
  6340
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6341
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6342
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6343
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6344
    methodListView setSelection:nil.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6345
    codeView contents:(self methodTemplate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6346
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6347
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6348
    self setAcceptAndExplainActionsForMethod.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6349
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6350
    "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
  6351
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6352
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6353
methodPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6354
    "switch back to the previous version
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6355
     (undo last change)"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6356
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6357
    |cls sel prev|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6358
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6359
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6360
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6361
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6362
    prev isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6363
        self warn:'oops - previous version is gone'.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6364
        ^ self
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6365
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6366
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6367
    cls := currentMethod containingClass.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6368
    cls notNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6369
        sel := actualClass selectorAtMethod:currentMethod.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6370
        sel isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6371
            self warn:'oops - cannot find methods selector (gone)'
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6372
        ] ifFalse:[        
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6373
            cls basicAddSelector:sel withMethod:prev.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6374
            currentMethod := prev.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6375
            self updateCodeView
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6376
        ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6377
    ] ifFalse:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6378
        self warn:'oops - cannot find containing class'
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6379
    ]
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6380
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6381
    "Modified: 7.11.1996 / 18:51:09 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6382
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6383
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6384
methodPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6385
    "print out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6386
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6387
    |printStream|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6388
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6389
    self checkMethodSelected ifFalse:[^ self].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6390
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6391
    printStream := Printer new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6392
    actualClass printOutSource:(currentMethod source) on:printStream.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6393
    printStream close
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6394
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6395
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6396
methodPrivacy:how
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6397
    "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
  6398
     EXPERIMENTAL"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6399
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6400
    |cls m|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6401
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6402
    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
  6403
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6404
    m := currentMethod.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6405
    m isWrapped ifTrue:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6406
        m := m originalMethod
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6407
    ].
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6408
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6409
    (how == m privacy ) ifFalse:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6410
        m privacy:how.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6411
        cls := currentMethod containingClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6412
        cls notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6413
            cls addChangeRecordForMethodPrivacy:currentMethod.
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6414
        ] ifFalse:[
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6415
            self warn:'cannot write change record (no class)'
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6416
        ].
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6417
"/        self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6418
        Class withoutUpdatingChangesDo:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6419
            currentClass changed:#methodDictionary with:currentSelector.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6420
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6421
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6422
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6423
    "Created: 29.10.1995 / 20:00:00 / cg"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6424
    "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
  6425
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6426
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6427
methodRemove
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6428
    "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
  6429
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6430
    |cls sel|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6431
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6432
    self checkMethodSelected ifFalse:[^ self].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6433
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6434
    cls := currentMethod containingClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6435
    cls notNil ifTrue:[
625
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6436
        sel := actualClass selectorAtMethod:currentMethod.
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6437
        sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6438
            cls removeSelector:sel
625
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6439
        ].
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6440
        currentMethod := currentSelector := nil.
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6441
        self updateMethodListWithScroll:false
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6442
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6443
        self warn:'cannot remove method (no class)'
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6444
    ]
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6445
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6446
    "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
  6447
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6448
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6449
methodRemoveBreakOrTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6450
    "turn off tracing of the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6451
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6452
    (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6453
        self commonTraceHelperWith:#unwrapMethod:
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6454
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6455
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6456
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6457
methodSTCCompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6458
    "compile the current method to machine code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6459
     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
  6460
     the demo version."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6461
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6462
    |prev|
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
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6465
    prev := Compiler stcCompilation:#always.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6466
    [
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6467
        codeView accept.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6468
    ] valueNowOrOnUnwindDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6469
        Compiler stcCompilation:prev
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6470
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6471
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6472
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6473
methodSenders
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6474
    "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
  6475
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6476
    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
  6477
                  openWith:#browseAllCallsOn:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6478
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6479
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6480
    "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
  6481
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6482
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6483
methodSpawn
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6484
    "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
  6485
     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
  6486
     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
  6487
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6488
    |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
  6489
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6490
    classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6491
        s := classMethodListView selectionValue string.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6492
        clsName := self classFromClassMethodString:s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6493
        sel := self selectorFromClassMethodString:s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6494
        isMeta := false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6495
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6496
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6497
    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6498
        clsName := c.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6499
        sel := s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6500
        isMeta := m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6501
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6502
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6503
    (sel notNil and:[clsName notNil]) ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6504
        (clsName knownAsSymbol and:[sel knownAsSymbol]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6505
            clsSymbol := clsName asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6506
            (Smalltalk includesKey:clsSymbol) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6507
                cls := Smalltalk at:clsSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6508
                isMeta ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6509
                    cls := cls class
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6510
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6511
                cls isBehavior ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6512
                    cls := cls class
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6513
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6514
                cls isBehavior ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6515
                    selSymbol := sel asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6516
                    self withWaitCursorDo:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6517
                        (cls includesSelector:selSymbol) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6518
                            cls := cls class.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6519
                        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6520
                        (cls includesSelector:selSymbol) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6521
                            SystemBrowser browseClass:cls selector:selSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6522
                            ^ self
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6523
                        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6524
                        w := ' does not implement #' , sel
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6525
                    ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6526
                ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6527
                    w := ' is not a class'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6528
                ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6529
            ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6530
                w := ' is unknown'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6531
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6532
        ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6533
            w := ' and/or ' , sel , ' are unknown'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6534
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6535
        self warn:(clsName , w).
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6536
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6537
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6538
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6539
    self checkMethodSelected ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6540
        self warn:'select a method first'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6541
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6542
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6543
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6544
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6545
        w := currentMethod who.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6546
        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
  6547
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6548
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6549
    "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
  6550
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6551
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6552
methodStartCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6553
    "set a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6554
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6555
    self commonTraceHelperWith:#countMethod:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6556
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6557
    "Modified: 15.12.1995 / 10:53:59 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6558
    "Created: 15.12.1995 / 11:00:44 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6559
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6560
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6561
methodStartMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6562
    "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
  6563
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6564
    self commonTraceHelperWith:#countMemoryUsageOfMethod:
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6565
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6566
    "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
  6567
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6568
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6569
methodStartTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6570
    "set a timing on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6571
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6572
    self commonTraceHelperWith:#timeMethod:
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6573
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6574
    "Modified: 15.12.1995 / 10:53:59 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6575
    "Created: 17.6.1996 / 17:12:06 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6576
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6577
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6578
methodStopCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6579
    "show the number of invocations & remove a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6580
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6581
"/    self information:'called ' , (MessageTracer executionCountOfMethod:currentMethod) printString , ' times.'.
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6582
    self commonTraceHelperWith:#stopCountingMethod:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6583
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6584
    "Created: 15.12.1995 / 11:03:22 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6585
    "Modified: 15.12.1995 / 17:13:05 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6586
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6587
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6588
methodStopMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6589
    "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
  6590
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6591
"/    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
  6592
    self commonTraceHelperWith:#stopCountingMemoryUsageOfMethod:
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6593
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6594
    "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
  6595
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6596
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6597
methodStopTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6598
    "show the execution times on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6599
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6600
"/    self information:'called ' , (MessageTracer executionCountOfMethod:currentMethod) printString , ' times.'.
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6601
    self commonTraceHelperWith:#stopTimingMethod:
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6602
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6603
    "Modified: 15.12.1995 / 17:13:05 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6604
    "Created: 17.6.1996 / 17:12:27 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6605
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6606
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6607
methodStringSearch
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6608
    "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
  6609
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6610
    self 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6611
        askForSearchTitle:'string to search for in sources:' 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6612
        openWith:#browseForString:in:
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6613
        isSelector:true
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6614
        searchArea:#class
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6615
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6616
    "Modified: 11.11.1996 / 12:44:13 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6617
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6618
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6619
methodTrace
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6620
    "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
  6621
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6622
    self commonTraceHelperWith:#traceMethod:
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6623
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6624
    "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
  6625
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6626
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6627
methodTraceFull
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6628
    "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
  6629
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6630
    self commonTraceHelperWith:#traceMethodFull:
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6631
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6632
    "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
  6633
    "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
  6634
!
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6635
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6636
methodTraceSender
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6637
    "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
  6638
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6639
    self commonTraceHelperWith:#traceMethodSender:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6640
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6641
    "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
  6642
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6643
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6644
!BrowserView methodsFor:'method stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6645
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6646
checkMethodSelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6647
    currentMethod isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6648
        self warn:'select a method first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6649
        ^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6650
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6651
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6652
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6653
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6654
listEntryForMethod:aMethod selector:selector
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6655
    "answer a method list entry 
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6656
     (gimmic: adding a little image to breakPointed methods)"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6657
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6658
    |s icn|
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6659
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6660
    s := aMethod printStringForBrowserWithSelector:selector.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6661
    aMethod isWrapped ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6662
        (s endsWith:' !!') ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6663
            s := s copyWithoutLast:2
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6664
        ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6665
        (MessageTracer isTrapped:aMethod) ifTrue:[
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6666
            icn := self stopIcon
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6667
        ] ifFalse:[
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6668
            icn := self traceIcon
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6669
        ].
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6670
        ^ LabelAndIcon icon:icn string:s
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6671
    ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6672
    ^ s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6673
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6674
    "Created: 22.10.1996 / 19:51:00 / cg"
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6675
    "Modified: 9.11.1996 / 19:49:49 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6676
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6677
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6678
listOfAllSelectorsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6679
    "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
  6680
     of the argument, aClass and its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6681
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6682
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6683
    |newList otherSelectors allCategories|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6684
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6685
    newList := Set new.
611
f3e973ecc846 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
  6686
    otherSelectors := IdentitySet new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6687
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6688
    allCategories := (aCategory = '* all *').
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6689
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6690
    self classesInFullProtocolHierarchy:aClass do:[:c |
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6691
        |searchCategory|
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6692
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6693
        (aCategory = '* no category *') ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6694
            searchCategory := nil
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6695
        ] ifFalse:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6696
            searchCategory := aCategory
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6697
        ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6698
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6699
        c methodDictionary keysAndValuesDo:[:selector :aMethod |
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6700
            (allCategories
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6701
             or:[aMethod category = searchCategory]) ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6702
                (otherSelectors includes:selector) ifFalse:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6703
                    newList add:(self listEntryForMethod:aMethod selector:selector)
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6704
                ].
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6705
            ] ifFalse:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6706
                otherSelectors add:selector
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6707
            ]
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6708
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6709
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6710
    (newList size == 0) ifTrue:[^ nil].
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6711
    ^ newList asOrderedCollection sort:[:a :b | a string < b string]
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6712
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6713
    "Modified: 5.6.1996 / 11:40:25 / stefan"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6714
    "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
  6715
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6716
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6717
listOfAllSelectorsInCategory:aCategory ofClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6718
    "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
  6719
     of the argument, aClass"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6720
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6721
    |newList searchCategory all|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6722
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6723
    all := (aCategory = '* all *').
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6724
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6725
    (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
  6726
        searchCategory := nil
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6727
    ] ifFalse:[
480
c1b167926f12 ask method to present itself in methodList (for alien codeObjects)
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
  6728
        searchCategory := aCategory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6729
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6730
    newList := OrderedCollection new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6731
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6732
    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
  6733
        (all or:[aMethod category = searchCategory]) ifTrue:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6734
            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
  6735
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6736
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6737
    (newList size == 0) ifTrue:[^ nil].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6738
    ^ 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
  6739
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6740
    "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
  6741
    "Modified: 5.6.1996 / 11:42:51 / stefan"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6742
    "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
  6743
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6744
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6745
methodSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6746
    "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
  6747
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6748
    self switchToMethod:(methodListView selectionValue string).
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6749
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6750
    "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
  6751
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6752
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6753
methodSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6754
    "method selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6755
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6756
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6757
        |index cls|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6758
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6759
        aspect := nil.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6760
        self updateCodeView.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6761
        (currentMethod notNil and:[MessageTracer isCounting:currentMethod]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6762
            self updateMethodListWithScroll:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6763
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6764
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6765
        self setAcceptAndExplainActionsForMethod.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6766
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6767
        "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6768
         if there is any autoSearch string, do the search
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6769
        "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6770
        autoSearch notNil ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6771
            codeView searchFwd:autoSearch startingAtLine:1 col:0 ifAbsent:[]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6772
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6773
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6774
        fullProtocol ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6775
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6776
             remove any bold attribute from classList
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6777
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6778
            1 to:classListView list size do:[:i |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6779
                classListView attributeAt:i remove:#bold.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6780
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6781
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6782
             boldify the class where this method is implemented
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6783
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6784
            currentMethod notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6785
                cls := currentMethod containingClass.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6786
                index := classListView list indexOf:(cls name).
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6787
                (index == 0 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6788
                 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
  6789
                 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
  6790
                    index := classListView list indexOf:(cls name copyWithoutLast:6).
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6791
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6792
                index ~~ 0 ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6793
                    classListView attributeAt:index add:#bold.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6794
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6795
                currentClass := acceptClass := cls.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6796
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6797
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6798
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6799
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6800
    "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
  6801
    "Modified: 17.6.1996 / 16:47:50 / stefan"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6802
    "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
  6803
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6804
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6805
methodTemplate
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6806
    "return a method definition template"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6807
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
'message selector and argument names
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6810
    "comment stating purpose of this message"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6811
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6812
    |temporaries|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6813
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6814
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6815
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6816
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6817
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6818
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6819
     optional: comment giving example use
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6820
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6821
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6822
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6823
 change above template into real code.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6824
 Then `accept'' either via the menu 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6825
 or via the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6826
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6827
 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
  6828
 select any existing methods code, change it,
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6829
 and finally `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6830
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6831
 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
  6832
 and install it with `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6833
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6834
'
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6835
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6836
    "Modified: 8.2.1996 / 13:45:58 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6837
    "Created: 8.2.1996 / 18:21:53 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6838
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6839
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6840
switchToAnyMethodNamed:matchString
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6841
    "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
  6842
     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
  6843
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6844
    |aSelector classToStartSearch classToSearch aClass nm idx|
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6845
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6846
    actualClass isNil ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6847
        currentClassHierarchy notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6848
            classToStartSearch := currentClassHierarchy
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6849
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6850
    ] ifFalse:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6851
        classToStartSearch := actualClass 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6852
    ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6853
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6854
    classToStartSearch notNil ifTrue:[
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6855
"/        showInstance ifFalse:[
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6856
"/            classToStartSearch := classToStartSearch class
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6857
"/        ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6858
        ((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6859
            classToSearch := classToStartSearch.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6860
            aClass := nil.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6861
            [classToSearch notNil and:[aClass isNil]] whileTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6862
                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
  6863
                aSelector notNil ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6864
                    aClass := classToSearch
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6865
                ] ifFalse:[
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6866
                    classToSearch := classToSearch superclass
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6867
                ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6868
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6869
        ] ifFalse:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6870
            aSelector := matchString asSymbolIfInterned.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6871
            aSelector notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6872
                aClass := classToStartSearch whichClassIncludesSelector:aSelector.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6873
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6874
        ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6875
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6876
        aClass notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6877
            nm := aClass name.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6878
"/            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
  6879
"/                ((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
  6880
"/                    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
  6881
"/                ]
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6882
"/            ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6883
            aClass ~~ actualClass ifTrue:[
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6884
                self switchToClassNamed:nm.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6885
            ].    
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6886
            self switchToMethodNamed:aSelector "matchString".
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6887
            ^ self.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6888
        ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6889
    ].
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6890
    self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6891
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  6892
    "Modified: 17.6.1996 / 16:52:36 / stefan"
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  6893
    "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
  6894
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6895
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6896
switchToMethod:aString
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6897
    "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
  6898
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6899
    |selectorString selectorSymbol|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6900
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6901
    (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
  6902
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6903
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6904
     kludge: extract real selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6905
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6906
    selectorString := aString withoutSpaces upTo:(Character space).
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6907
    selectorSymbol := selectorString asSymbolIfInterned.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6908
    selectorSymbol isNil ifTrue:[
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6909
        self beep.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6910
        ^ self
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6911
    ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6912
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6913
    fullProtocol ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6914
        currentMethod := currentSelector := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6915
        "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6916
         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
  6917
        "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6918
        self classesInFullProtocolHierarchy:actualClass do:[:c |
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6919
            (currentMethod isNil 
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6920
             and:[c includesSelector:selectorSymbol]) ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6921
                currentSelector := selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6922
                currentMethod := c compiledMethodAt:selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6923
                acceptClass := c
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6924
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6925
        ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6926
    ] ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6927
        currentSelector := selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6928
        currentMethod := actualClass compiledMethodAt:selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6929
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6930
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6931
    methodCategoryListView notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6932
        currentMethod notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6933
            (currentMethodCategory = currentMethod category) ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6934
                currentMethodCategory := currentMethod category.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6935
                methodCategoryListView setSelectElement:currentMethodCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6936
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6937
        ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6938
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6939
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6940
    self methodSelectionChanged
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6941
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6942
    "Created: 4.6.1996 / 23:00:12 / cg"
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  6943
    "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
  6944
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6945
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6946
switchToMethodNamed:matchString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6947
    "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
  6948
     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
  6949
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6950
    |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
  6951
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6952
    currentClass notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6953
        classToSearch := actualClass.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6954
        dict := classToSearch methodDictionary.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6955
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6956
        ((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6957
            aSelector := dict findFirstKey:[:element | matchString match:element].       
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6958
            aSelector notNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6959
                method := dict at:aSelector.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6960
            ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6961
        ] ifFalse:[
650
bb426452251e Fix #switchToMethodNamed: -- select name in methodListView.
Stefan Vogel <sv@exept.de>
parents: 637
diff changeset
  6962
            aSelector := matchString.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6963
            method := dict at:matchString ifAbsent:[]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6964
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6965
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6966
        method notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6967
            cat := method category.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6968
            cat isNil ifTrue:[cat := '* all *'].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6969
            methodCategoryListView setSelectElement:cat.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6970
            currentMethodCategory := cat.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6971
            self updateMethodCategoryListWithScroll:false.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6972
            self methodCategorySelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6973
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6974
            currentMethod := method.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6975
            currentSelector := aSelector.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6976
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6977
            m := aSelector , '*(*)'.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6978
            idx := methodListView list findFirst:[:line |
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6979
                                                line = aSelector
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6980
                                                or:[m match:line]].
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6981
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  6982
            methodListView setSelection:idx. "/ setSelectElement:aSelector.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6983
            self methodSelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6984
            ^ self
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6985
        ]
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  6986
    ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6987
    self beep.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  6988
650
bb426452251e Fix #switchToMethodNamed: -- select name in methodListView.
Stefan Vogel <sv@exept.de>
parents: 637
diff changeset
  6989
    "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
  6990
    "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
  6991
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6992
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6993
updateMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6994
    self updateMethodListWithScroll:true keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6995
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6996
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6997
updateMethodListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6998
    self updateMethodListWithScroll:scroll keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6999
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7000
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7001
updateMethodListWithScroll:scroll keepSelection:keep
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7002
    |selectors scr first last selection|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7003
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7004
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7005
    methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7006
        selection := methodListView selection.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7007
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7008
        currentMethodCategory notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7009
            fullProtocol ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7010
                selectors := self listOfAllSelectorsInCategory:currentMethodCategory 
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7011
                                inFullProtocolHierarchyOfClass:actualClass
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7012
            ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7013
                selectors := self listOfAllSelectorsInCategory:currentMethodCategory
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7014
                                                       ofClass:actualClass
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7015
            ]
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7016
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7017
        scr := scroll.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7018
        first := methodListView firstLineShown.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7019
        first ~~ 1 ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7020
            last := methodListView lastLineShown.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7021
            selectors size <= (last - first + 1) ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7022
                scr := true
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7023
            ]
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7024
        ].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7025
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7026
        scr ifTrue:[
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7027
            methodListView list: "contents:" selectors
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7028
        ] ifFalse:[
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7029
            methodListView setList: "setContents:" selectors
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7030
        ].
802
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7031
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7032
        (variableListView notNil 
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7033
        and:[variableListView hasSelection]) ifTrue:[
802
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7034
            self hilightMethodsInMethodList.
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7035
        ].
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7036
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7037
        keep ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7038
            methodListView setSelection:selection.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7039
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7040
    ]
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  7041
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  7042
    "Modified: 18.12.1995 / 22:54:04 / stefan"
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7043
    "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
  7044
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7045
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7046
!BrowserView methodsFor:'misc'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7047
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7048
instanceProtocol:aBoolean
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7049
    "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
  7050
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7051
    |onToggle offToggle|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7052
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7053
    showInstance ~~ aBoolean ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7054
        self checkSelectionChangeAllowed ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7055
            instanceToggle notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7056
                aBoolean ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7057
                    offToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7058
                    onToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7059
                ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7060
                    onToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7061
                    offToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7062
                ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7063
                onToggle turnOn.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7064
                offToggle turnOff.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7065
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7066
            showInstance := aBoolean.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7067
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7068
            (variableListView notNil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7069
            and:[variableListView hasSelection]) ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7070
                self unhilightMethodCategories.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7071
                self unhilightMethods.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7072
                variableListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7073
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7074
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7075
            fullProtocol ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7076
                showInstance ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7077
                    actualClass := currentClassHierarchy.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7078
                ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7079
                    actualClass := currentClassHierarchy class.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7080
                ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7081
                acceptClass := actualClass.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7082
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7083
                self updateClassList.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7084
                self updateMethodCategoryListWithScroll:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7085
                self updateMethodListWithScroll:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7086
                self updateVariableList.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7087
                ^ self
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7088
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7089
            currentClass notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7090
                self classSelectionChanged
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7091
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7092
            codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7093
        ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7094
            aBoolean ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7095
                onToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7096
                offToggle := instanceToggle
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7097
            ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7098
                offToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7099
                onToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7100
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7101
            onToggle turnOn.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7102
            offToggle turnOff.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7103
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7104
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7105
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7106
    "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
  7107
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7108
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7109
processName
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7110
    "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
  7111
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7112
    ^ 'System Browser'.
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
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7115
showActivity:someMessage
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7116
    "some activityNotification to be forwarded to the user;
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7117
     show it in the windows title area here."
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7118
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7119
    self busyLabel:someMessage with:nil
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7120
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7121
    "Created: 16.12.1995 / 18:41:37 / cg"
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7122
    "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
  7123
!
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7124
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7125
updateCodeView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7126
    |code|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7127
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7128
    aspect == #hierarchy ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7129
        ^ self classHierarchy
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7130
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7131
    aspect == #classInstVars ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7132
        ^ self classClassInstVars
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7133
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7134
    aspect == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7135
        ^ self classComment
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7136
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7137
    aspect == #primitiveDefinitions ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7138
        ^ self classPrimitiveDefinitions
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7139
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7140
    aspect == #primitiveFunctions ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7141
        ^ self classPrimitiveFunctions
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7142
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7143
    aspect == #primitiveVariables ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7144
        ^ self classPrimitiveVariables
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7145
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7146
    aspect == #revisionInfo ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7147
        ^ self classRevisionInfo
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7148
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7149
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7150
    fullClass ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7151
        currentClass notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7152
            code := currentClass source.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7153
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7154
    ] ifFalse:[
441
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7155
        aspect == #definition ifTrue:[
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7156
            ^ self classDefinition
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7157
        ].
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7158
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7159
        currentMethod notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7160
            (codeView acceptAction isNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7161
            and:[actualClass notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7162
            and:[currentMethodCategory notNil]]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7163
                self setAcceptAndExplainActionsForMethod.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7164
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7165
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7166
            code := currentMethod source.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7167
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7168
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7169
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7170
    codeView contents:code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7171
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7172
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7173
    self normalLabel.
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
    "Created: 23.11.1995 / 14:16:43 / cg"
442
30b20fd70dd5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
  7176
    "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
  7177
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7178
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7179
!BrowserView methodsFor:'private'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7180
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7181
askAndBrowseMethodCategory:title action:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7182
    "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
  7183
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7184
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7185
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7186
    box := self enterBoxTitle:title okText:'browse'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7187
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7188
    sel isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7189
        currentMethodCategory notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7190
            sel := currentMethodCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7191
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7192
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7193
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7194
        box initialText:(sel asString withoutSpaces)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7195
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7196
    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
  7197
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7198
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7200
askForMethodCategory
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7201
    |someCategories box txt retVal|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7202
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7203
    someCategories := actualClass categories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7204
    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
  7205
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7206
    lastMethodCategory isNil ifTrue:[
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7207
        txt := 'new methods'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7208
    ] ifFalse:[
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7209
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7210
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7211
    box initialText:txt.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7212
    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
  7213
    box showAtPointer.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7214
    ^ retVal
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7215
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7216
    "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
  7217
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7218
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7219
askForSearchSelectorTitle:title openWith:aSelector
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7220
    "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
  7221
     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
  7222
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7223
    ^ self 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7224
        askForSearchTitle:title 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7225
        openWith:aSelector 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7226
        isSelector:true
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7227
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7228
    "Modified: 11.11.1996 / 12:43:24 / cg"
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7229
!
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7230
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7231
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
  7232
    "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
  7233
     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
  7234
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7235
    ^ self
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7236
        askForSearchTitle:title 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7237
        openWith:aSelector 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7238
        isSelector:isSelector 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7239
        searchArea:#everywhere
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7240
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7241
    "Modified: 11.11.1996 / 12:42:46 / cg"
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7242
!
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7243
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7244
askForSearchTitle:title openWith:aSelector isSelector:isSelector searchArea:whereDefault
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7245
    "convenient method: setup enterBox with text from codeView or selected
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7246
     method for browsing based on a selector. Set action and launch box.
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7247
     SearchArea may be one of #everywhere, #classCategory, #class or #classHierarchy"
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7248
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  7249
    |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
  7250
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7251
    isSelector ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7252
        selectorHolder := (self selectorToSearchFor) asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7253
    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7254
        selectorHolder := (self stringToSearchFor) asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7255
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7256
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7257
    box := Dialog new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7258
    (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
  7259
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7260
    (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
  7261
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7262
    (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
  7263
        box addHorizontalLine.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7264
        box addVerticalSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7265
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7266
        (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
  7267
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7268
        panel := VerticalPanelView "HorizontalPanelView" new.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7269
        panel horizontalLayout:#fitSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7270
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7271
        grp := RadioButtonGroup new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7272
        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
  7273
        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
  7274
        box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7275
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7276
        currentClassCategory notNil ifTrue:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7277
            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
  7278
            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
  7279
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7280
        ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7281
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7282
        currentClass notNil ifTrue:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7283
            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
  7284
            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
  7285
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7286
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7287
            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
  7288
            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
  7289
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7290
        ].
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7291
        whereDefault notNil ifTrue:[
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7292
            where := (#(everywhere classCategory class classHierarchy)
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7293
                      indexOf:whereDefault).
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7294
            where == 0 ifTrue:[where := 1].
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7295
        ] ifFalse:[
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7296
            where := 1.
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7297
        ].
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7298
        grp value:where.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7299
        whereChannel := grp valueChannel.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7300
        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
  7301
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7302
        box addVerticalSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7303
        box addHorizontalLine.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7304
    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7305
        whereChannel := 1 asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7306
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7307
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7308
    box addAbortButton.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7309
    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
  7310
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7311
    box label:'Search'.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7312
    box open.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7313
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7314
    box accepted ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7315
        sel := selectorHolder value.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7316
        where := whereChannel value.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7317
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7318
        where == 1 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7319
            classes := Smalltalk allClasses.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7320
        ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7321
            where == 2 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7322
                classes := Smalltalk allClassesInCategory:currentClassCategory
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7323
            ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7324
                where == 3 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7325
                    classes := Array with:currentClass
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7326
                ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7327
                    classes := currentClass withAllSubclasses
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7328
                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7329
            ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7330
        ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7331
        self withSearchCursorDo:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7332
            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
  7333
        ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7334
    ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7335
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7336
    "Created: 11.11.1996 / 12:42:14 / cg"
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7337
    "Modified: 11.11.1996 / 12:43:13 / cg"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7338
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7339
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7340
busyLabel:what with:someArgument
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7341
    "set the title for some warning"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7342
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7343
    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
  7344
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7345
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7346
checkSelectionChangeAllowed
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7347
    "return true, if selection change is ok;
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7348
     its not ok, if code has been changed.
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7349
     in this case, return the result of a user query"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7350
857
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7351
    |what m src1 src2 v|
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7352
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7353
    codeView modified ifFalse:[
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7354
        ^ true
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7355
    ].
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7356
387
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7357
    (currentMethod notNil and:[actualClass notNil]) ifTrue:[
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7358
        self withWaitCursorDo:[
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7359
            m := actualClass compiledMethodAt:currentSelector.
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7360
            m notNil ifTrue:[
857
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7361
                (src1 := m source) = (src2 := codeView contents) ifFalse:[
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7362
                    (src1 asCollectionOfLines collect:[:line | line withoutTrailingSeparators])
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7363
                    =
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7364
                    (src2 asCollectionOfLines collect:[:line | line withoutTrailingSeparators])
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7365
                    ifFalse:[
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7366
                        what := self checkSelectionChangeAllowedWithCompare:true.
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7367
                        what == #compare ifTrue:[
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7368
                            v := DiffTextView 
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7369
                                    openOn:src2 
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7370
                                    label:(resources string:'code here (to be accepted ?)')
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7371
                                    and:src1 
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7372
                                    label:(resources string:'methods actual code').
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7373
                            v label:(resources string:'comparing method versions').
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7374
                            ^ false
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7375
                        ].
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7376
                        ^ what
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7377
                    ].
857
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7378
                ].
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7379
                ^ true
387
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7380
            ]
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7381
        ]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7382
    ].
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7383
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7384
    ^ self checkSelectionChangeAllowedWithCompare:false
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7385
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7386
    "Created: 24.11.1995 / 11:03:33 / cg"
857
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7387
    "Modified: 10.11.1996 / 18:14:31 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7388
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7389
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7390
checkSelectionChangeAllowedWithCompare:compareOffered
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7391
    "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
  7392
     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
  7393
     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
  7394
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7395
    |action labels values|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7396
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7397
    codeView modified ifFalse:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7398
        ^ true
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7399
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7400
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7401
    compareOffered ifTrue:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7402
        labels := #('cancel' 'compare' 'accept' 'continue').
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7403
        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
  7404
    ] ifFalse:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7405
        labels := #('cancel' 'accept' 'continue').
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7406
        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
  7407
    ].
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7408
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7409
    action := OptionBox 
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7410
                  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
  7411
                  label:(resources string:'Attention')
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7412
                  form:(WarningBox iconBitmap)
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7413
                  buttonLabels:(resources array:labels)
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7414
                  values:values
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7415
                  default:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7416
    action ~~ #accept ifTrue:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7417
        ^ action
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7418
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7419
    codeView accept. 
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7420
    ^ true
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7421
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7422
    "Created: 24.11.1995 / 10:54:46 / cg"
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7423
    "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
  7424
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7425
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7426
classHierarchyOf:topClass do:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7427
    "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
  7428
     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
  7429
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7430
    |classes s classDict l remaining|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7431
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7432
    classes := IdentitySet new.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7433
    self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7434
        aNamespace allClasses do:[:aClass |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7435
            aClass isMeta ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7436
                classes addAll:(aClass withAllSuperclasses).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7437
            ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7438
        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7439
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7440
    classDict := IdentityDictionary new:classes size.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7441
    classes do:[:aClass |
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7442
        s := aClass superclass.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7443
        s notNil ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7444
            l := classDict at:s ifAbsent:[nil].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7445
            l isNil ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7446
                l := OrderedCollection new:5.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7447
                classDict at:s put:l
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7448
            ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7449
            l add:aClass
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7450
        ]
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7451
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7452
    remaining := classes.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7453
    self classHierarchyOf:topClass level:0 do:aBlock using:classDict removeFrom:remaining.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7454
    (remaining includes:Autoload) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7455
        self classHierarchyOf:Autoload level:0 do:aBlock using:classDict removeFrom:remaining.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7456
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7457
    (remaining asSortedCollection:[:a :b | a name < b name]) do:[:aNilSubclass |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7458
        aBlock value:aNilSubclass value:0
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7459
    ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7460
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7461
    "Created: 28.5.1996 / 13:46:23 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7462
    "Modified: 20.12.1996 / 18:38:51 / cg"
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7463
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7464
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7465
classHierarchyOf:aClass level:level do:aBlock using:aDictionary removeFrom:remainSet
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7466
    "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
  7467
     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
  7468
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7469
    |names subclasses|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7470
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7471
    remainSet remove:aClass ifAbsent:[].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7472
    aBlock value:aClass value:level.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7473
    subclasses := aDictionary at:aClass ifAbsent:[nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7474
    (subclasses size == 0) ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7475
        names := subclasses collect:[:class | class name].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7476
        names sortWith:subclasses.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7477
        subclasses do:[:aSubClass |
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7478
            self classHierarchyOf:aSubClass 
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7479
                            level:(level + 1) 
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7480
                               do:aBlock 
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7481
                            using:aDictionary
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7482
                       removeFrom:remainSet
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7483
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7484
    ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7485
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7486
    "Created: 20.12.1996 / 17:05:06 / cg"
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7487
    "Modified: 20.12.1996 / 17:53:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7488
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7489
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7490
classesInFullProtocolHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7491
    "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
  7492
     the hierarchy"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7493
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7494
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7495
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7496
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7497
    aClass withAllSuperclasses do:[:c |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7498
        (classListView isInSelection:index) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7499
            aBlock value:c
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7500
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7501
        index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7502
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7503
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7504
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7506
classesInHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7507
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7508
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7509
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7510
    aClass withAllSuperclasses do:[:c |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7511
        (classListView isInSelection:index) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7512
            aBlock value:c
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7513
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7514
        index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7515
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7516
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7517
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7518
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7519
compileCode:someCode
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7520
    (ReadStream on:someCode) fileIn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7521
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7522
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7523
displayedClassNameOf:aClass
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7524
    |nm ns|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7525
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7526
    nm := aClass nameWithoutPrefix.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  7527
    ns := aClass nameSpace.
890
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7528
    ns isNil ifTrue:[
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7529
        ^ nm
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7530
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7531
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7532
    currentNamespace = '* all *' ifTrue:[
890
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7533
        (ns == Smalltalk) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7534
            ^ nm
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7535
        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7536
        ^ ns name , '::' , nm   "/ full name
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7537
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7538
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7539
    "/ is it in one of the selected namespaces ?
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7540
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7541
    (self findClassNamedInNameSpace:nm) isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7542
        ^ ns name , '::' , nm   "/ full name
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7543
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7544
    currentNamespace = ns ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7545
        ^ ns name , '::' , nm   "/ full name
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7546
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7547
    ^ nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7548
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7549
    "Created: 20.12.1996 / 17:46:41 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  7550
    "Modified: 21.12.1996 / 20:53:37 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7551
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7552
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7553
enterBoxForBrowseTitle:title action:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7554
    "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
  7555
     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
  7556
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7557
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7558
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7559
    box := self enterBoxTitle:title okText:'browse'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7560
    box initialText:(self stringToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7561
    box action:[:aString | 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7562
        aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7563
            self withWaitCursorDo:[aBlock value:aString]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7564
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7565
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7566
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7567
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7568
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7569
enterBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7570
    "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
  7571
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7572
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7573
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7574
    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
  7575
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7576
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7577
        box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7578
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7579
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7580
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7581
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7582
enterBoxForSearchSelectorTitle:title
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7583
    "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
  7584
     method for browsing based on a selector"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7585
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7586
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7587
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7588
    box := self enterBoxTitle:title okText:'search'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7589
    box initialText:(self selectorToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7590
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7591
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7592
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7593
enterBoxTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7594
    "convenient method: setup enterBox"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7595
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7596
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7597
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7598
    box := EnterBox new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7599
    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
  7600
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7601
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7602
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7603
extractClassAndSelectorFromSelectionInto:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7604
    "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
  7605
     '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
  7606
    the result."
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
    |sel clsName isMeta sep s|
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
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7611
    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
  7612
        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
  7613
        ('*>>*' 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
  7614
            sep := $>
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7615
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7616
            ('* *' 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
  7617
                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
  7618
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7619
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7620
        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
  7621
            "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7622
             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
  7623
            "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7624
            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
  7625
            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
  7626
            [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
  7627
            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
  7628
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7629
            (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
  7630
                isMeta := true.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7631
                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
  7632
            ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7633
                isMeta := false
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7634
            ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7635
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7636
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7637
    aBlock value:clsName value:sel value:isMeta
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7638
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7639
    "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
  7640
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7641
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7642
findClassNamed:aClassName
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7643
    "search through namespaces for aClassName."
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7644
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7645
    |cls|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7646
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7647
    currentNamespace = '* all *' ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7648
        (cls := Smalltalk at:aClassName asSymbol) notNil ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7649
            ^ cls
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7650
        ]
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7651
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7652
    self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7653
        (cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7654
            ^ cls
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7655
        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7656
    ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7657
    currentNamespace ~= '* all *' ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7658
        (cls := Smalltalk at:aClassName asSymbol) notNil ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7659
            ^ cls
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7660
        ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7661
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7662
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7663
    (aClassName startsWith:'Smalltalk::') ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7664
        cls := Smalltalk classNamed:(aClassName copyFrom:'Smalltalk::' size + 1).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7665
        cls notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7666
            ^ cls
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7667
        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7668
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7669
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7670
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7671
    "Created: 20.12.1996 / 15:39:38 / cg"
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7672
    "Modified: 20.12.1996 / 21:40:14 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7673
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7674
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7675
findClassNamedInNameSpace:aClassName
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7676
    "search through namespaces for aClassName."
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7677
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7678
    |cls|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7679
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7680
    self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7681
        (cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  7682
            cls nameSpace == aNamespace ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7683
                ^ cls
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7684
            ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7685
        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7686
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7687
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7688
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7689
    "Created: 20.12.1996 / 17:41:54 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  7690
    "Modified: 21.12.1996 / 20:53:32 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7691
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7692
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7693
findClassOfVariable:aVariableName accessWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7694
    "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
  7695
     is defined; 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7696
     needs either #instVarNames or #classVarNames as aSelector."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7697
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7698
    |cls homeClass|
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
     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
  7702
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7703
    cls := currentClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7704
    [cls notNil] whileTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7705
        ((cls perform:aSelector) includes:aVariableName) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7706
            homeClass := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7707
            cls := nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7708
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7709
            cls := cls superclass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7710
        ]
199
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
    homeClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7713
        "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
  7714
         for the declaring class ...
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7715
        "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7716
        homeClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7717
    ] ifFalse:[
552
c61c0758c10b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 547
diff changeset
  7718
"/        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
  7719
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7720
    ^ homeClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7721
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7722
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7723
listBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7724
    "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
  7725
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7726
    |sel box|
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
    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
  7729
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7730
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7731
        box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7732
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7733
    ^ box
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7736
listBoxTitle:title okText:okText list:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7737
    "convenient method: setup a listBox & return it"
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
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7740
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7741
    box := ListSelectionBox 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7742
                title:(resources string:title)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7743
                okText:(resources string:okText)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7744
                action:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7745
    box list:aList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7746
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7747
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7748
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7749
normalLabel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7750
    "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
  7751
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7752
    |l il|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7753
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7754
    myLabel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7755
        "if I have been given an explicit label,
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7756
         and its not the default, take that one"
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7757
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7758
        myLabel ~= 'System Browser' ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7759
            l := il := myLabel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7760
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7761
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7762
    l isNil ifTrue:[    
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7763
        l := resources string:'System Browser'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7764
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7765
        currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7766
            l := l, ': ', currentClass name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7767
            classListView isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7768
                currentSelector notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7769
                    l := l , ' ' ,  currentSelector
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7770
                ]
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
            il := currentClass name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7773
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7774
            il := l.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7775
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7776
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7777
    self label:l.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7778
    self iconLabel:il.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7779
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7780
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
  7781
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
  7782
    |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
  7783
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
  7784
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7785
        cls := currentClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7786
        cls isMeta ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7787
            meta := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7788
            cls := meta soleInstance
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7789
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7790
            meta := cls class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7791
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7792
        cls removeDependent:self.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7793
        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
  7794
    ].
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
  7795
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
  7796
    "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
  7797
!
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
  7798
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7799
selectorToSearchFor
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7800
    "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
  7801
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7802
    |sel t|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7803
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7804
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7805
    sel notNil ifTrue:[
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7806
        sel := sel asString.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7807
        t := Parser selectorInExpression:sel.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7808
        t notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7809
            sel := t
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7810
        ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7811
        sel := sel withoutSpaces.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7812
        sel == #>> ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7813
            "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
  7814
            self extractClassAndSelectorFromSelectionInto:[:c :s :m |
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7815
                sel := s
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7816
            ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7817
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7818
    ] ifFalse:[
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7819
        methodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7820
            methodListView selection notNil ifTrue:[
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7821
                sel := methodListView selectionValue string
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7822
            ]
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7823
        ] ifFalse:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7824
            classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7825
                classMethodListView selection notNil ifTrue:[
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7826
                    sel := classMethodListView selectionValue string.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7827
                ].
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7828
                sel notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7829
                    sel := self selectorFromClassMethodString:sel
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7830
                ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7831
            ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7832
        ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7833
        sel notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7834
            sel := sel withoutSpaces upTo:(Character space)
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7835
        ] ifFalse:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7836
            sel := ''
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7837
        ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7838
    ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7839
    ^ sel string
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  7840
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7841
    "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
  7842
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7843
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7844
setAcceptAndExplainActionsForMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7845
    "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
  7846
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7847
    codeView acceptAction:[:theCode |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7848
        |cat cls|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7849
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7850
        codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7851
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7852
        (cat := currentMethodCategory) = '* all *' ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7853
            "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
  7854
             ... thanks to Arno for pointing this out"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7855
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7856
            cat := self askForMethodCategory.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7857
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7858
        (cat notNil and:[cat notEmpty]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7859
            fullProtocol ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7860
                cls := acceptClass "/actualClass whichClassIncludesSelector:currentSelector.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7861
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7862
            cls isNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7863
                cls := actualClass
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7864
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7865
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7866
            Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7867
                lockUpdates := true.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7868
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7869
                actualClass compilerClass 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7870
                    compile:theCode asString
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7871
                    forClass:cls
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7872
                    inCategory:cat 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7873
                    notifying:codeView.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7874
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7875
                codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7876
                self updateMethodListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7877
                currentMethod := actualClass compiledMethodAt:currentSelector.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7878
                self normalLabel.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7879
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7880
            lockUpdates := false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7881
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7882
        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
  7883
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7884
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7885
    codeView explainAction:[:theCode :theSelection |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7886
        self showExplanation:(Explainer 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7887
                                explain:theSelection 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7888
                                in:theCode
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7889
                                forClass:actualClass)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7890
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7891
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7892
    "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
  7893
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7894
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7895
setDoitActionForClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7896
    "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
  7897
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7898
    "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
  7899
     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
  7900
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7901
    codeView doItAction:[:theCode |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7902
        |compiler|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7903
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7904
        currentClass isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7905
            compiler := Compiler
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7906
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7907
            compiler := currentClass evaluatorClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7908
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7909
        compiler 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7910
            evaluate:theCode 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7911
            in:nil 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7912
            receiver:currentClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7913
            notifying:codeView 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7914
            logged:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7915
            ifFail:nil 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7916
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7917
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7918
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7919
setListOfNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7920
    |l hasSmalltalk|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7921
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7922
    namespaceList isNil ifTrue:[ ^ self ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7923
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7924
    l := self listOfAllNamespaces collect:[:ns | ns name].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7925
    l := l asOrderedCollection.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7926
    hasSmalltalk := true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7927
    l remove:'Smalltalk' ifAbsent:[hasSmalltalk := false].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7928
    l sort.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7929
    l addFirst:'-'.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7930
    hasSmalltalk ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7931
        l addFirst:'Smalltalk'
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7932
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7933
    l addFirst:'* all *'.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7934
    namespaceList list:l
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7935
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7936
    "Modified: 20.12.1996 / 19:18:29 / cg"
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7937
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7938
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7939
setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7940
    codeView setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7941
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7942
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7943
showExplanation:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7944
    "show explanation from Parser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7945
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7946
    self information:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7947
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7948
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7949
stopIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7950
    "answer an icon to mark breakPointed methods"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7951
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7952
    |stopIcon|
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7953
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7954
    StopIcon notNil ifTrue:[^ StopIcon].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7955
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  7956
    stopIcon := Depth1Image 
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  7957
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7958
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7959
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7960
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7961
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7962
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7963
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7964
                                   2r00111110 2r01111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7965
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7966
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7967
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7968
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7969
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7970
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7971
                                   2r00111110 2r01111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7972
                                   2r00011110 2r01111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7973
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7974
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7975
                                   2r00000000 2r00000000
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  7976
                                ).
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  7977
    stopIcon mask:(Depth1Image 
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  7978
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7979
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7980
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7981
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7982
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7983
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7984
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7985
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7986
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7987
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7988
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7989
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7990
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7991
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7992
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7993
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7994
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7995
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7996
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7997
                                )).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7998
    stopIcon colorMap:(Array with:Color white with:Color red).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  7999
    StopIcon := stopIcon.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8000
    ^ stopIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8001
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8002
    "Created: 22.10.1996 / 18:03:38 / cg"
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8003
    "Modified: 9.11.1996 / 19:47:51 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8004
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8005
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8006
stringToSearchFor
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8007
    "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
  8008
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8009
    |sel|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8010
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8011
    sel := codeView selection.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8012
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8013
        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
  8014
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8015
        sel isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8016
            currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8017
                sel := currentClass name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8018
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8019
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8020
        sel notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8021
            sel := sel withoutSpaces
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8022
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8023
            sel := ''
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8024
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8025
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8026
    ^ sel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8027
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8028
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8029
traceIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8030
    "answer an icon to mark traced methods"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8031
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8032
    |traceIcon|
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8033
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8034
    TraceIcon notNil ifTrue:[^ TraceIcon].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8035
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8036
    traceIcon := Depth1Image
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8037
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8038
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8039
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8040
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8041
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8042
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8043
                                   2r00110000 2r00001100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8044
                                   2r00110000 2r00001100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8045
                                   2r00011000 2r00011000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8046
                                   2r00011000 2r00011000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8047
                                   2r00001100 2r00110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8048
                                   2r00001100 2r00110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8049
                                   2r00000110 2r01100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8050
                                   2r00000110 2r01100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8051
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8052
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8053
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8054
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8055
                                   2r00000000 2r00000000
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8056
                                ).
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8057
    traceIcon mask:(Depth1Image
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8058
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8059
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8060
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8061
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8062
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8063
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8064
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8065
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8066
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8067
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8068
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8069
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8070
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8071
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8072
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8073
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8074
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8075
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8076
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8077
                                )).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8078
    traceIcon colorMap:(Array with:Color white with:Color red).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8079
    TraceIcon := traceIcon.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8080
    ^ traceIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8081
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8082
    "Created: 22.10.1996 / 18:04:14 / cg"
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8083
    "Modified: 9.11.1996 / 19:48:18 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8084
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8085
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8086
warnLabel:what
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8087
    "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
  8088
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8089
    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
  8090
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8091
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8092
withSearchCursorDo:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8093
    ^ self withCursor:(Cursor questionMark) do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8094
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8095
    "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
  8096
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8097
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8098
!BrowserView methodsFor:'unused'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8099
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8100
listOfAllMethodCategoriesInHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8101
    "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
  8102
     and all of its superclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8104
    |newList cat|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8105
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8106
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8107
    self classesInHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8108
        c methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8109
            cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8110
            cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8111
                cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8112
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8113
            newList add:cat
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8114
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8115
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8116
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8117
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8118
    ^ newList asOrderedCollection sort
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8119
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8120
    "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
  8121
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8122
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8123
listOfAllSelectorsInCategory:aCategory inHierarchyOfClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8124
    "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
  8125
     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
  8126
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8127
    |newList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8128
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8129
    newList := Set new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8130
    self classesInHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8131
        |searchCategory|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8132
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8133
        (aCategory = '* all *') ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8134
            newList addAll:(c methodDictionary keys)
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8135
        ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8136
            (aCategory = '* no category *') ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8137
                searchCategory := nil
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8138
            ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8139
                searchCategory := aCategory
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8140
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8141
            c methodDictionary keysAndValuesDo:[:selector :aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8142
                (aMethod category = searchCategory) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8143
                    newList add:selector
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8144
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8145
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8146
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8147
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8148
    (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
  8149
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8150
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8151
    "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
  8152
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8153
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8154
!BrowserView methodsFor:'variable list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8155
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8156
allClassOrInstVarRefsTitle:title access:access mods:modifications
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8157
    "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
  8158
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8159
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8160
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8161
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8162
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8163
        box action:[:aVariableName |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8164
            |homeClass|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8165
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8166
            aVariableName isEmpty ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8167
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8168
                    homeClass := self findClassOfVariable:aVariableName accessWith:access.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8169
                    access == #classVarNames ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8170
                        SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8171
                            browseClassRefsTo:aVariableName 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8172
                            under:homeClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8173
                            modificationsOnly:modifications
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8174
                    ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8175
                        SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8176
                            browseInstRefsTo:aVariableName 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8177
                            under:homeClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8178
                            modificationsOnly:modifications
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8179
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8180
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8181
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8182
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8183
        box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8184
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8185
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8186
    "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
  8187
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8188
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8189
allClassVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8190
    "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
  8191
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8192
    self allClassOrInstVarRefsTitle:'class variable to browse modifications of:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8193
                                  access:#classVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8194
                                  mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8195
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8196
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8197
allClassVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8198
    "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
  8199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8200
    self allClassOrInstVarRefsTitle:'class variable to browse references to:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8201
                                  access:#classVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8202
                                  mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8203
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8204
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8205
allInstVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8206
    "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
  8207
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8208
    self allClassOrInstVarRefsTitle:'instance variable to browse modifications of:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8209
                                  access:#instVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8210
                                  mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8211
!
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
allInstVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8214
    "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
  8215
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8216
    self allClassOrInstVarRefsTitle:'instance variable to browse references to:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8217
                                  access:#instVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8218
                                  mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8219
!
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
classVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8222
    "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
  8223
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8224
    self classVarRefsOrModsTitle:'class variable to browse modifications of:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8225
                                 mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8226
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8227
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8228
classVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8229
    "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
  8230
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8231
    self classVarRefsOrModsTitle:'class variable to browse references to:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8232
                                 mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8233
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8234
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8235
classVarRefsOrModsTitle:title mods:mods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8236
    "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
  8237
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8238
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8239
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8240
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8241
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8242
        box action:[:aString |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8243
            aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8244
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8245
                    SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8246
                           browseClassRefsTo:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8247
                           in:(Array with:currentClass)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8248
                           modificationsOnly:mods 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8249
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8250
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8251
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8252
        box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8253
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8254
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8255
    "Created: 23.11.1995 / 14:12:56 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8256
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8257
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8258
enterBoxForVariableSearch:title
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8259
    |box sel|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8260
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8261
    box := self enterBoxForCodeSelectionTitle:title okText:'browse'.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8262
    variableListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8263
        codeView hasSelection ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8264
            (sel := variableListView selectionValue) notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8265
                (sel startsWith:'---') ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8266
                    box initialText:sel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8267
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8268
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8269
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8270
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8271
    ^ box
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8272
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8273
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8274
instVarMods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8275
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8276
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8277
    self instVarRefsOrModsTitle:'instance variable to browse modifications of:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8278
                                mods:true 
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8279
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8280
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8281
instVarRefs
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8282
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8283
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8284
    self instVarRefsOrModsTitle:'instance variable to browse references to:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8285
                           mods:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8286
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8287
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8288
instVarRefsOrModsTitle:title mods:mods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8289
    "show an enterbox for instvar to search for"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8290
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8291
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8292
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8293
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8294
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8295
        box action:[:aString |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8296
            aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8297
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8298
                    SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8299
                        browseInstRefsTo:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8300
                        in:(Array with:currentClass)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8301
                        modificationsOnly:mods 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8302
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8303
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8304
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8305
        box showAtPointer
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8306
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8307
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8308
    "Created: 23.11.1995 / 14:12:40 / cg"
93
claus
parents: 92
diff changeset
  8309
!
claus
parents: 92
diff changeset
  8310
claus
parents: 92
diff changeset
  8311
varTypeInfo
claus
parents: 92
diff changeset
  8312
    "show typical usage of a variable"
claus
parents: 92
diff changeset
  8313
claus
parents: 92
diff changeset
  8314
    |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
  8315
     searchClass s|
93
claus
parents: 92
diff changeset
  8316
claus
parents: 92
diff changeset
  8317
    name := variableListView selectionValue.
claus
parents: 92
diff changeset
  8318
    name isNil ifTrue:[^ self].
claus
parents: 92
diff changeset
  8319
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8320
    showInstance ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8321
        searchClass := currentClass whichClassDefinesClassVar:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8322
        value := searchClass classVarAt:(name asSymbol).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8323
        s := value displayString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8324
        s size > 60 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8325
            s := (s copyTo:60) , ' ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8326
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8327
        msg := name , ' is (currently):\\' , s.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8328
        s ~= value classNameWithArticle ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8329
            msg := msg , '\\(' , value class name , ')'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8330
        ]
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8331
    ] ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8332
        searchClass := actualClass whichClassDefinesInstVar:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8333
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8334
        idx := searchClass instVarOffsetOf:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8335
        idx isNil ifTrue:[^ self].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8336
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8337
        classes := IdentitySet new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8338
        values := IdentitySet new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8339
        instCount := 0.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8340
        subInstCount := 0.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8341
        searchClass allSubInstancesDo:[:i |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8342
            |val|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8343
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8344
            val := i instVarAt:idx.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8345
            val notNil ifTrue:[values add:val].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8346
            classes add:val class.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8347
            (i isMemberOf:searchClass) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8348
                instCount := instCount + 1.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8349
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8350
                subInstCount := subInstCount + 1
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8351
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8352
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8353
        (instCount == 0 and:[subInstCount == 0]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8354
            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
  8355
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8356
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8357
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8358
        instCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8359
            msg := 'in (currently: ' , instCount printString,') instances '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8360
            subInstCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8361
                msg := msg , 'and '
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8362
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8363
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8364
            msg := 'in '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8365
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8366
        subInstCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8367
            msg := msg , '(currently: ' , subInstCount printString, ') derived instances '
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8368
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8369
        msg := msg, 'of ' , searchClass name , ',\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8370
        msg := msg , name , ' '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8371
        ((values size == 1) 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8372
        or:[classes size == 1 and:[classes first == UndefinedObject]]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8373
            values size == 1 ifTrue:[value := values first].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8374
            (value isNumber or:[value isString]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8375
                msg := msg , 'is always the same:\\      ' , 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8376
                             value class name , ' (' , value storeString , ')'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8377
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8378
                (value isNil or:[value == true or:[value == false]]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8379
                    msg := msg , 'is always:\\      ' , 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8380
                                 value printString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8381
                ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8382
                    msg := msg , 'is always the same:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8383
                    msg := msg , '      ' , value class name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8384
                    value isLiteral ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8385
                        msg := msg , ' (' , value storeString , ')'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8386
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8387
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8388
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8389
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8390
            classes size == 1 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8391
                msg := msg , 'is always:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8392
                msg := msg , '      ' , classes first name , '\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8393
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8394
                msg := msg , 'is one of:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8395
                classes := classes asOrderedCollection.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8396
                classes size > 20 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8397
                    classes := classes copyFrom:1 to:20.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8398
                    cut := true
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8399
                ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8400
                    cut := false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8401
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8402
                names := classes collect:[:cls |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8403
                    |nm|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8404
                    cls == UndefinedObject ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8405
                        'nil'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8406
                    ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8407
                        cls == True ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8408
                            'true'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8409
                        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8410
                            cls == False ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8411
                                'false'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8412
                            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8413
                                cls name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8414
                            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8415
                        ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8416
                    ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8417
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8418
                names sort.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8419
                names do:[:nm |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8420
                    msg := msg , '      ' , nm , '\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8421
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8422
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8423
        ].
93
claus
parents: 92
diff changeset
  8424
    ].
claus
parents: 92
diff changeset
  8425
claus
parents: 92
diff changeset
  8426
    box := InfoBox title:msg withCRs.
claus
parents: 92
diff changeset
  8427
    box label:'variable type information'.
claus
parents: 92
diff changeset
  8428
    box showAtPointer
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8429
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8430
    "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
  8431
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8432
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8433
variableListMenu
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8434
    |labels selectors|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8435
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8436
    currentClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8437
        variableListView flash.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8438
        ^ nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8439
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8440
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8441
    labels := #(
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8442
                    'instvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8443
                    'classvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8444
                    'all instvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8445
                    'all classvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8446
                    '-'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8447
                    'instvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8448
                    'classvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8449
                    'all instvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8450
                    'all classvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8451
               ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8452
    selectors := #(
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8453
                    instVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8454
                    classVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8455
                    allInstVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8456
                    allClassVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8457
                    nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8458
                    instVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8459
                    classVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8460
                    allInstVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8461
                    allClassVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8462
                 ).
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8463
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8464
    ("showInstance and:[" variableListView hasSelection "]" ) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8465
        labels := labels , #(
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8466
                                '-'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8467
                                'type information'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8468
                           ).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8469
        selectors := selectors , #(
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8470
                                nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8471
                                varTypeInfo
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8472
                                ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8473
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8474
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8475
    ^ PopUpMenu labels:(resources array:labels)
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8476
                selectors:selectors
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8477
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8478
    "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
  8479
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8480
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8481
variableSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8482
    "variable selection changed"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8483
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8484
    |name idx|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8485
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8486
    name := variableListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8487
    name isNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8488
        self unhilightMethodCategories.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8489
        self unhilightMethods.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8490
        self autoSearch:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8491
        ^ self
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8492
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8493
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8494
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8495
     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
  8496
     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
  8497
     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
  8498
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8499
    idx := variableListView list findLast:[:entry | entry = name].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8500
    idx ~~ lineNr ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8501
        "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
  8502
        variableListView setSelection:idx
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8503
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8504
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8505
    "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
  8506
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8507
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8508
    self hilightMethodsInMethodCategoryList:true inMethodList:true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8509
    self autoSearch:name.
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8510
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8511
    "Modified: 25.5.1996 / 12:26:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8512
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8513
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8514
!BrowserView methodsFor:'variable stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8515
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8516
hilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8517
    "helper; given a list itme, highlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8518
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8519
    |e|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8520
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8521
    methodCategoryListView font bold ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8522
        "/ already bold; use different color then
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8523
        methodCategoryListView foregroundColor brightness > 0.5 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8524
            methodCategoryListView backgroundColor brightness < 0.25 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8525
                e := #color->Color blue
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8526
            ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8527
                e := #color->Color black
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8528
            ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8529
        ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8530
            methodCategoryListView backgroundColor brightness > 0.75 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8531
                e := #color->Color red darkened
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8532
            ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8533
                e := #color->Color white.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8534
            ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8535
        ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8536
    ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8537
        e := #bold.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8538
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8539
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8540
    entry isString ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8541
        ^ entry asText emphasizeAllWith:e.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8542
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8543
    ^ 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
  8544
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8545
    "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
  8546
    "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
  8547
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8548
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8549
hilightMethodsInMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8550
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8551
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8552
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8553
    self hilightMethodsInMethodCategoryList:true inMethodList:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8554
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8555
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8556
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8557
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8558
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8559
hilightMethodsInMethodCategoryList:inCat inMethodList:inMethods 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8560
    "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
  8561
     variable, and highlight them"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8562
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8563
    |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
  8564
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8565
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8566
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8567
    inCat ifTrue:[self unhilightMethodCategories].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8568
    inMethods ifTrue:[self unhilightMethods].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8569
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8570
    actualClass isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8571
    (methodCategoryListView isNil 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8572
    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
  8573
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8574
    name := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8575
    name isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8576
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8577
    self withSearchCursorDo:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8578
        |classes filter any supers|
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8579
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8580
        classes := Array with:actualClass.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8581
        (currentClassHierarchy notNil and:[fullProtocol]) ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8582
            supers := actualClass allSuperclasses.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8583
            supers notNil ifTrue:[    
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8584
                classes := classes , supers.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8585
            ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8586
            redefinedSelectors := IdentitySet new.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8587
        ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8588
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8589
        filter := SystemBrowser filterToSearchRefsTo:name classVars:showInstance not modificationsOnly:false. 
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8590
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8591
        methodListView notNil ifTrue:[
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8592
            methodList := methodListView list.
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8593
        ].
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8594
        methodCategoryListView notNil ifTrue:[
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8595
            methodCategoryList := methodCategoryListView list.
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8596
        ].
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8597
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8598
        any := false.
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8599
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8600
        "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8601
         highlight the method that ref this variable
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8602
        "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8603
        classes do:[:someClass |
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8604
            (fullProtocol
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8605
            and:[classListView valueIsInSelection:(someClass name)]) ifFalse:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8606
                someClass methodDictionary keysAndValuesDo:[:selector :method |
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8607
                    (inCat
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8608
                    or:[methodList notNil
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8609
                        and:[methodList includes:selector]])
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8610
                    ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8611
                        (redefinedSelectors isNil
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8612
                        or:[(redefinedSelectors includes:selector) not])
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8613
                       ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8614
                           (filter value:someClass value:method value:selector) ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8615
                               |idx cat|
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8616
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8617
                               (inCat
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8618
                               and:[methodCategoryList notNil]) ifTrue:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8619
                                   cat := method category.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8620
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8621
                                    highlight the methodCategory
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8622
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8623
                                   idx := methodCategoryListView list indexOf:cat.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8624
                                   idx ~~ 0 ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8625
                                        entry := methodCategoryListView at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8626
                                        entry := self hilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8627
                                        methodCategoryListView at:idx put:entry
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8628
"/                                       methodCategoryListView attributeAt:idx put:#bold.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8629
                                   ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8630
                               ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8631
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8632
                               (inMethods
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8633
                               and:[methodList notNil]) ifTrue:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8634
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8635
                                    highlight the method
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8636
                                   "
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8637
                                   idx := methodListView list 
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8638
                                                findFirst:[:item | item string = selector
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8639
                                                                   or:[item string startsWith:(selector , ' ')]
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8640
                                                          ].
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8641
                                   idx ~~ 0 ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8642
                                        entry := methodListView at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8643
                                        entry := self hilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8644
                                        methodListView at:idx put:entry
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8645
"/                                        methodListView attributeAt:idx put:#bold.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8646
                                   ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8647
                                   any := true
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8648
                               ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8649
                           ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8650
                           redefinedSelectors notNil ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8651
                               redefinedSelectors add:selector
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8652
                           ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8653
                        ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8654
                    ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8655
                ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8656
            ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8657
        ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8658
        any ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8659
            self setSearchPattern:name
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8660
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8661
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8662
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8663
    "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
  8664
    "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
  8665
    "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
  8666
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8667
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8668
hilightMethodsInMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8669
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8670
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8671
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8672
    self hilightMethodsInMethodCategoryList:false inMethodList:true 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8673
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8674
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8675
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8676
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8677
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8678
unhilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8679
    "helper; given a list itme, unhighlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8680
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8681
    entry isString ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8682
        ^ entry string
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8683
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8684
    ^ entry copy string:(entry string)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8685
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8686
    "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
  8687
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8688
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8689
unhilightMethodCategories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8690
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8691
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8692
    |list entry sz "{ Class: SmallInteger }"|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8693
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8694
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8695
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8696
    methodCategoryListView notNil ifTrue:[
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8697
        list := methodCategoryListView list.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8698
        sz := list size.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8699
        1 to:sz do:[:idx |
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8700
            entry := list at:idx.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8701
            entry := self unhilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8702
            methodCategoryListView at:idx put:entry.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8703
"/            methodCategoryListView attributeAt:idx put:nil.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8704
        ]
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8705
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8706
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8707
    "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
  8708
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8709
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8710
unhilightMethods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8711
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8712
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8713
    |list entry sz "{Class: SmallInteger }" |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8714
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8715
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8716
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8717
    methodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8718
        list := methodListView list.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8719
        sz := list size.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8720
        1 to:sz do:[:idx |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8721
            entry := list at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8722
            entry := self unhilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8723
            methodListView at:idx put:entry.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8724
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8725
"/            methodListView attributeAt:idx put:nil.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8726
        ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8727
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8728
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8729
    "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
  8730
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8731
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8732
updateVariableList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8733
    |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
  8734
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8735
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8736
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8737
    oldSelection := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8738
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8739
    l := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8740
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8741
     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
  8742
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8743
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8744
        nameAccessSelector := #instVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8745
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8746
        nameAccessSelector := #classVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8747
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8748
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8749
"/    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
  8750
"/    class isNil ifTrue:[class := currentClassHierarchy].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8751
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8752
    class := currentClassHierarchy notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8753
        currentClassHierarchy
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8754
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8755
        currentClass
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8756
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8757
    class := currentClass.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8758
    fullProtocol ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8759
        class := currentClassHierarchy
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8760
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8761
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8762
    class isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8763
        variableListView list:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8764
        ^ self
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8765
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  8766
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8767
    class withAllSuperclasses do:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8768
        |ignore|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8769
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8770
        ignore := fullProtocol 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8771
                  and:[classListView valueIsInSelection:(aClass name asString)].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8772
        ignore ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8773
            subList := aClass perform:nameAccessSelector.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8774
            subList size ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8775
                l := l , (subList asOrderedCollection reverse).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8776
                l := l , (OrderedCollection with:'---- ' , aClass name , ' ---------').
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8777
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8778
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8779
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8780
    l reverse.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8781
    variableListView setAttributes:nil.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8782
    l ~= variableListView list ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8783
        variableListView list:l.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8784
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8785
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8786
    l keysAndValuesDo:[:index :entry |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8787
        (entry startsWith:'---') ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8788
            variableListView attributeAt:index put:#disabled.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8789
            last := index
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8790
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8791
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8792
    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
  8793
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8794
    oldSelection notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8795
        variableListView setSelectElement:oldSelection.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8796
        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
  8797
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  8798
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  8799
    "Modified: 27.10.1996 / 15:48:02 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8800
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8801
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  8802
!BrowserView class methodsFor:'documentation'!
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
  8803
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
  8804
version
890
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  8805
    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.230 1996-12-23 15:05:31 ca Exp $'
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
  8806
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8807
BrowserView initialize!