BrowserView.st
author Claus Gittinger <cg@exept.de>
Sun, 05 Jan 1997 03:22:50 +0100
changeset 908 927e36f25eac
parent 907 915c9573dc5c
child 909 ccbc84af922c
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
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
    22
		namespaceList allNamespaces gotClassList'
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
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   124
delayedUpdate:something with:someArgument from:changedObject
273
0fc84937f240 check oldMethod in method-update notification
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   125
    |list selector oldMethod|
93
claus
parents: 92
diff changeset
   126
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   127
    (changedObject == Smalltalk) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   128
        allNamespaces := nil.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   129
        namespaceList notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   130
            self setListOfNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   131
        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   132
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   133
        something == #newClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   134
            (currentClass notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   135
            and:[someArgument name = currentClass name]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   136
                "
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   137
                 the current class has changed
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   138
                "
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   139
                (aspect == #definition
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   140
                and:[codeView modified not]) ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   141
                    self refetchClass.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   142
                    self classSelectionChanged.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   143
                ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   144
                    self updateClassListWithScroll:false.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   145
                ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   146
                self warnLabel:'the selected class has changed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   147
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   148
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   149
            ((someArgument category = currentClassCategory)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   150
            or:[currentClassCategory notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   151
                and:[currentClassCategory startsWith:'*']]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   152
                self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   153
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   154
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   155
            someArgument category ~= currentClassCategory ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   156
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   157
                 category new ?
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   158
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   159
                (classCategoryListView notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   160
                and:[(list := classCategoryListView list) notNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   161
                and:[(list includes:someArgument category) not]])
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   162
                ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   163
                    self updateClassCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   164
                ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   165
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   166
            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   167
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   168
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   169
        something == #classRemove ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   170
            someArgument == currentClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   171
                self warnLabel:'the selected class was removed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   172
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   173
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   174
            " fall into general update "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   175
        ].
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
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   178
         any other (unknown) change 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   179
         with the Smalltalk dictionary ...
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
        self updateClassCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   182
        self updateClassListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   183
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   184
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   185
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   186
    changedObject isBehavior ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   187
        "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   188
        "/ its a class, that has changed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   189
        "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   190
        fullClass ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   191
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   192
            "/ full-class browser ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   193
            "/ (must check for both class and metaclass changes)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   194
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   195
            (currentClass == changedObject
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   196
            or:[currentClass class == changedObject]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   197
                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
   198
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   199
            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   200
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   201
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   202
        (currentClass notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   203
        and:[changedObject name = currentClass name]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   204
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   205
            "/ its the current class that has changed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   206
            "/
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   207
            something == #methodDictionary ifTrue:[
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
                "/ 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
   210
                "/ the selector and the oldMethod
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   211
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   212
                someArgument isArray ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   213
                    oldMethod := someArgument at:2.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   214
                    selector := someArgument at:1.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   215
                ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   216
                    selector := someArgument
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   217
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   218
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   219
                (selector isSymbol) ifTrue:[
792
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   220
                    |changedMethod s1 s2|
353
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
                    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   223
                     the method with selector was changed or removed
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   224
                    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   225
                    self updateMethodCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   226
                    self updateMethodListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   227
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   228
                    selector == currentSelector ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   229
                        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   230
                         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
   231
                         changed somehow in another browser (or via fileIn)
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
                        changedMethod := currentClass compiledMethodAt:currentSelector.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   234
                        changedMethod isNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   235
                            self warnLabel:'the method shown was removed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   236
                            ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   237
                        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   238
                        "compare the source codes"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   239
                        currentMethod notNil ifTrue:[
792
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   240
                            s1 := changedMethod source asString asCollectionOfLines copy.
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   241
                            [s1 last isEmpty] whileTrue:[s1 removeLast].
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   242
                            s2 := codeView contents  asCollectionOfLines copy.
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   243
                            [s2 last isEmpty] whileTrue:[s2 removeLast].
a893a3537d51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 791
diff changeset
   244
                            s1 = s2 ifFalse:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   245
                                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
   246
                            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   247
                        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   248
                        ^ self    
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
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   252
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   253
            something == #comment ifTrue:[
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 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
   256
                 currently showing the comment
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   257
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   258
                aspect == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   259
                    codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   260
                        self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   261
                        self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   262
                    ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   263
                        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
   264
                    ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   265
                ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   266
                self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   267
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   268
            ].
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
            something == #definition ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   271
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   272
                 the class has changed its definition.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   273
                 Warn, except if showing a method.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   274
                "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   275
                aspect notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   276
                    codeView modified ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   277
                        self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   278
                        self updateCodeView
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   279
                    ] ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   280
                        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
   281
                    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   282
                    ^ self
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
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
            "/ 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
   288
            "/ warn if modified
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 notNil 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 classes 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
                ^ self
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   298
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   299
        
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
             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
   302
             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
   303
            "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   304
            self refetchClass.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   305
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   306
            self updateMethodCategoryListWithScroll:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   307
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   308
            "dont update codeView ...."
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   309
            "self update"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   310
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   311
            self warnLabel:'the class has changed'.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   312
            ^ self
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
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
         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
   317
         that is cought in the above case).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   318
         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
   319
         or hierarchy ...
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   320
        "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   321
        currentClassHierarchy notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   322
            fullProtocol ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   323
                (currentClass isSubclassOf:changedObject) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   324
                    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
   325
                ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   326
            ] ifFalse:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   327
                ((currentClass isSubclassOf:changedObject)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   328
                or:[changedObject isSubclassOf:currentClass]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   329
                    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
   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
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   334
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   335
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   336
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   337
    (changedObject isMethod) ifTrue:[
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   338
    ]
236
d94505a6f697 release currentMethod when compiling or change notification arrives
Claus Gittinger <cg@exept.de>
parents: 229
diff changeset
   339
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   340
    "Created: 4.1.1997 / 13:54:00 / cg"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   341
    "Modified: 4.1.1997 / 14:33:34 / cg"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   342
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   343
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   344
refetchClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   345
    "after a class definition change in another browser,
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   346
     this is sent to update (otherwise, we'd still refer to the obsolete class)"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   347
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   348
"/    currentClass := Smalltalk at:(currentClass name asSymbol).
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   349
    self switchToClass:(Smalltalk at:(currentClass name asSymbol)).
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   350
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   351
"/    showInstance ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   352
"/        actualClass := currentClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   353
"/    ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   354
"/        actualClass := currentClass class
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   355
"/    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   356
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   357
    "Created: 8.2.1996 / 13:22:27 / cg"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   358
    "Modified: 8.2.1996 / 13:40:18 / cg"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   359
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   360
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   361
update:something with:someArgument from:changedObject
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   362
    |argList|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   363
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   364
    (changedObject == ObjectMemory) ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   365
        (something == #earlyRestart 
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   366
        or:[something == #restarted
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   367
        or:[something == #returnFromSnapshot]]) ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   368
            "/ those are to be ignored.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   369
            ^ self
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   370
        ]
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   371
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   372
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   373
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   374
    "/ avoid update/warn after my own changes
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   375
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   376
    lockUpdates == true ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   377
        ^ self
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   378
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   379
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   380
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   381
    "/ if such an update is already in the queue, ignore it.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   382
    "/ Otherwise push it as an event, to be handled when I am back
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   383
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   384
    argList := Array with:something 
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   385
                     with:someArgument 
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   386
                     with:changedObject.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   387
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   388
    (self sensor 
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   389
        hasEvent:#delayedUpdate:with:from:
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   390
        for:self
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   391
        withArguments:argList) ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   392
        ^ self
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   393
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   394
    self sensor
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   395
        pushUserEvent:#delayedUpdate:with:from:
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   396
        for:self
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   397
        withArguments:argList
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   398
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   399
    "Modified: 4.1.1997 / 14:28:06 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   400
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   401
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   402
!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
   403
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   404
classCategoryClone
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   405
    "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
   406
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   407
    SystemBrowser openInClass:actualClass selector:currentSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   408
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   409
    "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
   410
    "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
   411
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   412
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   413
classCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   414
    "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
   415
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   416
    |aStream fileName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   417
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   418
    self checkClassCategorySelected ifFalse:[^ self].
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   419
    (currentClassCategory startsWith:'*') ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   420
        self warn:(resources string:'try a real category').
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   421
        ^ self
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   422
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   423
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   424
    fileName := currentClassCategory asString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   425
    fileName replaceAll:Character space by:$_.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   426
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   427
     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
   428
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   429
    Project notNil ifTrue:[
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   430
        fileName := Project currentProjectDirectory , fileName.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   431
    ].
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
    self withWaitCursorDo:[
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   434
        "
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   435
         if file exists, save original in a .sav file
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   436
        "
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   437
        fileName asFilename exists ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   438
            self busyLabel:'saving existing %1' with:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   439
            fileName asFilename copyTo:(fileName , '.sav')
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   440
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   441
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   442
        aStream := FileStream newFileNamed:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   443
        aStream isNil ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   444
            self warn:'cannot create: %1' with:fileName
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   445
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   446
            self busyLabel:'writing: %1' with:fileName.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   447
            self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   448
                aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   449
                    self busyLabel:'writing: %1' with:fileName.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   450
                    aClass fileOutOn:aStream.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   451
                ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   452
            ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   453
            aStream close.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   454
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   455
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   456
    self normalLabel.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   457
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   458
    "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
   459
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   460
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   461
classCategoryFileOutBinaryEach
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   462
    "fileOut each class in the current category as binary bytecode."
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   463
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   464
    |mode|
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   465
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   466
    (currentClassCategory startsWith:'*') ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   467
        self warn:(resources string:'try a real category').
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   468
        ^ self
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   469
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   470
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   471
    mode := Dialog choose:(resources string:'save including sources ?')
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   472
                   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
   473
                   values:#(nil #discard #reference #keep)
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   474
                   default:#keep.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   475
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   476
    mode isNil ifTrue:[^ self].
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   477
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   478
    self withWaitCursorDo:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   479
        self allClassesInCategory:currentClassCategory do:[:aClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   480
            aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   481
                self busyLabel:'saving binary of: %1' with:aClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   482
                Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   483
                    self warn:'cannot create: %1' with:ex parameter.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   484
                    ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   485
                ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   486
                    aClass binaryFileOutWithSourceMode:mode.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   487
                ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   488
            ]
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   489
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   490
        self normalLabel.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   491
    ]
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   492
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   493
    "Created: 25.1.1996 / 17:27:45 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   494
    "Modified: 20.12.1996 / 22:35:54 / cg"
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   495
!
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   496
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   497
classCategoryFileOutEach
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   498
    (currentClassCategory startsWith:'*') ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   499
        self warn:(resources string:'try a real category').
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   500
        ^ self
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   501
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   502
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   503
    self withWaitCursorDo:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   504
        self allClassesInCategory:currentClassCategory do:[:aClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   505
            aClass isPrivate ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   506
                self busyLabel:'saving: %1' with:aClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   507
                Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   508
                    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
   509
                    ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   510
                ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   511
                    aClass fileOut
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   512
                ]
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   513
            ]
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   514
        ].
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
   515
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   516
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   517
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   518
    "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
   519
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   520
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   521
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
   522
    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
   523
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
    "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
   525
!
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   526
337a32f942da merged code for open-for-class and find-class; (and offer both options in the box)
Claus Gittinger <cg@exept.de>
parents: 587
diff changeset
   527
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
   528
    "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
   529
     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
   530
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
   531
    |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
   532
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
   533
    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
   534
    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
   535
        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
   536
        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
   537
        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
   538
    ] 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
   539
        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
   540
        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
   541
        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
   542
    ].
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
    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
   544
    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
   545
    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
   546
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
   547
    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
   548
       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
   549
       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
   550
       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
   551
    ].
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
   552
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   553
    box entryCompletionBlock:[:contents |
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   554
        |s what m|
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   555
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   556
        s := contents withoutSpaces.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   557
        what := Smalltalk classnameCompletion:s.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   558
        box contents:what first.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   559
        (what at:2) size ~~ 1 ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   560
            self beep
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   561
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   562
    ].
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
   563
    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
   564
                        |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
   565
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
   566
                        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
   567
                            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
   568
                        ] 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
   569
                            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
   570
                        ].
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
   571
                        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
   572
                ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   573
    box showAtPointer
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   574
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
   575
    "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
   576
    "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
   577
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   578
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   579
classCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   580
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   581
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   582
    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
   583
    box entryCompletionBlock:[:contents |
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   584
        |s what m|
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   585
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   586
        s := contents withoutSpaces.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   587
        box topView withWaitCursorDo:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   588
            what := Smalltalk selectorCompletion:s.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   589
            box list:(what at:2).
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   590
            box contents:what first.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   591
            (what at:2) size ~~ 1 ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   592
                self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   593
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   594
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   595
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   596
    box action:[:aString | self switchToAnyMethod:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   597
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   598
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   599
    "Modified: 30.8.1995 / 22:49:49 / claus"
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
   600
    "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
   601
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   602
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   603
classCategoryMenu
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   604
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   605
    <resource: #keyboard ( #Find ) >
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
   606
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   607
    |specialMenu m labels selectors shorties|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   608
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   609
    currentClassCategory notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   610
        labels :=  #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   611
                        'fileOut each binary ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   612
                        '-'
714
3caae72f99d2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 712
diff changeset
   613
                        'repository history ...'
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   614
                        'validate class revisions'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   615
                        '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   616
                        'checkin each ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   617
                    ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   618
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   619
                        classCategoryFileOutBinaryEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   620
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   621
                        classCategoryRepositoryHistory
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   622
                        classCategoryValidateClassRevisions
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   623
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   624
                        classCategoryCheckinEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   625
                     ).
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   626
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   627
        labels :=  #(
714
3caae72f99d2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 712
diff changeset
   628
                        'repository history ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   629
                    ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   630
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   631
                        classCategoryRepositoryHistory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   632
                     ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   633
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   634
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   635
    specialMenu := PopUpMenu 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   636
                        labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   637
                        selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   638
                        receiver:self.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   639
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   640
    Smalltalk sourceCodeManager isNil ifTrue:[
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   641
        specialMenu disableAll:#(classCategoryRepositoryHistory  
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   642
                                 classCategoryCheckinEach
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   643
                                 classCategoryValidateClassRevisions).
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   644
    ].
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
   645
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   646
    device ctrlDown ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   647
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   648
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   649
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   650
    currentClassCategory isNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   651
        labels := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   652
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   653
"/                    '-'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   654
                    'clone'
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   655
                    'open for class ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   656
                    'spawn full class'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   657
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   658
                    'update'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   659
                    'find class ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   660
                    'find method ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   661
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   662
                    'new class category ...'
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   663
                    '='
812
17980094b4a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 811
diff changeset
   664
                    'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   665
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   666
        selectors := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   667
"/                    namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   668
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   669
                    classCategoryClone
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   670
                    classCategoryOpenInClass
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   671
                    classCategorySpawnFullClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   672
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   673
                    classCategoryUpdate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   674
                    classCategoryFindClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   675
                    classCategoryFindMethod
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   676
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   677
                    classCategoryNewCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   678
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   679
                    otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   680
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   681
        shorties := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   682
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   683
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   684
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   685
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   686
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   687
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   688
                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   689
                    Find
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   690
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   691
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   692
                    Cmdn
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   693
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   694
                    #'Ctrl'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   695
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   696
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   697
        labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   698
                    'fileOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   699
                    'fileOut each'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   700
                    'printOut' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   701
                    'printOut protocol'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   702
                    '-'
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   703
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   704
"/                    '-'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   705
                    'clone'
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   706
                    'open for class ...'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   707
                    'SPAWN_CATEGORY'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   708
                    'spawn full class'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   709
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   710
                    'update'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   711
                    'find class ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   712
                    'find method ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   713
                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   714
                    'new class category ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   715
                    'rename ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   716
                    'remove'
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   717
                    '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   718
                    'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   719
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   720
        selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   721
                   classCategoryFileOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   722
                   classCategoryFileOutEach
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   723
                   classCategoryPrintOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   724
                   classCategoryPrintOutProtocol
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   725
                   nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   726
"/                   namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   727
"/                   nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   728
                   classCategoryClone
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   729
                    classCategoryOpenInClass
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   730
                   classCategorySpawn
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   731
                   classCategorySpawnFullClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   732
                   nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   733
                   classCategoryUpdate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   734
                   classCategoryFindClass
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   735
                   classCategoryFindMethod
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
                   classCategoryNewCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   738
                   classCategoryRename
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   739
                   classCategoryRemove
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   740
                   nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   741
                   otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   742
                   ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   743
        shorties := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   744
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   745
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   746
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   747
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   748
                    nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   749
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
   750
"/                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   751
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   752
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   753
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   754
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   755
                    nil
506
1f3cf6d5d343 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 501
diff changeset
   756
                    nil
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   757
                    Find
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   758
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   759
                    nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
   760
                    Cmdn
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   761
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   762
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   763
                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   764
                    #'Ctrl'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   765
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   766
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   767
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   768
    m := PopUpMenu 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   769
                labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   770
                selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   771
                accelerators:shorties.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
   772
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   773
    m subMenuAt:#otherMenu put:specialMenu.
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
   774
    ^ m
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
    "Created: 14.9.1995 / 10:50:17 / claus"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   777
    "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
   778
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   779
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   780
classCategoryNewCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   781
    |box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   782
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   783
    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
   784
    box action:[:aString |
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   785
        |categories|
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   786
        categories := classCategoryListView list.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   787
        (categories includes:aString) ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   788
            categories add:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   789
            categories sort.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   790
            classCategoryListView setContents:categories.
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   791
        ].
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   792
        currentClassCategory := aString.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   793
        classCategoryListView setSelectElement:aString.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   794
        self switchToClass:nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   795
        actualClass := acceptClass := nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   796
        self classCategorySelectionChanged
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
   797
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   798
    box showAtPointer
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   799
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   800
    "Modified: 26.5.1996 / 15:02:33 / cg"
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   801
    "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
   802
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   803
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   804
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
   805
    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
   806
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
   807
    "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
   808
!
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
   809
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   810
classCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   811
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   812
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   813
    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   814
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   815
        aClass printOutOn:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   816
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   817
    ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   818
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   819
    "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
   820
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   821
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   822
classCategoryPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   823
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   824
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   825
    Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   826
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   827
        aClass printOutProtocolOn:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   828
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   829
    ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   830
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   831
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   832
classCategoryRemove
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   833
    "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
   834
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
   835
    |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
   836
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   837
    self checkClassCategorySelected ifFalse:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   838
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   839
    classesToRemove := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   840
    Smalltalk allBehaviorsDo:[:aClass |
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   841
        aClass category = currentClassCategory ifTrue:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   842
            classesToRemove add:aClass
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   843
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   844
    ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   845
    subclassesRemoved := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   846
    classesToRemove do:[:aClass |
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   847
        aClass allSubclassesDo:[:aSubclass |
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   848
            (classesToRemove includes:aSubclass) ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   849
                (subclassesRemoved includes:aSubclass) ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   850
                    subclassesRemoved add:aSubclass
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   851
                ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   852
            ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   853
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   854
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   855
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   856
    count := classesToRemove size.
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   857
    t := resources string:'remove "%1" ?' with:currentClassCategory.
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
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   860
       count == 1 ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   861
           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
   862
       ] ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   863
           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
   864
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   865
       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
   866
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   867
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   868
    count := subclassesRemoved size.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   869
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   870
       count == 1 ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   871
           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
   872
       ] ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   873
           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
   874
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   875
       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
   876
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   877
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   878
    t := t withCRs.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   879
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   880
    box := YesNoBox 
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   881
               title:t
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   882
               yesText:(resources at:'remove')
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   883
               noText:(resources at:'abort').
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   884
    box label:(resources at:'remove category').
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   885
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   886
    box confirm ifTrue:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   887
        "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
   888
        |keep idx|
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   889
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   890
        keep := false.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   891
        (subclassesRemoved asOrderedCollection
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   892
         , classesToRemove asOrderedCollection) do:[:aClassToRemove |
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
            (CheckForInstancesWhenRemovingClasses not
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   895
             or:[aClassToRemove hasInstances not
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   896
             or:[self confirm:(aClassToRemove name , ' has instances - remove anyway ?')]] 
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   897
            ) ifTrue:[   
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   898
                Smalltalk removeClass:aClassToRemove
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   899
            ] ifFalse:[
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   900
                keep := true.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   901
            ]
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   902
        ].
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   903
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   904
        self updateClassCategoryList.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   905
        (classCategoryListView list includes:currentClassCategory) ifFalse:[
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   906
            currentClassCategory := nil.
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   907
        ].
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   908
        self classCategorySelectionChanged.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   909
        
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   910
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   911
        self switchToClass:nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   912
"/        keep ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   913
"/            idx := classCategoryListView list indexOf:currentClassCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   914
"/            currentClassCategory := nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   915
"/            idx ~= 0 ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   916
"/                classCategoryListView removeIndex:idx.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   917
"/            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
   918
"/        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   919
    ]
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   920
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
   921
    "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
   922
    "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
   923
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   924
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   925
classCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   926
    "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
   927
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   928
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   929
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   930
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   931
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   932
    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
   933
    box initialText:currentClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   934
    box action:[:aString | self renameCurrentClassCategoryTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   935
    box showAtPointer
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   938
classCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   939
    "create a new SystemBrowser browsing current classCategory"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   940
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   941
    currentClassCategory notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   942
        self withWaitCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   943
            SystemBrowser browseClassCategory:currentClassCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   944
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   945
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   946
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   947
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   948
classCategorySpawnFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   949
    "create a new SystemBrowser browsing full class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   950
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   951
    |newBrowser|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   952
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   953
    self withWaitCursorDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   954
        newBrowser := SystemBrowser browseFullClasses
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   955
" "
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   956
        .
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   957
        currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   958
            newBrowser switchToClassNamed:(currentClass name)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   959
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   960
" "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   961
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   962
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   963
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   964
classCategoryUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   965
    "update class category list and dependants"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   966
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   967
    |oldClassName oldMethodCategory|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   968
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   969
    classCategoryListView notNil ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   970
        self setListOfNamespaces.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   971
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   972
        currentClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   973
            oldClassName := currentClass name.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   974
            (oldClassName endsWith:'-old') ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   975
                oldClassName := oldClassName copyWithoutLast:4 "copyTo:(oldClassName size - 4)"
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   976
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   977
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   978
        oldMethodCategory := currentMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   979
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   980
        classCategoryListView setContents:(self listOfAllClassCategories).
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   981
        currentClassCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   982
            classCategoryListView setSelectElement:currentClassCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   983
            self classCategorySelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   984
            oldClassName notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   985
                classListView setSelectElement:oldClassName.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   986
                self switchToClass:(Smalltalk at:oldClassName asSymbol).
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   987
                self classSelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   988
                oldMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   989
                    methodCategoryListView setSelectElement:oldMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   990
                    currentMethodCategory := oldMethodCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   991
                    self methodCategorySelectionChanged
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   992
                ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   993
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   994
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   995
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
   996
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
   997
    "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
   998
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   999
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1000
!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
  1001
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1002
classCategoryCheckinEach
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1003
    (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
  1004
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1005
    self withWaitCursorDo:[
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
  1006
        |logMessage classes|
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1007
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  1008
        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
  1009
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1010
        logMessage notNil ifTrue:[
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
  1011
            (currentClassCategory = '* all *'
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
  1012
            or:[currentClassCategory = '* hierarchy *']) ifTrue:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1013
                classes := self allClasses
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
  1014
            ] ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1015
                classes := self allClassesInCategory:currentClassCategory.
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
  1016
            ].
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
  1017
            lastSourceLogMessage := logMessage.
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
  1018
            classes do:[:aClass |
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1019
                self busyLabel:'checking in %1' with:aClass name.
466
Claus Gittinger <cg@exept.de>
parents: 465
diff changeset
  1020
                "/ 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
  1021
                InformationSignal handle:[:ex |
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  1022
                    Transcript showCR:ex errorString
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1023
                ] do:[
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1024
                    self classCheckin:aClass withLog:logMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1025
"/                    (aClass sourceCodeManager) 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1026
"/                        checkinClass:aClass 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1027
"/                        logMessage:logMessage.
465
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1028
                ].
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1029
                self normalLabel.
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1030
            ]
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1031
        ].
42f0224ab165 no 'nothing changed ..' messages from checkin-each
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
  1032
        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
  1033
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1034
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1035
    "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
  1036
    "Modified: 15.6.1996 / 00:25:58 / stefan"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1037
    "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
  1038
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1039
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1040
classCategoryRepositoryHistory
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1041
    (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
  1042
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1043
    self withWaitCursorDo:[
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1044
        |timeGoal aStream box y component timeGoalListPop|
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1045
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1046
        box := Dialog new.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1047
        (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
  1048
        box addVerticalSpace:20.
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
        timeGoal := 'yesterday' asValue. 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1051
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1052
        y := box yPosition.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1053
        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
  1054
        component width:0.5; adjust:#right; borderWidth:0.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1055
        box yPosition:y.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1056
        timeGoalListPop := box addComboBoxOn:timeGoal tabable:true.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1057
        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
  1058
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1059
        timeGoalListPop list:#('yesterday'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1060
                               'a week ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1061
                               'a month ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1062
                               'a year ago'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1063
                               'all'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1064
                              ).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1065
        box addAbortButton; addOkButton.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1066
        box open.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1067
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1068
        box accepted ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1069
            timeGoal := timeGoal value.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1070
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1071
"/        timeGoal := Dialog 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1072
"/                         request:'list changed repository containers since (mm/dd):
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1073
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1074
"/You can also specify the date as 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1075
"/''yesterday'', ''a week ago'' or ''a month ago''
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1076
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1077
"/'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1078
"/                         initialAnswer:'yesterday'  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1079
"/                         onCancel:nil.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1080
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1081
"/        timeGoal notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1082
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1083
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1084
            self busyLabel:'extracting history ...' with:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1085
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1086
            aStream := WriteStream on:(String new:200).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1087
            Processor activeProcess withLowerPriorityDo:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1088
                SourceCodeManager notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1089
                    SourceCodeManager
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1090
                        writeHistoryLogSince:timeGoal
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1091
                        to:aStream.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1092
                ] ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1093
                    aStream nextPutLine:'no history available (no SourceCodeManagement installed)'
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1094
                ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1095
            ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1096
            codeView contents:(aStream contents).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1097
            codeView modified:false.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1098
            codeView acceptAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1099
            codeView explainAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1100
            methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1101
                methodListView setSelection:nil
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1102
            ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1103
            aspect := nil.      
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1104
            self normalLabel
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  1105
        ].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1106
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1107
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1108
    "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
  1109
    "Modified: 11.9.1996 / 14:02:49 / cg"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1110
!
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1111
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1112
classCategoryValidateClassRevisions
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1113
    "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
  1114
     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
  1115
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1116
    self withWaitCursorDo:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1117
        |logMessage classes repVersion clsVersion binVersion|
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
        (currentClassCategory = '* all *'
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1120
        or:[currentClassCategory = '* hierarchy *']) ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1121
            classes := Smalltalk allClasses
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1122
        ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1123
            classes := Smalltalk allClassesInCategory:currentClassCategory.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1124
        ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1125
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1126
        classes do:[:aClass |
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1127
            aClass isLoaded ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1128
                self busyLabel:'validating %1 ...' with:aClass name.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1129
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1130
                repVersion := aClass sourceCodeManager newestRevisionOf:aClass.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1131
                clsVersion := aClass revision.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1132
                binVersion := aClass binaryRevision.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1133
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1134
                clsVersion ~= repVersion ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1135
                     Transcript showCR:(aClass name , ' is not up-to-date.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1136
                ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1137
                    clsVersion ~= binVersion ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1138
                        binVersion notNil ifTrue:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1139
                             Transcript showCR:(aClass name , ' should to be recompiled.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1140
                        ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1141
                    ] ifFalse:[
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1142
"/                         Transcript showCR:(aClass name , ' is up-to-date.').
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1143
                    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1144
                ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1145
            ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1146
        ].
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1147
        self normalLabel.
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1148
    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1149
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1150
    "Modified: 15.6.1996 / 00:25:58 / stefan"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1151
    "Created: 29.10.1996 / 13:21:08 / cg"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1152
    "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
  1153
! !
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1154
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1155
!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
  1156
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1157
changeNameSpaceTo:nsName
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1158
    |n selectedClass str|
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1159
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1160
    nsName = '* all *' ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1161
        currentNamespace := nsName.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1162
    ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1163
        n := Smalltalk at:nsName asSymbol.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1164
        n isNamespace ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1165
            currentNamespace := n.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1166
        ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1167
            ^ self
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1168
        ]
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1169
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1170
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1171
    selectedClass := actualClass.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1172
    currentClass := actualClass := nil.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1173
    self classCategoryUpdate.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1174
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1175
    selectedClass notNil ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1176
        (currentNamespace = '* all *'
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1177
        or:[currentNamespace ~= selectedClass nameSpace]) ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1178
            str := selectedClass name
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1179
        ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1180
            str := selectedClass nameWithoutPrefix
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1181
        ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1182
896
d32cae7d496c deselect if currentClass is not found after a nameSpace change
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
  1183
        self switchToClassNamed:str.
d32cae7d496c deselect if currentClass is not found after a nameSpace change
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
  1184
        classListView hasSelection ifFalse:[
d32cae7d496c deselect if currentClass is not found after a nameSpace change
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
  1185
            self classCategorySelectionChanged.
d32cae7d496c deselect if currentClass is not found after a nameSpace change
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
  1186
        ]
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1187
    ]
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1188
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1189
    "Created: 3.1.1997 / 11:11:13 / cg"
896
d32cae7d496c deselect if currentClass is not found after a nameSpace change
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
  1190
    "Modified: 3.1.1997 / 17:27:54 / cg"
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1191
!
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1192
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1193
checkClassCategorySelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1194
    currentClassCategory isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1195
        self warn:'select a class category first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1196
        ^ false
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
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1199
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1200
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1201
classCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1202
    "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
  1203
     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
  1204
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1205
    |newCategory oldClass oldName classIndex list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1206
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1207
    newCategory := classCategoryListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1208
    (newCategory startsWith:'*') ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1209
        "etiher all or hierarchy;
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1210
         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
  1211
        oldClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1212
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1213
    currentClassCategory := newCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1214
    oldClass isNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1215
        self classCategorySelectionChanged
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1216
    ] ifFalse:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1217
        oldName := oldClass name.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1218
        self withWaitCursorDo:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1219
            self updateClassList
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1220
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1221
        "stupid - search for class name in (indented) list"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1222
        list := classListView list.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1223
        list notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1224
            classIndex := list findFirst:[:elem | elem endsWith:oldName].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1225
        ] ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1226
            classIndex := 0
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1227
        ].
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1228
        classIndex ~~ 0 ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1229
            classListView setSelection:classIndex.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1230
            self switchToClass:(Smalltalk at:(oldName asSymbol))
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1231
        ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1232
            self normalLabel.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1233
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1234
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1235
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1236
    "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
  1237
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1238
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1239
classCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1240
    "class category has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1241
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1242
    self withWaitCursorDo:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1243
        self switchToClass:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1244
        aspect := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1245
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1246
        actualClass := acceptClass := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1247
        currentMethodCategory := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1248
        currentMethod := currentSelector := nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1249
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1250
        self updateClassList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1251
        self updateMethodCategoryList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1252
        self updateMethodList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1253
        self updateCodeView.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1254
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1255
        codeView explainAction:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1256
        codeView acceptAction:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1257
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1258
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1259
    "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
  1260
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1261
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1262
listOfAllClassCategories
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1263
    "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
  1264
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1265
    |newList cat|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1266
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1267
    newList := Set new.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1268
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1269
    (self listOfNamespaces) do:[:aNamespace |
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1270
        aNamespace allBehaviorsDo:[:aClass |
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1271
            aClass isMeta ifFalse:[
848
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1272
                (aClass isNamespace not 
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1273
                or:[aClass == Namespace 
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  1274
                or:[aClass == Smalltalk]]) ifTrue:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1275
                    aClass nameSpace == aNamespace ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1276
                        cat := aClass category.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1277
                        cat isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1278
                            cat := '* no category *'
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1279
                        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1280
                        cat ~= 'obsolete' ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1281
                            newList add:cat
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1282
                        ]
841
4d803d693dfa hide namespaces in class & category lists
Claus Gittinger <cg@exept.de>
parents: 839
diff changeset
  1283
                    ]
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1284
                ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1285
            ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1286
        ]
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1287
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1288
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1289
    newList notEmpty ifTrue:[
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1290
        newList add:'* all *'; add:'* hierarchy *'.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1291
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1292
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1293
    ^ newList asOrderedCollection sort.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1294
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1295
    "Modified: 5.1.1997 / 00:15:08 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1296
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1297
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1298
listOfAllNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1299
    "return a list of all namespaces"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1300
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1301
    allNamespaces isNil ifTrue:[
892
70512e323623 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  1302
        allNamespaces := Namespace allNamespaces.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1303
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1304
    ^ allNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1305
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1306
    "Created: 20.12.1996 / 19:18:03 / cg"
892
70512e323623 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
  1307
    "Modified: 2.1.1997 / 20:18:43 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1308
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1309
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1310
listOfNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1311
    "return a list of considered namespaces"
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1312
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1313
    currentNamespace isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1314
        ^ Array with:Smalltalk
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1315
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1316
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1317
    currentNamespace = '* all *' ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1318
        ^ self listOfAllNamespaces
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1319
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1320
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1321
    ^ Array with:currentNamespace
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1322
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1323
    "Created: 26.10.1996 / 11:25:39 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1324
    "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
  1325
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1326
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1327
renameCurrentClassCategoryTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1328
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1329
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1330
    |any categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1331
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1332
    currentClassCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1333
        any := false.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1334
        Smalltalk allBehaviorsDo:[:aClass |
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1335
            aClass category = currentClassCategory ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1336
                aClass category:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1337
                any := true
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1338
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1339
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1340
        any ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1341
            categories := classCategoryListView list.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1342
            categories remove:currentClassCategory.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1343
            categories add:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1344
            categories sort.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1345
            classCategoryListView setContents:categories.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1346
            currentClassCategory := aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1347
            classCategoryListView setSelectElement:aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1348
        ] ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1349
            currentClassCategory := aString.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1350
            self updateClassCategoryList.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1351
            self updateClassListWithScroll:false
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1352
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1353
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1354
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1355
    "Modified: 26.5.1996 / 15:02:55 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1356
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1357
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1358
switchToAnyMethod:aSelectorString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1359
    "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
  1360
     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
  1361
     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
  1362
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1363
    |classes sel box theClassName|
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
    classes := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1366
    aSelectorString knownAsSymbol ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1367
        sel := aSelectorString asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1368
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1369
        Smalltalk allClassesDo:[:aClass |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1370
            (aClass includesSelector:sel) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1371
                classes add:aClass.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1372
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1373
            (aClass class includesSelector:sel) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1374
                classes add:aClass class.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1375
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1376
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1377
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1378
    classes size == 0 ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1379
        SystemBrowser showNoneFound.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1380
        ^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1381
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1382
    classes size > 1 ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1383
        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
  1384
        box okText:(resources string:'show').
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1385
        box list:(classes collect:[:aClass | aClass name]) asSortedCollection.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1386
        box action:[:aString | theClassName := aString].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1387
        box entryCompletionBlock:[:contents |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1388
            |s l what m|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1389
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1390
            s := contents withoutSpaces.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1391
            l := classes select:[:cls | cls name startsWith:s].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1392
            l size > 0 ifTrue:[    
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1393
                box list:(l collect:[:aClass | aClass name]) asSortedCollection.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1394
                box contents:l first name.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1395
                l size ~~ 1 ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  1396
                    self beep
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1397
                ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1398
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1399
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1400
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1401
    ] ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1402
        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
  1403
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1404
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1405
    theClassName notNil ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1406
        self switchToClassNamed:theClassName. 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1407
        self updateMethodCategoryList.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  1408
        self switchToMethodNamed:aSelectorString.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1409
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1410
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1411
    "Modified: 1.9.1995 / 01:39:58 / claus"
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  1412
    "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
  1413
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1414
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1415
updateClassCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1416
    self updateClassCategoryListWithScroll:true
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1417
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1418
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1419
updateClassCategoryListWithScroll:scroll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1420
    |oldClassCategory oldClass oldMethodCategory oldMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1421
     oldSelector newCategoryList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1422
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1423
    classMethodListView notNil ifTrue:[ ^ self ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1424
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1425
    oldClassCategory := currentClassCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1426
    oldClass := currentClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1427
    oldMethodCategory := currentMethodCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1428
    oldMethod := currentMethod.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1429
    oldMethod notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1430
        oldSelector := currentSelector
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1431
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1432
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1433
    classCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1434
        newCategoryList := self listOfAllClassCategories.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1435
        newCategoryList = classCategoryListView list ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1436
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1437
                classCategoryListView contents:newCategoryList
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1438
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1439
                classCategoryListView setContents:newCategoryList
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1440
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1441
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1442
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1443
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1444
    oldClassCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1445
        classCategoryListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1446
            classCategoryListView setSelectElement:oldClassCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1447
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1448
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1449
    classListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1450
        oldClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1451
            classListView setSelectElement:(oldClass name)
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1452
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1453
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1454
    oldMethodCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1455
        methodCategoryListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1456
            methodCategoryListView setSelectElement:oldMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1457
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1458
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1459
    oldSelector notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1460
        methodListView notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1461
            methodListView setSelectElement:oldSelector
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1462
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1463
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1464
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1465
    "Modified: 26.5.1996 / 15:04:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1466
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1467
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1468
!BrowserView methodsFor:'class list menu'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1469
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1470
classClassInstVars
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1471
    "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
  1472
     for a class-instvar-definition change"
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1473
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1474
    self doClassMenu:[:currentClass |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1475
        |s|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1476
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1477
        s := WriteStream on:(String new).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1478
        currentClass fileOutClassInstVarDefinitionOn:s.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1479
        codeView contents:(s contents).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1480
        codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1481
        codeView acceptAction:[:theCode |
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1482
            codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1483
            Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1484
                Compiler evaluate:theCode asString notifying:codeView compile:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1485
                codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1486
                self normalLabel.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1487
                self updateClassList.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1488
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1489
            codeView cursor:Cursor normal.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1490
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1491
        codeView explainAction:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1492
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1493
            methodListView setSelection:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1494
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1495
        aspect := #classInstVars.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1496
        self normalLabel
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  1497
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1498
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1499
    "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
  1500
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1501
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1502
classComment
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1503
    "show the classes comment in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1504
     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
  1505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1506
    self classShowFrom:#comment 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1507
                   set:#comment: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1508
                aspect:#comment 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1509
               default:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1510
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1511
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1512
classDefinition
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1513
    "show class definition in codeView and setup accept-action for
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1514
     a class-definition change.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1515
     Extract documentation either from a documentation method or
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1516
     from the comment - not a biggy, but beginners will like
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1517
     it when exploring the system."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1518
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1519
    self doClassMenu:[:currentClass |
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1520
        |m s aStream isComment|
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
        aStream := WriteStream on:(String new:200).
906
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1523
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1524
        "/
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1525
        "/ here, show it with a nameSpace pragma
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1526
        "/ and prefer short names.
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1527
        "/
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1528
        currentClass 
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1529
            basicFileOutDefinitionOn:aStream 
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1530
            withNameSpace:true.
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1531
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1532
        currentClass isLoaded ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1533
            "
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1534
             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
  1535
            "
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1536
            m := currentClass class compiledMethodAt:#documentation.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1537
            m notNil ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1538
                s := m comment.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1539
                isComment := false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1540
            ] ifFalse:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1541
                "try comment"
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1542
                s := currentClass comment.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1543
                s notNil ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1544
                    s isEmpty ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1545
                        s := nil
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1546
                    ] ifFalse:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1547
                        (s includes:$") ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1548
                            s := s copy replaceAll:$" by:$'.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1549
                        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1550
                        isComment := true
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1551
                    ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1552
                ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1553
            ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1554
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1555
        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
  1556
        s isNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1557
            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
  1558
        ] ifFalse:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1559
            aStream nextPut:$" ; cr; nextPutLine:' Documentation:'.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1560
            aStream cr; nextPutLine:s; cr.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1561
            aStream nextPutLine:' Notice: '.
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1562
            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
  1563
            aStream nextPutLine:(isComment ifTrue:['comment.'] ifFalse:['documentation method.']).
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  1564
            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
  1565
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1566
        aStream nextPut:$".
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1567
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1568
        codeView contents:(aStream contents).
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1569
        codeView modified:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1570
        codeView acceptAction:[:theCode |
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1571
            codeView cursor:Cursor execute.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1572
            Object abortSignal catch:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1573
                (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
  1574
                isBehavior ifTrue:[
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1575
                    codeView modified:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1576
                    self classCategoryUpdate.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1577
                    self updateClassListWithScroll:false.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1578
                ]
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1579
            ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1580
            codeView cursor:Cursor normal.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1581
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1582
        codeView explainAction:nil.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1583
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1584
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1585
            methodListView setSelection:nil
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1586
        ].
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1587
        aspect := #definition.
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1588
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1589
    ]
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  1590
906
9d04ccc5ac6d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 905
diff changeset
  1591
    "Modified: 4.1.1997 / 21:10:14 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1592
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1593
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1594
classDocumentation
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1595
    "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
  1596
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1597
    self doClassMenu:[:currentClass |
888
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1598
        |v|
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  1599
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1600
        Autoload autoloadFailedSignal handle:[:ex |
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1601
            self warn:'autoload failed.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1602
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1603
Check your source directory and/or 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1604
the abbreviation file for the classes (correct) shortened name.'.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1605
            ex return.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1606
        ] do:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1607
            v := HTMLDocumentView
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1608
                    openFullOnText:(HTMLDocGenerator htmlDocOf:currentClass) 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1609
                    inDirectory:(Smalltalk getSystemFileName:'doc/online/english').
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1610
            v nameSpaceForExecution:(currentClass nameSpace).
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1611
        ]
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1612
    ]
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1613
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1614
    "Created: 18.5.1996 / 12:12:20 / cg"
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1615
    "Modified: 3.1.1997 / 11:54:07 / cg"
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1616
!
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1617
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1618
classFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1619
    "fileOut the current class.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1620
     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
  1621
     warn if any)"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1622
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1623
    self doClassMenu:[:currentClass |
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1624
        |msg|
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1625
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1626
        currentClass isPrivate ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1627
            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
  1628
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1629
            self busyLabel:'saving %1' with:currentClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1630
            Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1631
                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
  1632
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1633
                ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1634
            ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1635
                currentClass fileOut.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1636
            ].
369
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1637
        ].
0744c8b6cbf8 better warning (what happened)
ca
parents: 367
diff changeset
  1638
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1639
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1640
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1641
    "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
  1642
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1643
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1644
classFileOutBinary
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1645
    "fileOut the current class as binary bytecode."
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1646
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1647
    |mode|
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1648
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1649
    mode := Dialog choose:(resources string:'save including sources ?')
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1650
                   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
  1651
                   values:#(nil #discard #reference #keep)
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1652
                   default:#keep.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1653
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1654
    mode isNil ifTrue:[^ self].   "/ cancelled
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  1655
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1656
    self doClassMenu:[:currentClass |
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1657
        |msg|
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1658
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1659
        currentClass isPrivate ifTrue:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1660
            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
  1661
        ] ifFalse:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1662
            self busyLabel:'saving binary of %1' with:currentClass name.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1663
            Class fileOutErrorSignal handle:[:ex |
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1664
                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
  1665
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1666
                ex return.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1667
            ] do:[
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1668
                currentClass binaryFileOutWithSourceMode:mode.
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1669
            ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1670
        ].
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1671
        self normalLabel.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1672
    ]
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1673
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1674
    "Created: 24.1.1996 / 21:11:03 / cg"
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  1675
    "Modified: 14.10.1996 / 20:12:46 / cg"
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1676
!
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  1677
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1678
classHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1679
    "show current classes hierarchy in codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1680
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1681
    self doClassMenu:[:currentClass |
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1682
        |aStream|
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1683
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1684
        aStream := WriteStream on:(String new:200).
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1685
        actualClass printHierarchyOn:aStream.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1686
        codeView contents:(aStream contents).
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1687
        codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1688
        codeView acceptAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1689
        codeView explainAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1690
        methodListView notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1691
            methodListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1692
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1693
        aspect := #hierarchy. 
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1694
        self normalLabel
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1695
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1696
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1697
    "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
  1698
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1699
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1700
classInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1701
    "inspect the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1702
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1703
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1704
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1705
    currentClass inspect.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1706
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1707
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1708
classInstancesInspect
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1709
    "inspect the current classes instances"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1710
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1711
    self checkClassSelected ifFalse:[^ self].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1712
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1713
    currentClass allInstances inspect.
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1714
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1715
    "Created: 24.2.1996 / 16:12:14 / cg"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1716
!
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1717
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1718
classLoad
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1719
    "load an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1720
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  1721
    |nm nameShown|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1722
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1723
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1724
    nm := currentClass name.
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  1725
    nameShown := self displayedClassNameOf:currentClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1726
    Autoload autoloadFailedSignal handle:[:ex |
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1727
        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
  1728
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1729
Check your source directory for a file named %1.st and/or 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1730
the abbreviation file for its (correct) shortened name.') with:nm.
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1731
        ex return.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1732
    ] do:[
424
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1733
        currentClass autoload.
21ff3841f5a5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 422
diff changeset
  1734
        currentClass := actualClass := nil.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1735
        "/ reselect the current class
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1736
        showInstance ifFalse:[
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1737
            nameShown := nameShown , ' class'
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  1738
        ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  1739
        self switchToClassNamed:nameShown
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1740
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1741
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1742
    "Modified: 3.1.1997 / 11:54:14 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1743
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1744
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1745
classMenu
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1746
    "sent by  classListView to ask for the menu"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1747
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1748
    |specialMenu labels selectors shorties m newClassMenu spawnMenu|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1749
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1750
    currentClass isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1751
        labels :=  #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1752
                       'fileIn new from repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1753
                    ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1754
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1755
        selectors := #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1756
                       classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1757
                      ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1758
    ] ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1759
        labels :=  #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1760
                       'fileOut binary'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1761
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1762
                       'inspect class'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1763
                       'inspect instances'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1764
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1765
                       'primitive definitions'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1766
                       'primitive variables'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1767
                       'primitive functions'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1768
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1769
                       'source container ...'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1770
                       'remove source container ...'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1771
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1772
                       'revision info' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1773
                       'compare with repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1774
                       '-'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1775
                       'check into source repository'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1776
                       'fileIn from repository ...' 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1777
                    ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1778
        selectors := #(
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1779
                       classFileOutBinary
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1780
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1781
                       classInspect
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1782
                       classInstancesInspect
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1783
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1784
                       classPrimitiveDefinitions
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1785
                       classPrimitiveVariables
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1786
                       classPrimitiveFunctions
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1787
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1788
                       classModifyContainer
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1789
                       classRemoveContainer
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1790
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1791
                       classRevisionInfo
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  1792
                       classCompareWithRepository
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1793
                       nil
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1794
                       classCheckin
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1795
                       classLoadRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1796
                      ).
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1797
    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1798
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1799
    specialMenu := PopUpMenu
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1800
                        labels:(resources array:labels)
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1801
                        selectors:selectors
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1802
                        receiver:self.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1803
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1804
    currentClass notNil ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1805
        currentClass sourceCodeManager isNil ifTrue:[
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1806
            specialMenu disableAll:#(classModifyContainer classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1807
                                     classRevisionInfo 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1808
                                     classLoadRevision classCheckin 
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  1809
                                     classCompareWithRepository).
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1810
        ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1811
        currentClass isPrivate ifTrue:[
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1812
            specialMenu disableAll:#(
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1813
                                     classFileOutBinary
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1814
                                     classModifyContainer 
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1815
                                     classRemoveContainer
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1816
                                     classRevisionInfo 
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1817
                                     classLoadRevision classCheckin
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  1818
                                     classCompareWithRepository
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1819
                                     classPrimitiveDefinitions
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1820
                                     classPrimitiveVariables
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  1821
                                     classPrimitiveFunctions).
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1822
        ]
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1823
    ] ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1824
        SourceCodeManager isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1825
            specialMenu disableAll:#(classLoadNewRevision)
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  1826
        ]
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1827
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1828
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1829
    (currentClass notNil
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1830
    and:[currentClass isLoaded not]) ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1831
        specialMenu disableAll:#(
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1832
                                     classInstancesInspect
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1833
                                     classFileOutBinary
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1834
                                     classModifyContainer 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1835
                                     classRemoveContainer
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1836
                                     classRevisionInfo 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1837
                                     classLoadRevision 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1838
                                     classCheckin
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  1839
                                     classCompareWithRepository
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1840
                                     classPrimitiveDefinitions
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1841
                                     classPrimitiveVariables
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1842
                                     classPrimitiveFunctions).
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1843
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1844
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1845
    device ctrlDown ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1846
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1847
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1848
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1849
    currentClass isNil ifTrue:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1850
        labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1851
                       'new class'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1852
                     ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1853
        selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1854
                       classNewClass
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1855
                     ).
246
9f1583be2b81 ask class for its SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  1856
    ] ifFalse:[
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1857
        currentClass isLoaded ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1858
            labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1859
                           'definition'
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1860
                           'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1861
                           '-'
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1862
                           'class refs'
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1863
                           '-'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1864
                           'new class'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1865
                           '-'
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1866
                           'load'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1867
                         ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1868
            selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1869
                           classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1870
                           classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1871
                           nil
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1872
                           classRefs
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  1873
                           nil
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1874
                           classNewClass
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1875
                           nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1876
                           classLoad
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
        ] ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1879
            fullProtocol ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1880
                labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1881
                               'hierarchy' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1882
                               'definition' 
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1883
                               'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1884
                               'comment' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1885
                               'class instvars' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1886
                             ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1887
                selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1888
                               classHierarchy
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1889
                               classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1890
                               classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1891
                               classComment
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1892
                               classClassInstVars
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1893
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1894
            ] ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1895
                labels :=    #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1896
                               'fileOut'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1897
                               'printOut'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1898
                               'printOut protocol'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1899
                             " 'printOut full protocol' "
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1900
                               '-'
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1901
                               'spawn ...' 
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1902
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1903
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1904
                selectors := #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1905
                               classFileOut
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1906
                               classPrintOut
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1907
                               classPrintOutProtocol
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1908
                            "  classPrintOutFullProtocol "
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1909
                               nil
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1910
                               spawnMenu
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1911
                               nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1912
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1913
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1914
                spawnMenu := PopUpMenu 
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1915
                            labels:(resources array:#('class' 'full protocol' 'hierarchy' 'subclasses'))
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1916
                            selectors:#(classSpawn classSpawnFullProtocol classSpawnHierarchy classSpawnSubclasses).
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1917
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1918
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1919
                fullClass ifFalse:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1920
                    labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1921
                               'hierarchy' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1922
                               'definition' 
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1923
                               'documentation'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1924
                               'comment' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1925
                               'class instvars' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1926
               "/              'protocols' 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1927
                               '-'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1928
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1929
                    selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1930
                               classHierarchy
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1931
                               classDefinition
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  1932
                               classDocumentation
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1933
                               classComment
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1934
                               classClassInstVars
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1935
               "/              classProtocols 
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1936
                               nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1937
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1938
                ].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1939
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1940
                labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1941
                               'class refs'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1942
                               '-'
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1943
                               'new ...'
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1944
                              ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1945
                selectors := selectors , #(
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1946
                               classRefs
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1947
                               nil
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1948
                               newClassMenu
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1949
                              ).
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1950
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1951
                newClassMenu := PopUpMenu 
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1952
                            labels:(resources array:#('class' 'subclass' 'private class'))
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1953
                            selectors:#(classNewClass classNewSubclass classNewPrivateClass).
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1954
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1955
                labels := labels , #(
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1956
                               'rename ...'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1957
                               'remove'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1958
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1959
                selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1960
                               classRename
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1961
                               classRemove
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1962
                              ).
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  1963
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1964
                currentClass wasAutoloaded ifTrue:[
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1965
                    labels := labels , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1966
                               'unload'
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1967
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1968
                    selectors := selectors , #(
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1969
                               classUnload
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1970
                              ).
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1971
                ]
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1972
            ]
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1973
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1974
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1975
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1976
    shorties := (Array new:labels size) , #(nil #'Ctrl').
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1977
    (selectors includes:#classNewClass) ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1978
        shorties at:(selectors indexOf:#classNewClass) put:#Cmdn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1979
    ].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1980
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1981
    labels := labels , #(
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
  1982
                          '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1983
                          'others'
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1984
                        ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1985
    selectors := selectors , #(
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1986
                          nil
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1987
                          otherMenu
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1988
                        ).
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1989
    m := PopUpMenu 
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  1990
            labels:(resources array:labels)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1991
            selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1992
            accelerators:shorties.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1993
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1994
    newClassMenu notNil ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1995
        m subMenuAt:#newClassMenu put:newClassMenu.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1996
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1997
    spawnMenu notNil ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1998
        m subMenuAt:#spawnMenu put:spawnMenu.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1999
    ].
768
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  2000
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  2001
    (currentClass notNil
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  2002
    and:[currentClass isPrivate]) ifTrue:[
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  2003
        m disableAll:#(
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  2004
                       classFileOut
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  2005
                      )
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  2006
    ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  2007
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2008
    m subMenuAt:#otherMenu put:specialMenu.
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2009
    ^ m
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2010
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  2011
    "Modified: 4.1.1997 / 15:48:15 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2012
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2013
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2014
classNewClass
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2015
    "create a class-definition prototype in codeview"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2016
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2017
    |theClass cls|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2018
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2019
    theClass := Object.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2020
    currentClass notNil ifTrue:[
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2021
        (cls := currentClass superclass) notNil ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2022
            theClass := cls 
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2023
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2024
    ].
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2025
    self 
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2026
        classClassDefinitionTemplateFor:theClass 
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2027
        in:currentClassCategory 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2028
        namespace:false 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2029
        private:false.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2030
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2031
    aspect := nil.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2032
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2033
    "Modified: 4.1.1997 / 14:52:16 / cg"
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2034
!
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2035
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2036
classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2037
    "create a class-definition prototype in codeview"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2038
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2039
    self 
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2040
        classClassDefinitionTemplateFor:Object 
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2041
        in:nil 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2042
        namespace:false 
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2043
        private:true.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2044
    aspect := nil.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2045
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2046
    "Created: 11.10.1996 / 16:01:20 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2047
    "Modified: 4.1.1997 / 14:51:49 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2048
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2049
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2050
classNewSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2051
    "create a subclass-definition prototype in codeview"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2052
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2053
    self doClassMenu:[:currentClass |
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2054
        self classClassDefinitionTemplateFor:currentClass 
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2055
                                          in:(currentClass category)
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2056
                                          namespace:false
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2057
                                          private:false.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2058
        aspect := nil
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2059
    ]
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2060
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2061
    "Modified: 4.1.1997 / 14:51:44 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2062
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2063
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2064
classPrimitiveDefinitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2065
    "show the classes primitiveDefinition in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2066
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2067
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2068
    self classShowFrom:#primitiveDefinitionsString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2069
                   set:#primitiveDefinitions: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2070
                aspect:#primitiveDefinitions 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2071
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2072
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2073
/*
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2074
 * includes, defines, structure definitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2075
 * and typedefs come here.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2076
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2077
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2078
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2079
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2080
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2081
classPrimitiveFunctions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2082
    "show the classes primitiveFunctions in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2083
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2084
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2085
    self classShowFrom:#primitiveFunctionsString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2086
                   set:#primitiveFunctions: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2087
                aspect:#primitiveFunctions 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2088
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2089
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2090
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2091
 * any local C (helper) functions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2092
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2093
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2094
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2095
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2096
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2097
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2098
classPrimitiveVariables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2099
    "show the classes primitiveVariables in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2100
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2101
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2102
    self classShowFrom:#primitiveVariablesString 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2103
                   set:#primitiveVariables: 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2104
                aspect:#primitiveVariables 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2105
               default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2106
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2107
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2108
 * any local C variables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2109
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2110
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2111
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2112
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2113
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2114
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2115
classPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2116
    self classPrintOutWith:#printOutOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2117
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2118
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2119
classPrintOutFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2120
    self classPrintOutWith:#printOutFullProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2121
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2122
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2123
classPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2124
    self classPrintOutWith:#printOutProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2125
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2126
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2127
classPrintOutWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2128
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2129
        |printStream|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2130
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2131
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2132
        currentClass perform:aSelector with:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2133
        printStream close
152
d03618e99b3c show warnbox when autoload fails (instead of running into the debugger)
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
  2134
    ]
105
claus
parents: 98
diff changeset
  2135
!
claus
parents: 98
diff changeset
  2136
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2137
classProtocols
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2138
     ^ self
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2139
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2140
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2141
classRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2142
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2143
        self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2144
            SystemBrowser browseReferendsOf:currentClass name asSymbol
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2145
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2146
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2147
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2148
    "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
  2149
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2150
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2151
classRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2152
    "user requested remove of current class and all subclasses -
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2153
     count subclasses and let user confirm removal."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2154
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2155
    |count t box|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2156
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2157
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2158
        count := currentClass allSubclasses size.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2159
        t := 'remove %1'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2160
        count ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2161
           t := t , '\(with %2 subclass'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2162
           count ~~ 1 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2163
                t := t , 'es'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2164
           ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2165
           t := (t , ')') 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2166
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2167
        t := t , ' ?'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2168
        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
  2169
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2170
        box := YesNoBox 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2171
                   title:t
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2172
                   yesText:(resources at:'remove')
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2173
                   noText:(resources at:'abort').
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2174
        box confirm ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2175
            "after querying user - do really remove current class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2176
             and all subclasses
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2177
            "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2178
            self doClassMenu:[:currentClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2179
                |didRemove|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2180
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2181
                didRemove := false.
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
                "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2184
                 query ?
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2185
                "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2186
                currentClass allSubclassesDo:[:aSubClass |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2187
                    (CheckForInstancesWhenRemovingClasses not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2188
                    or:[aSubClass hasInstances not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2189
                    or:[self confirm:(aSubClass name , ' has instances - remove anyway ?')]])
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2190
                        ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2191
                            Smalltalk removeClass:aSubClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2192
                    ]
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
                (CheckForInstancesWhenRemovingClasses not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2195
                or:[currentClass hasInstances not
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2196
                or:[self confirm:(currentClass name , ' has instances - remove anyway ?')]])
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2197
                    ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2198
                        didRemove := true.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2199
                        Smalltalk removeClass:currentClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2200
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2201
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2202
                self switchToClass:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2203
                Smalltalk changed.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2204
                self updateClassList.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2205
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2206
                "if it was the last in its category, update class category list"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2207
"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2208
                classListView numberOfLines == 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2209
                    self updateClassCategoryListWithScroll:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2210
                ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2211
"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2212
                didRemove ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2213
                    methodCategoryListView notNil ifTrue:[methodCategoryListView contents:nil].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2214
                    methodListView notNil ifTrue:[methodListView contents:nil].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2215
                    codeView contents:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2216
                    codeView modified:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2217
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2218
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2219
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2220
    ]
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2221
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2222
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2223
classRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2224
    "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
  2225
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2226
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2227
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2228
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2229
    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
  2230
    box initialText:(currentClass name).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2231
    box action:[:aString | self renameCurrentClassTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2232
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2233
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2234
107
claus
parents: 106
diff changeset
  2235
classShowFrom:getSelector set:setSelector aspect:aspectSymbol default:default
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2236
    "common helper for comment, primitive-stuff etc.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2237
     show the string returned from the classes getSelector-method,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2238
     Set acceptaction to change it via setSelector."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2239
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2240
    self doClassMenu:[:currentClass |
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2241
        |text|
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2242
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2243
        text := currentClass perform:getSelector.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2244
        text isNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2245
            text := default
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2246
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2247
        codeView contents:text.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2248
        codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2249
        codeView acceptAction:[:theCode |
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2250
            Object abortSignal catch:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2251
                lockUpdates := true.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2252
                currentClass perform:setSelector with:theCode asString.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2253
                codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2254
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2255
            lockUpdates := false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2256
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2257
        codeView explainAction:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2258
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2259
        methodListView notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2260
            methodListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2261
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2262
        aspect := aspectSymbol.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2263
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2264
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2265
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2266
    "Modified: 25.5.1996 / 13:02:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2267
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2268
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2269
classSpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2270
    "create a new SystemBrowser browsing current class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2271
     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
  2272
     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
  2273
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2274
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2275
        |browser|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2276
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2277
        cls isMeta ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2278
            self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2279
                aNamespace allBehaviorsDo:[:aClass |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2280
                    aClass class == cls ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2281
                        browser := SystemBrowser browseClass:aClass.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2282
                        browser instanceProtocol:false.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2283
                        sel notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2284
                            browser switchToMethodNamed:sel
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2285
                        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2286
                        ^ self
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2287
                    ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2288
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2289
            ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2290
            self warn:'oops, no class for this metaclass'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2291
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2292
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2293
        browser := SystemBrowser browseClass:cls. 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2294
        cls hasMethods ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2295
            browser instanceProtocol:false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2296
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2297
        sel notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2298
            browser switchToMethodNamed:sel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2299
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2300
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2301
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2302
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2303
     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
  2304
     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
  2305
    "
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2306
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  2307
    "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
  2308
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2309
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2310
classSpawnFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2311
    "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
  2312
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2313
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2314
        SystemBrowser browseFullClassProtocol:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2315
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2316
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2317
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2318
classSpawnHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2319
    "create a new HierarchyBrowser browsing current class"
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
    self doClassMenuWithSelection:[:cls :sel |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2322
        SystemBrowser browseClassHierarchy:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2323
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2324
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2325
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2326
classSpawnSubclasses
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2327
    "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
  2328
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2329
    self doClassMenuWithSelection:[:cls :sel |
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2330
        |subs|
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2331
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2332
        subs := OrderedCollection new.
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  2333
        self classHierarchyOf:cls withAutoloaded:false do:[:aClass :lvl |
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2334
            subs add:(String new:lvl*2) , aClass name
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2335
        ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2336
"/        subs := cls allSubclasses.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2337
        (subs notNil and:[subs size ~~ 0]) ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2338
            SystemBrowser browseClasses:subs 
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2339
                                  title:('subclasses of ' , cls name)
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2340
                                   sort:false
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2341
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2342
    ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  2343
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  2344
    "Modified: 4.1.1997 / 13:35:55 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2345
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2346
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2347
classUnload
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2348
    "unload an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2349
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2350
    |nm|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2351
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2352
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2353
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2354
    currentClass unload.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2355
    self switchToClassNamed:nm
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2356
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2357
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2358
classUses
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2359
    "a powerful tool, when trying to learn more about where
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2360
     a class is used. This one searches all uses of a class,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2361
     and shows a list of uses - try it and like it"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2362
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2363
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2364
        self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2365
            SystemBrowser browseUsesOf:currentClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  2366
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2367
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2368
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2369
    "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
  2370
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2371
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2372
doClassMenuWithSelection:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2373
    "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
  2374
     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
  2375
     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
  2376
     current class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2377
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2378
    |string words clsName cls sel isMeta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2379
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2380
    string := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2381
    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
  2382
        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
  2383
            clsName := c.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2384
            sel := s.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2385
            isMeta := m.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2386
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2387
        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
  2388
            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
  2389
            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
  2390
            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
  2391
                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
  2392
                (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
  2393
                    isMeta := true.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2394
                    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
  2395
                ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2396
                    isMeta := false
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2397
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2398
                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
  2399
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2400
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2401
        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
  2402
            (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
  2403
                isMeta ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2404
                    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
  2405
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2406
                self withWaitCursorDo:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2407
                    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
  2408
                ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2409
                ^ self
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2410
            ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2411
                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
  2412
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2413
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2414
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2415
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2416
    classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  2417
        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
  2418
        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
  2419
            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
  2420
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2421
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2422
    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
  2423
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  2424
    "Modified: 17.6.1996 / 16:51:49 / stefan"
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  2425
    "Modified: 22.10.1996 / 17:02:11 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2426
! !
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2427
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2428
!BrowserView methodsFor:'class list source administration'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2429
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2430
classCheckin
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2431
    "check a class into the source repository"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2432
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2433
    currentClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2434
        self warn:'cannot checkin unloaded classes.'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2435
        ^ 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
  2436
    ].
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2437
    self doClassMenu:[:currentClass |
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2438
        self classCheckin:currentClass withLog:nil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2439
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2440
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2441
    "Created: 23.11.1995 / 11:41:38 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2442
    "Modified: 15.4.1996 / 17:07:07 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2443
!
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2444
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2445
classCheckin:aClass withLog:aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2446
    "check a class into the source repository"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2447
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2448
    |logMessage info mgr|
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2449
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2450
    aClass isLoaded ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2451
        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
  2452
        ^ self.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2453
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2454
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2455
    aLogMessage isNil ifTrue:[
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  2456
        logMessage := self getLogMessageFor:aClass name.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2457
        logMessage isNil ifTrue:[^ self].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2458
    ] ifFalse:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2459
        logMessage := aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2460
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2461
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2462
    mgr := (aClass sourceCodeManager).
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2463
    info := mgr sourceInfoOfClass:aClass.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2464
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2465
    (info isNil 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2466
    or:[(info at:#fileName ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2467
    or:[(info at:#module ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2468
    or:[(info at:#directory ifAbsent:nil) isNil]]]) ifTrue:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2469
        (self classCreateSourceContainerFor:aClass) ifFalse:[^ self]. 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2470
        ^ self.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2471
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2472
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2473
    lastSourceLogMessage := logMessage.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2474
    self busyLabel:'checking in %1' with:aClass name.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2475
    Processor activeProcess withLowerPriorityDo:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2476
        (mgr checkinClass:aClass logMessage:logMessage) ifFalse:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2477
            self warn:'checkin failed'.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2478
        ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2479
        aspect == #revisionInfo ifTrue:[
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2480
            self classListUpdate
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2481
        ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2482
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2483
    self normalLabel.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2484
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2485
    "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
  2486
    "Modified: 15.6.1996 / 00:22:49 / stefan"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2487
    "Modified: 21.12.1996 / 19:01:06 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2488
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2489
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  2490
classCompareWithRepository
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2491
    "open a diff-textView comparing the current (in-image) version
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  2492
     with the some version found in the repository."
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2493
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2494
    currentClass isLoaded ifFalse:[
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2495
        self warn:'cannot compare unloaded classes.'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2496
        ^ 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
  2497
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2498
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2499
    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
  2500
        |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
  2501
         nm msg|
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2502
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2503
        nm := currentClass name.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2504
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2505
        rev := currentClass binaryRevision.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2506
        mgr := currentClass sourceCodeManager.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2507
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2508
        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
  2509
        rev notNil ifTrue:[
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2510
            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
  2511
        ].
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2512
        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
  2513
                     onCancel:nil.
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2514
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2515
        rev notNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2516
            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
  2517
                msg := 'extracting newest %1'.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2518
                aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  2519
                revString := '(newest)'.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2520
            ] ifFalse:[
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2521
                msg := 'extracting previous %1'.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  2522
                aStream := mgr getSourceStreamFor:currentClass revision:rev.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2523
                revString := rev
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2524
            ].
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  2525
            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
  2526
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2527
            aStream isNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2528
                self warn:'could not extract source from repository'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2529
                ^ self
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2530
            ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2531
            comparedSource := aStream contents asString.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2532
            aStream close.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2533
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2534
            self busyLabel:'generating current source ...' with:nil.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2535
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2536
            aStream := '' writeStream.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2537
            Method flushSourceStreamCache.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2538
            currentClass fileOutOn:aStream withTimeStamp:false.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2539
            currentSource := aStream contents asString.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2540
            aStream close.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2541
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2542
            self busyLabel:'comparing  ...' with:nil.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2543
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2544
            comparedSource = currentSource ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2545
                self information:'versions are identical'.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2546
            ] ifFalse:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2547
                thisRevString := currentClass revision.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2548
                thisRevString isNil ifTrue:[
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2549
                    thisRevString := 'no revision'
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2550
                ].
908
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2551
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2552
                revString = '(newest)' ifTrue:[
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2553
                    (rev := mgr newestRevisionOf:currentClass) notNil ifTrue:[
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2554
                        revString := '(newest is' , rev , ')'
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2555
                    ]
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2556
                ].
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2557
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2558
                v := DiffTextView 
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  2559
                    openOn:currentSource label:'current: (based on: ' , thisRevString , ')'
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  2560
                    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
  2561
                v label:'comparing ' , nm.
365
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2562
            ].
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2563
            self normalLabel.
d807f05493f2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
  2564
        ]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2565
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2566
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  2567
    "Created: 4.1.1997 / 15:48:20 / cg"
908
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  2568
    "Modified: 5.1.1997 / 03:20:46 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2569
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  2570
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2571
classCreateSourceContainerFor:aClass
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2572
    "let user specify the source-repository values for aClass"
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2573
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
  2574
    ^ 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
  2575
        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
  2576
        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
  2577
        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
  2578
        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
  2579
        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
  2580
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  2581
    "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
  2582
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2583
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2584
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
  2585
    "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
  2586
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2587
    |box className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2588
     moduleHolder packageHolder fileNameHolder
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2589
     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
  2590
     module package fileName 
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2591
     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
  2592
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2593
    aClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2594
        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
  2595
        ^ 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
  2596
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  2597
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2598
    className := aClass name.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2599
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2600
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2601
    "/ defaults, if nothing at all is known
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2602
    "/
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
  2603
    (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
  2604
        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
  2605
    ].
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
  2606
    (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
  2607
        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
  2608
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2609
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2610
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2611
    "/ 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
  2612
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2613
    (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
  2614
        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
  2615
            (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
  2616
                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
  2617
            ].
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
  2618
            package := nm.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2619
        ].
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
  2620
        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
  2621
            (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
  2622
                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
  2623
            ]
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2624
        ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2625
    ].
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2626
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2627
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2628
    "/ 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
  2629
    "/ if so, take that as a default.
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2630
    "/
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
  2631
    info := (mgr := aClass sourceCodeManager) sourceInfoOfClass:aClass.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2632
    info notNil ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2633
        (info includesKey:#module) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2634
            module := (info at:#module).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2635
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2636
        (info includesKey:#directory) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2637
            package := (info at:#directory).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2638
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2639
        fileName := mgr containerFromSourceInfo:info.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2640
"/        (info includesKey:#fileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2641
"/            fileName := (info at:#fileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2642
"/        ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2643
"/            (info includesKey:#expectedFileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2644
"/                fileName := (info at:#expectedFileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2645
"/            ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2646
"/                (info includesKey:#classFileNameBase) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2647
"/                    fileName := (info at:#classFileNameBase) , '.st'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2648
"/                ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2649
"/            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2650
"/        ]
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2651
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2652
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2653
    fileName isNil ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2654
        fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2655
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2656
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2657
    fileNameHolder := fileName asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2658
    moduleHolder := module asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2659
    packageHolder := package asValue.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2660
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2661
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2662
    "/ 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
  2663
    "/
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2664
    (mgr checkForExistingContainerInModule:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2665
                                   package:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2666
                                 container:fileName) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2667
        "/ for now - this needs more work.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2668
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2669
"/        self information:(resources 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2670
"/                            string:'%1 is already contained in the container:
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2671
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2672
"/    %2 / %3 / %4'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2673
"/                            with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2674
"/                            with:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2675
"/                            with:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2676
"/                            with:fileName).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2677
"/        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2678
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2679
        (Dialog confirm:(resources 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2680
                            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
  2681
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2682
    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2683
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2684
To change it, press continue.'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2685
                            with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2686
                            with:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2687
                            with:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2688
                            with:fileName)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2689
                yesLabel:(resources string:'continue')
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2690
                noLabel:(resources string:'cancel'))
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2691
        ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2692
            ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2693
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2694
        oldModule := module.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2695
        oldPackage := package.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2696
        oldFileName := fileName
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2697
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2698
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2699
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2700
    "/ open a dialog for this
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  2701
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2702
    box := DialogBox new.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2703
    box label:title.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2704
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2705
    component := box addTextLabel:boxText withCRs.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2706
    component adjust:#left; borderWidth:0.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2707
    box addVerticalSpace.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  2708
    box addVerticalSpace.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2709
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2710
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2711
    component := box addTextLabel:(resources string:'Module:').
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2712
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2713
    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
  2714
    component := box addInputFieldOn:moduleHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2715
    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
  2716
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2717
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2718
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2719
    component := box addTextLabel:'Package:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2720
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2721
    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
  2722
    component := box addInputFieldOn:packageHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2723
    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
  2724
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2725
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2726
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2727
    component := box addTextLabel:'Filename:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2728
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2729
    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
  2730
    component := box addInputFieldOn:fileNameHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2731
    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
  2732
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2733
    box addVerticalSpace.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2734
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2735
    (mgr checkForExistingContainerInModule:module 
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2736
                                   package:package 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2737
                                 container:fileName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2738
        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
  2739
        component adjust:#left; borderWidth:0.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2740
        creatingNew := true.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2741
    ] ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2742
        creatingNew := false.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2743
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  2744
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2745
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2746
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2747
    box addAbortButton; addOkButton.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2748
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2749
    box showAtPointer.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2750
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  2751
    box accepted ifTrue:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2752
        module := moduleHolder value withoutSpaces.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2753
        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
  2754
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2755
        fileName := fileNameHolder value withoutSpaces.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2756
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2757
        (fileName endsWith:',v') ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2758
            fileName := fileName copyWithoutLast:2
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2759
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2760
        (fileName endsWith:'.st') ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2761
            fileName := fileName , '.st'
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2762
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2763
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2764
        info := aClass revisionInfo.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2765
        info notNil ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2766
            (info includesKey:#repositoryPathName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2767
                info := nil
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2768
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2769
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2770
        info isNil ifTrue:[
712
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2771
            creatingNew ifFalse:[
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2772
                (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
  2773
                         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
  2774
                    ifFalse:[
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2775
                        ^ false
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2776
                    ].
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2777
            ].
72dd9d6a9ea3 check for existing container and output a warnBox,
Claus Gittinger <cg@exept.de>
parents: 710
diff changeset
  2778
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2779
            (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
  2780
                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
  2781
                    ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2782
                ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2783
            aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2784
                                               inModule:module 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2785
                                               package:package 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2786
                                               container:fileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2787
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2788
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2789
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2790
        "/ check for the module
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2791
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2792
        (mgr checkForExistingModule:module) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2793
            (createDirs or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2794
                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
  2795
                ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2796
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2797
            (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
  2798
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2799
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2800
            (mgr createModule:module) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2801
                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
  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
        ].
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
  2805
        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
  2806
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2807
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2808
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2809
        "/ check for the package
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2810
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2811
        (mgr checkForExistingModule:module package:package) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2812
            (createDirs or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2813
                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
  2814
                ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2815
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2816
            (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
  2817
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2818
            ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2819
            (mgr createModule:module package:package) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2820
                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
  2821
                ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2822
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2823
        ].
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
  2824
        lastPackage := package.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2825
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2826
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2827
        "/ check for the container itself
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2828
        "/
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2829
        (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2830
            creatingNew ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2831
                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
  2832
            ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2833
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2834
"/            (oldModule notNil
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2835
"/            and:[(oldModule ~= module)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2836
"/                 or:[oldPackage ~= package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2837
"/                 or:[oldFileName ~= fileName]]])
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2838
"/            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2839
"/                self warn:(resources string:'no change').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2840
"/                ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2841
"/            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2842
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2843
            (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
  2844
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2845
    %2 / %3 / %4  ?'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2846
                                with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2847
                                with:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2848
                                with:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2849
                                with:fileName) withCRs) 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2850
            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2851
                ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2852
            ].  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2853
881
f14c44f081db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
  2854
            aClass updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS-expansion
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2855
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2856
            oldFileName notNil ifTrue:[
878
c7b082dead36 fixed no-version checkin into an existing container
Claus Gittinger <cg@exept.de>
parents: 877
diff changeset
  2857
                msg := ('forced checkin / source container change from ' , oldFileName).
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2858
            ] ifFalse:[
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2859
                msg := 'defined source container'
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2860
            ].
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2861
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2862
            (mgr
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2863
                checkinClass:aClass 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2864
                fileName:fileName 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2865
                directory:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2866
                module:module 
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2867
                logMessage:msg)
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2868
            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2869
                (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
  2870
                    self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2871
                    ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2872
                ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2873
                (mgr
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2874
                    checkinClass:aClass 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2875
                    fileName:fileName 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2876
                    directory:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2877
                    module:module 
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  2878
                    logMessage:msg
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2879
                    force:true)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2880
                ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2881
                    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
  2882
                    self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2883
                    ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2884
                ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2885
            ].
878
c7b082dead36 fixed no-version checkin into an existing container
Claus Gittinger <cg@exept.de>
parents: 877
diff changeset
  2886
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2887
            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
  2888
            ^ true
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2889
        ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2890
            (createContainer or:[creatingNew]) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2891
                (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
  2892
                                          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
  2893
                    ^ false
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2894
                ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2895
            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2896
        ].
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2897
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2898
        (mgr
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2899
                createContainerFor:aClass
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2900
                inModule:module
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2901
                package:package
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2902
                container:fileName) ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2903
            self warn:(resources string:'failed to create container.').
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  2904
            self normalLabel.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  2905
            ^ false.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  2906
        ].
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  2907
        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
  2908
        ^ 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
  2909
    ].
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
  2910
    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
  2911
    ^ 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
  2912
881
f14c44f081db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
  2913
    "Modified: 20.12.1996 / 13:18:42 / cg"
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2914
!
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  2915
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2916
classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2917
    "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
  2918
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2919
    |box
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2920
     moduleHolder packageHolder fileNameHolder
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2921
     module package fileName aStream
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  2922
     y component mgr|
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2923
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2924
    mgr := SourceCodeManager.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2925
    mgr isNil ifTrue:[^ false].
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
    fileNameHolder := '' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2928
    moduleHolder := (OperatingSystem getLoginName) asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2929
    packageHolder := 'private' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2930
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
    "/ 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
  2933
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2934
    box := DialogBox new.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2935
    box label:'container fileIn'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2936
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2937
    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
  2938
    component adjust:#left; borderWidth:0.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2939
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2940
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2941
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2942
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2943
    component := box addTextLabel:(resources string:'Module:').
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2944
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2945
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2946
    component := box addInputFieldOn:moduleHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2947
    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
  2948
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2949
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2950
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2951
    component := box addTextLabel:'Package:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2952
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2953
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2954
    component := box addInputFieldOn:packageHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2955
    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
  2956
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2957
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2958
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2959
    component := box addTextLabel:'Filename:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2960
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2961
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2962
    component := box addInputFieldOn:fileNameHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2963
    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
  2964
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2965
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2966
    box addAbortButton; addOkButton.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2967
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2968
    box showAtPointer.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2969
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2970
    box destroy.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2971
    box accepted ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2972
        ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2973
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2974
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2975
    module := moduleHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2976
    package := packageHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2977
    fileName := fileNameHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2978
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2979
    (fileName endsWith:',v') ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2980
        fileName := fileName copyWithoutLast:2
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2981
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2982
    (fileName endsWith:'.st') ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2983
        fileName := fileName , '.st'
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2984
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2985
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2986
    (mgr checkForExistingContainerInModule:module 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2987
                                   package:package 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2988
                                 container:fileName) ifFalse:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2989
        self warn:'no such container'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2990
        ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2991
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2992
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2993
    aStream := mgr 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2994
            streamForClass:nil 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2995
            fileName:fileName 
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2996
            revision:#newest
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2997
            directory:package
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2998
            module:module
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2999
            cache:false.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3000
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3001
    aStream isNil ifTrue:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3002
        self warn:'could not fileIn from repository'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3003
        ^ false.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3004
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3005
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3006
    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
  3007
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3008
    Class withoutUpdatingChangesDo:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3009
        [
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3010
            aStream fileIn.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3011
        ] valueNowOrOnUnwindDo:[
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3012
            aStream close.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3013
            self normalLabel.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3014
            Smalltalk changed.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3015
        ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3016
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3017
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3018
    ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3019
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3020
    "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
  3021
    "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
  3022
!
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3023
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3024
classLoadRevision
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3025
    "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
  3026
     upgrade a class to the newest revision"
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3027
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  3028
    currentClass isLoaded ifFalse:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3029
        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
  3030
        ^ self.
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  3031
    ].
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  3032
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3033
    self doClassMenu:[:currentClass |
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3034
        |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
  3035
         newClass prevCategory ok|
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3036
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3037
        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
  3038
        rev notNil ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3039
            className := currentClass name.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3040
            (className includesString:'_rev_') ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3041
                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
  3042
                ^ self
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3043
            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3044
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3045
            mgr := currentClass sourceCodeManager.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3046
            ok := false.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3047
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3048
            rev withoutSpaces isEmpty ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3049
                what := className , '(newest)'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3050
                self busyLabel:'extracting %1' with:what.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  3051
                aStream := mgr getMostRecentSourceStreamForClassNamed:className.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3052
                revString := 'newest'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3053
                keep := false.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3054
            ] ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3055
                what := className , '(' , rev , ')'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3056
                self busyLabel:'extracting %1' with:what.
753
72a555a0c626 had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
  3057
                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
  3058
                revString := rev.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3059
                keep := true.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3060
            ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3061
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3062
            aStream isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3063
                self warn:'cannot find classes source.'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3064
                ^ self.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3065
            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3066
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3067
            self busyLabel:'loading %1' with:what .
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3068
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3069
            [
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3070
                Class withoutUpdatingChangesDo:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3071
                    "/ rename the current class - for backup
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3072
                    prevCategory := currentClass category.    
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3073
                    currentClass category:'* obsolete *'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3074
                    Smalltalk renameClass:currentClass to:className , '_saved'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3075
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3076
                    aStream fileIn.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3077
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3078
                    "/ did that work ?
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3079
                    newClass := Smalltalk at:className ifAbsent:nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3080
                    newClass isNil ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3081
                        self warn:'fileIn failed - undoing changes ...'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3082
                        Smalltalk renameClass:currentClass to:className.                        
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3083
                        currentClass category:prevCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3084
                    ] ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3085
                        "/
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3086
                        "/ 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
  3087
                        "/ current class
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3088
                        "/
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3089
                        keep ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3090
                            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
  3091
                            newClass category:'* old versions *'.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3092
                            Smalltalk renameClass:currentClass to:className.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3093
                            currentClass category:prevCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3094
                        ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3095
                        ok := true.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3096
                    ]
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3097
                ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3098
            ] valueNowOrOnUnwindDo:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3099
                aStream close.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3100
                self normalLabel.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3101
                Smalltalk changed.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3102
            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3103
            ok ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3104
                self switchToClassNamed:newClass name.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3105
            ]    
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  3106
        ]
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3107
    ]
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3108
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3109
    "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
  3110
    "Modified: 12.10.1996 / 17:22:40 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3111
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3112
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3113
classModifyContainer
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3114
    "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
  3115
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3116
    currentClass isLoaded ifFalse:[
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3117
        self warn:'dont know anything about unloaded classes.'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3118
        ^ self.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3119
    ].
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3120
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3121
    self doClassMenu:[:currentClass |
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3122
        self 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3123
            classDefineSourceContainerFor:currentClass 
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3124
            title:(resources string:'Repository information for %1' with:currentClass name)
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3125
            text:'defining/changing the source code container'
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3126
            createDirectories:true createContainer:true. 
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3127
    ]
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3128
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3129
    "Created: 23.11.1995 / 11:41:38 / cg"
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3130
    "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
  3131
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3132
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3133
classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3134
    "remove a container from the source repository"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3135
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3136
    currentClass isLoaded ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3137
        self warn:'please load the class first'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3138
        ^ self.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3139
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3140
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3141
    self doClassMenu:[:currentClass |
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3142
        self 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3143
            classRemoveSourceContainerFor:currentClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3144
    ]
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3145
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3146
    "Created: 23.11.1995 / 11:41:38 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3147
    "Modified: 11.9.1996 / 12:55:42 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3148
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3149
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3150
classRemoveSourceContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3151
    "show container & let user confirm twice."
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3152
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  3153
    |module package fileName info mgr|
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3154
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3155
    aClass isLoaded ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3156
        self warn:'please load the class first'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3157
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3158
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3159
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3160
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3161
    "/ 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
  3162
    "/ if so, take that as a default.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3163
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3164
    mgr := aClass sourceCodeManager.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3165
    mgr isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3166
        self warn:'No sourceCodeManagement.'.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3167
        ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3168
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3169
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3170
    info := mgr sourceInfoOfClass:aClass.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3171
    info notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3172
        (info includesKey:#module) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3173
            module := (info at:#module).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3174
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3175
        (info includesKey:#directory) ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3176
            package := (info at:#directory).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3177
        ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3178
        fileName := mgr containerFromSourceInfo:info.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3179
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3180
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3181
    module isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3182
        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
  3183
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3184
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3185
    package isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3186
        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
  3187
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3188
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3189
    fileName isNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3190
        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
  3191
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3192
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3193
        
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3194
    (mgr checkForExistingContainerInModule:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3195
                                   package:package 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3196
                                 container:fileName) ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3197
        self warn:'Class has no source container.' withCRs.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3198
        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3199
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3200
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3201
    (Dialog
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3202
        choose:(resources 
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3203
                    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
  3204
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3205
container:    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3206
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3207
Really remove ?' 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3208
                    with:aClass name 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3209
                    with:module 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3210
                    with:package 
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3211
                    with:fileName) 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3212
        labels:(Array 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3213
                    with:(resources string:'no') 
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3214
                    with:(resources string:'remove'))
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3215
        values:#(false true)
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3216
        default:false) ifFalse:[
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3217
        ^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3218
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3219
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3220
    (mgr removeContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3221
                   inModule:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3222
                    package:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3223
                  container:fileName) ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3224
        self warn:(resources string:'failed to remove container.').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3225
        self normalLabel.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3226
        ^ true.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3227
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3228
    ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3229
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3230
    "Created: 11.9.1996 / 13:06:14 / cg"
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  3231
    "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
  3232
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3233
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3234
classRevisionInfo
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3235
    "show current classes revision info in codeView"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3236
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3237
    self doClassMenu:[:currentClass |
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3238
        |aStream info info2 s rv mgr fn msg|
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3239
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3240
        aStream := WriteStream on:(String new:200).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3241
        currentClass notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3242
            Processor activeProcess withLowerPriorityDo:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3243
                self busyLabel:'extracting revision info' with:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3244
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3245
                info := currentClass revisionInfo.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3246
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3247
                rv := currentClass binaryRevision.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3248
                rv notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3249
                    aStream nextPutLine:'**** Loaded classes binary information ****'; cr.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3250
                    aStream nextPutLine:'  Binary based upon : ' , rv.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3251
                    aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3252
                ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3253
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3254
                info notNil ifTrue:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3255
                    (info includesKey:#revision) ifFalse:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3256
                        aStream nextPutLine:'WARNING:'; cr.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3257
                        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
  3258
                        aStream nextPutLine:'  Check carefully before checking anything in.'.
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3259
                        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
  3260
                        aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3261
                    ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3262
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3263
                    aStream nextPutLine:'**** Classes source information ****'; cr.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3264
                    s := info at:#repositoryPath ifAbsent:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3265
                    s notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3266
                        aStream nextPutLine:'  Source repository : ' , s
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3267
                    ].
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3268
                    aStream nextPutLine:'  Filename ........ : ' , (info at:#fileName ifAbsent:'?').
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3269
                    aStream nextPutLine:'  Revision ........ : ' , (info at:#revision ifAbsent:'?').
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3270
                    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
  3271
                    aStream nextPutLine:'  Checkin user .... : ' , (info at:#user ifAbsent:'?').
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3272
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3273
                    (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3274
                        aStream nextPutLine:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?').
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3275
                        aStream nextPutLine:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?').
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3276
                    ].
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3277
                    aStream nextPutLine:'  Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?').
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3278
                    aStream cr.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3279
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3280
                    (mgr := currentClass sourceCodeManager) notNil ifTrue:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3281
                        aStream nextPutLine:'**** Repository information ****'; cr.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3282
                        mgr writeRevisionLogOf:currentClass to:aStream.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3283
                    ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3284
                ] ifFalse:[
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  3285
                    aStream nextPutLine:'No revision info found'.
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3286
                    currentClass isLoaded ifFalse:[
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3287
                        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
  3288
                    ] ifTrue:[
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3289
                        fn := currentClass classFilename.
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3290
                        currentClass wasAutoloaded ifTrue:[
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3291
                            msg := 'This class was autoloaded.'.
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3292
                            fn notNil ifTrue:[
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3293
                                msg := msg , ' (from ''' , fn , ''')'.
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3294
                            ].
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3295
                        ] ifFalse:[
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3296
                            fn notNil ifTrue:[
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3297
                                msg := 'This class was loaded from ''' , fn , '''.'
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3298
                            ].
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3299
                        ].
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3300
                        msg notNil ifTrue:[
858
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3301
                            aStream cr; nextPutAll:msg.
8610070bdbd2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
  3302
                        ]
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3303
                    ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3304
                ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3305
            ]
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3306
        ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3307
        codeView contents:(aStream contents).
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3308
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3309
        codeView modified:false.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3310
        codeView acceptAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3311
        codeView explainAction:nil.
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3312
        methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3313
            methodListView setSelection:nil
438
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3314
        ].
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3315
        aspect := #revisionInfo. 
904cdb995da0 get histories with lower prio
Claus Gittinger <cg@exept.de>
parents: 432
diff changeset
  3316
        self normalLabel
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3317
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3318
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3319
    "Created: 14.11.1995 / 16:43:15 / cg"
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  3320
    "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
  3321
!
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3322
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3323
getLogMessageFor:aString
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3324
    "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
  3325
     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
  3326
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3327
    |dialog textView|
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3328
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3329
    dialog := Dialog new.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3330
    (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
  3331
    textView := dialog addTextBoxOn:nil 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3332
                        class:EditTextView
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3333
                        withNumberOfLines:10 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3334
                        hScrollable:true 
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3335
                        vScrollable:true.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3336
    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
  3337
    textView contents:lastSourceLogMessage.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3338
    dialog addAbortButton; addOkButton.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3339
    dialog open.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3340
    dialog accepted ifTrue:[
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3341
        ^ textView contents
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3342
    ].
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3343
    ^ nil
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3344
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  3345
    "Created: 15.6.1996 / 00:20:46 / stefan"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3346
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3347
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3348
!BrowserView methodsFor:'class stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3349
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3350
allClassesInCategory:aCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3351
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3352
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3353
    currentNamespace = '* all *' ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3354
        ^ Smalltalk allClassesInCategory:currentClassCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3355
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3356
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3357
    classes := Set new.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3358
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3359
    (self listOfNamespaces) do:[:aNamespace |
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3360
        aNamespace allBehaviorsDo:[:aClass |
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3361
            |actualNamespace nm|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3362
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3363
            aClass isMeta ifFalse:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3364
                (aCategory = '* all *'
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3365
                or:[aClass category = aCategory]) ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3366
                    (aClass isNamespace not
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3367
                    or:[aClass == Smalltalk]) ifTrue:[
887
ad1d6b0ed970 namespace fixes
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  3368
                        actualNamespace := aClass nameSpace.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3369
                        (actualNamespace isNamespace not "/ a private class
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3370
                        or:[actualNamespace == aNamespace]) ifTrue:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3371
                            classes add:aClass
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3372
                        ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3373
                    ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3374
                ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3375
            ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3376
        ]
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3377
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3378
    ^ classes
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3379
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3380
    "Created: 23.12.1996 / 10:26:28 / cg"
887
ad1d6b0ed970 namespace fixes
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  3381
    "Modified: 23.12.1996 / 11:33:13 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3382
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3383
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3384
allClassesInCategory:aCategory do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3385
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3386
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3387
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3388
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3389
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3390
    "Modified: 23.12.1996 / 10:30:00 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3391
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3392
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3393
allClassesInCategory:aCategory inOrderDo:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3394
    "evaluate the argument, aBlock for all classes in aCategory;
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3395
     superclasses come first - then subclasses"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3396
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3397
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3398
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3399
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3400
    classes topologicalSort:[:a :b | b isSubclassOf:a].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3401
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3402
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3403
    "Created: 23.12.1996 / 10:27:52 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3404
    "Modified: 23.12.1996 / 10:30:07 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3405
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3406
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3407
checkClassSelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3408
    "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
  3409
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3410
    currentClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3411
        self warn:'select a class first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3412
        ^ false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3413
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3414
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3415
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3416
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3417
classClassDefinitionTemplateFor:aClass in:cat namespace:isNameSpace private:isPrivate
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3418
    "common helper for newClass and newSubclass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3419
     - show a template to define a subclass of aClass in category cat.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3420
     Also, set acceptaction to install the class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3421
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3422
    |theSuperClass|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3423
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3424
    currentMethodCategory := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3425
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3426
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3427
    classListView setSelection:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3428
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3429
    fullClass ifFalse:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3430
        methodCategoryListView contents:nil.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3431
        methodListView contents:nil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3432
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3433
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3434
    (aClass == Autoload
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3435
    or:[aClass isNil or:[aClass isLoaded not]]) ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3436
        theSuperClass := Object
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3437
    ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3438
        theSuperClass := aClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3439
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3440
    codeView contents:(self classTemplateFor:theSuperClass in:cat namespace:isNameSpace private:isPrivate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3441
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3442
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3443
    codeView acceptAction:[:theCode |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3444
        codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3445
        Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3446
            |cls|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3447
746
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3448
            Object errorSignal handle:[:ex |
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3449
                codeView error:ex errorString
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3450
                         position:1 to:nil from:nil.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3451
            ] do:[
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3452
                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
  3453
                cls isBehavior ifTrue:[
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3454
                    codeView modified:false.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3455
                    self classCategoryUpdate.
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3456
                    self updateClassListWithScroll:false.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3457
                    cls isNamespace ifFalse:[
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3458
                        self switchToClassNamed:(cls name).
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3459
                    ]
746
8f7d8caecf22 catch errors and show a warn-dialog
Claus Gittinger <cg@exept.de>
parents: 741
diff changeset
  3460
                ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3461
            ]
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3462
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3463
        codeView cursor:(Cursor normal).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3464
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3465
    codeView explainAction:nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3466
    self switchToClass:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3467
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3468
    "Created: 23.12.1996 / 12:45:43 / cg"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3469
    "Modified: 4.1.1997 / 21:15:57 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3470
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3471
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3472
classListUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3473
    RememberAspect ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3474
        aspect == #hierarchy ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3475
            ^ self classHierarchy
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3476
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3477
        aspect == #classInstVars ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3478
            ^ self classClassInstVars
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3479
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3480
        aspect == #comment ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3481
            ^ self classComment
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3482
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3483
        aspect == #primitiveDefinitions ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3484
            ^ self classPrimitiveDefinitions
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3485
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3486
        aspect == #primitiveFunctions ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3487
            ^ self classPrimitiveFunctions
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3488
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3489
        aspect == #primitiveVariables ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3490
            ^ self classPrimitiveVariables
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3491
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3492
        aspect == #revisionInfo ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3493
            ^ self classRevisionInfo
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3494
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3495
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3496
    self classDefinition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3497
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3498
    "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
  3499
    "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
  3500
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3501
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3502
classSelection:lineNr
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3503
    "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
  3504
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3505
    |cls nm oldSelector sel|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3506
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3507
    (currentClassHierarchy notNil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3508
     and:[fullProtocol]) ifTrue:[
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3509
        oldSelector := currentSelector.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3510
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3511
        self updateMethodCategoryListWithScroll:false.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3512
        self updateMethodListWithScroll:false.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3513
        fullProtocol ifFalse:[
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3514
            self updateVariableList.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3515
        ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3516
        oldSelector notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3517
            self switchToMethod:oldSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3518
            currentMethod notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3519
                self switchToMethodCategory:(currentMethod category).
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3520
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  3521
        ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3522
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3523
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3524
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3525
    (sel := classListView selectionValue) isNil ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3526
        self classCategorySelectionChanged. 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3527
        aspect := nil.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3528
        currentClass := actualClass := nil.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3529
        self updateCodeView.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3530
        ^ self
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3531
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3532
    nm := sel withoutSpaces.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3533
    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
  3534
    cls notNil ifTrue:[
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3535
        self switchToClass:cls.
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3536
        self classSelectionChanged
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  3537
    ] ifFalse:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3538
        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
  3539
    ]
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  3540
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  3541
    "Modified: 3.1.1997 / 11:44:02 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3542
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3543
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3544
classSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3545
    |oldMethodCategory oldMethod oldSelector|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3546
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3547
    self withWaitCursorDo:[
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3548
        aspect := #definition.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3549
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3550
        oldMethodCategory := currentMethodCategory.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3551
        oldMethod := currentMethod.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3552
        oldSelector := currentSelector.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3553
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3554
        showInstance ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3555
            actualClass := acceptClass := currentClass
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3556
        ] ifFalse:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3557
            actualClass := acceptClass := currentClass class
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3558
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3559
        currentMethodCategory := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3560
        currentMethod := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3561
        currentSelector := nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3562
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3563
        self updateMethodCategoryList.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3564
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3565
        oldMethodCategory notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3566
            methodCategoryListView setSelectElement:oldMethodCategory.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3567
            methodCategoryListView hasSelection ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3568
                currentMethodCategory := oldMethodCategory.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3569
                self methodCategorySelectionChanged
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3570
            ]
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3571
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3572
        self updateMethodList.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3573
        self updateCodeView.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  3574
        self updateVariableList.
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3575
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3576
        fullClass ifTrue:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3577
            codeView acceptAction:[:theCode |
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3578
                codeView cursor:Cursor execute.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3579
                Object abortSignal catch:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3580
                    self compileCode:theCode asString.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3581
                    codeView modified:false.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3582
                ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3583
                codeView cursor:Cursor normal.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3584
            ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3585
        ] ifFalse:[
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3586
"/            self classDefinition.
895
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3587
            self classListUpdate.
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3588
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3589
            codeView acceptAction:[:theCode |
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3590
                codeView cursor:Cursor execute.
895
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3591
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3592
                Object abortSignal catch:[
895
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3593
                    UndefinedObject createMinimumProtocolInNewSubclassQuery
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3594
                    answer:true
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3595
                    do:[
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3596
                        (Compiler 
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3597
                            evaluate:theCode asString 
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3598
                            notifying:codeView 
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3599
                            compile:false)
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3600
                        isBehavior ifTrue:[
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3601
                            self classCategoryUpdate.
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3602
                            self updateClassListWithScroll:false.
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3603
                            codeView modified:false.
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3604
                        ].
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3605
                    ]
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3606
                ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3607
                codeView cursor:Cursor normal.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3608
            ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3609
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3610
        codeView explainAction:nil.
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3611
888
b7516acfb791 setting the nameSpace in documentation
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
  3612
        (classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3613
            (currentClassCategory = currentClass category) ifFalse:[
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3614
                currentClassCategory := currentClass category.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  3615
                classCategoryListView setSelectElement:currentClassCategory
366
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3616
            ]
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3617
        ].
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3618
07c1e46ec4bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
  3619
        self setDoitActionForClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3620
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3621
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3622
    "Created: 23.11.1995 / 11:32:03 / cg"
895
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  3623
    "Modified: 3.1.1997 / 15:46:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3624
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3625
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3626
classTemplateFor:aSuperClass in:categoryString namespace:isNameSpace private:isPrivate
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3627
    "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
  3628
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3629
    |cat aString name nameProto namePrefix i existingNames withNameSpaceDirective
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3630
     className ownerName|
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3631
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3632
    isNameSpace ifTrue:[
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3633
        ^ 'Namespace name:''NewNameSpace''
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3634
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3635
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3636
"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3637
 Replace ''NewNameSpace'' by the desired name.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3638
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3639
 Create the namespace by ''accepting'',
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3640
 either via the menu or the keyboard (usually CMD-A).
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3641
"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3642
'
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3643
    ].
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3644
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3645
    withNameSpaceDirective :=
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3646
        currentNamespace notNil 
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3647
        and:[currentNamespace ~= '* all *'
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3648
        and:[currentNamespace ~= Smalltalk]].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3649
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3650
    withNameSpaceDirective ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3651
        className := aSuperClass nameWithoutNameSpacePrefix
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3652
    ] ifFalse:[    
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3653
        className := aSuperClass name.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3654
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3655
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3656
    cat := categoryString.
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3657
    (cat isNil or:[cat startsWith:'*']) ifTrue:[
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3658
        cat := '* no category *'
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3659
    ].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3660
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3661
    nameProto := 'NewClass'.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3662
    i := 1.
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3663
    isPrivate ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3664
        namePrefix := currentClass name , '::'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3665
        existingNames := currentClass privateClasses.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3666
        existingNames notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3667
            existingNames := existingNames collect:[:cls | cls name].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3668
        ]
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3669
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3670
        namePrefix := ''.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3671
        existingNames := Smalltalk keys
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3672
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3673
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3674
    name := 'NewClass' , i printString.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3675
    existingNames notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3676
        nameProto := namePrefix , name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3677
        [nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3678
            i := i + 1.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3679
            name := 'NewClass' , i printString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3680
            nameProto := namePrefix , name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3681
        ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3682
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3683
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3684
    isPrivate ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3685
        withNameSpaceDirective ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3686
            ownerName := currentClass nameWithoutNameSpacePrefix
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3687
        ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3688
            ownerName := currentClass name
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3689
        ].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3690
        aString := className , ' subclass:#' , name  , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3691
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3692
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3693
' , '    poolDictionaries: ''''
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3694
' , '    privateIn:' , ownerName
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3695
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3696
        aString := className , ' subclass:#' , name , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3697
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3698
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3699
' , '    poolDictionaries: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3700
' , '    category: '''.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3701
        cat notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3702
            aString := aString , cat
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
        aString := aString , ''''
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3705
    ].
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3706
    aString := aString , '
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3707
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3708
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3709
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3710
 Replace ''' , className , ''', ''', name , ''' and
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3711
 the empty string arguments by true values.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3712
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3713
 Install (or change) the class by ''accepting'',
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3714
 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
  3715
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3716
 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
  3717
 add some documentation; preferably under the classes documentation
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  3718
 protocol.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3719
 (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
  3720
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3721
'.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3722
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3723
    withNameSpaceDirective ifTrue:[
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3724
        aString := '"{ Namespace: ''' , currentNamespace name , ''' }"
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3725
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3726
' , aString
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3727
    ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3728
    ^ aString
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3729
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  3730
    "Created: 23.12.1996 / 12:46:31 / cg"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  3731
    "Modified: 5.1.1997 / 00:13:33 / cg"
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3732
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  3733
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3734
doClassMenu:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3735
    "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
  3736
     while showing waitCursor"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3737
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3738
    self checkClassSelected ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3739
        self withWaitCursorDo:[aBlock value:currentClass]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3740
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3741
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3742
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3743
listOfAllClassesInCategory:aCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3744
    "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
  3745
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3746
    |nameSpaces newList classNames searchCategory 
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3747
     match anyCategory nm owner|
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3748
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3749
    "/ keep track of added names (care for obsolete classes)
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3750
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3751
    classNames := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3752
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3753
    (aCategory = '* hierarchy *') ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3754
        newList := OrderedCollection new.
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  3755
        self classHierarchyOf:Object withAutoloaded:true do:[:aClass :lvl|
848
c7d1ea190693 oops - dont suppress Smalltalk (its also a namespace)
Claus Gittinger <cg@exept.de>
parents: 847
diff changeset
  3756
            (aClass isNamespace not
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  3757
            or:[aClass == Smalltalk]) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3758
                nm := self displayedClassNameOf:aClass.
899
c373d5dd0586 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 898
diff changeset
  3759
"/                (newList includes:aClass) ifFalse:[
c373d5dd0586 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 898
diff changeset
  3760
                (classNames includes:nm) ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3761
                    "/ show classes from other nameSpaces in italic
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3762
                    (currentNamespace ~= '* all *'
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3763
                    and:[(self findClassNamedInNameSpace:nm) isNil]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3764
                        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
  3765
                    ] ifFalse:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3766
                        nm := (String new:lvl*2) , nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3767
                    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3768
                    classNames add:nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3769
                    newList add:nm
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  3770
                ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3771
                
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3772
"/                nm := aClass nameWithoutPrefix.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3773
"/            
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3774
"/                "/ is it in one of the selected namespaces ?
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3775
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3776
"/                (self findClassNamed:aClass name) isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3777
"/                    classNames add:(aClass name).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3778
"/                    newList add:(((String new:lvl) , nm) asText emphasizeAllWith:#italic)
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3779
"/                ] ifFalse:[
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3780
"/                    currentNamespace = aClass nameSpace ifFalse:[
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3781
"/                        nm := aClass nameSpace name , '::' , aClass nameWithoutPrefix
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3782
"/                    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3783
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3784
"/                    (classNames includes:nm) ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3785
"/                        classNames add:nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3786
"/                        newList add:(String new:lvl) , nm
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3787
"/                    ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3788
"/                ]
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3789
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3790
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3791
        ^ newList
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3792
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3793
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3794
    newList := IdentitySet new.
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  3795
    nameSpaces := self listOfNamespaces.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3796
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3797
    (aCategory = '* all *') ifTrue:[
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3798
        anyCategory := true
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3799
    ] ifFalse:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3800
        anyCategory := false.
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3801
        (aCategory = '* no category *') ifTrue:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3802
            searchCategory := nil
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3803
        ] ifFalse:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3804
            searchCategory := aCategory
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3805
        ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3806
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3807
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3808
    nameSpaces do:[:aNamespace |
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3809
        aNamespace allBehaviorsDo:[:aClass |
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3810
            |thisCategory actualNamespace nm owner|
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3811
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3812
            aClass isMeta ifFalse:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3813
                (aClass isNamespace not
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3814
                or:[aClass == Smalltalk]) ifTrue:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3815
                    match := anyCategory.
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3816
                    match ifFalse:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3817
                        thisCategory := aClass category.
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3818
                        match := ((thisCategory = searchCategory) 
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3819
                                 or:[thisCategory = aCategory]).
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3820
                    ].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3821
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3822
                    match ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3823
                        fullClass ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3824
                            aClass owningClass notNil ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3825
                                match := false
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3826
                            ]
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3827
                        ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3828
                    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3829
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3830
                    match ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3831
                        nm := self displayedClassNameOf:aClass.
899
c373d5dd0586 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 898
diff changeset
  3832
"/                        (newList includes:aClass) ifFalse:[
c373d5dd0586 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 898
diff changeset
  3833
                        (classNames includes:nm) ifFalse:[
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3834
                            (owner := aClass topOwningClass) notNil ifTrue:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3835
                                actualNamespace := owner nameSpace
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3836
                            ] ifFalse:[
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3837
                                actualNamespace := aClass nameSpace.
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3838
                            ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3839
                            (actualNamespace isNamespace not "/ a private class
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3840
                            or:[actualNamespace == aNamespace]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3841
                                classNames add:nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3842
                                newList add:aClass
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3843
                            ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3844
                        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3845
                    ]
841
4d803d693dfa hide namespaces in class & category lists
Claus Gittinger <cg@exept.de>
parents: 839
diff changeset
  3846
                ]
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3847
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3848
        ]
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3849
    ].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3850
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3851
    fullClass ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3852
        "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3853
        "/ mhm - must search through private classes of those
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3854
        "/ in smalltalk (they are not visible in the nameSpace
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3855
        "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3856
        Smalltalk allBehaviorsDo:[:aClass |
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3857
            |actualNamespace owner|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3858
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3859
            aClass isMeta ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3860
                (owner := aClass topOwningClass) notNil ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3861
                    (newList includes:owner) ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3862
                        nm := self displayedClassNameOf:aClass.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3863
    "/                    (newList includes:aClass) ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3864
                        (classNames includes:nm) ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3865
                            classNames add:nm.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3866
                            newList add:aClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3867
                        ]
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  3868
                    ]
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  3869
                ]
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  3870
            ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3871
        ].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3872
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  3873
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3874
    (newList size == 0) ifTrue:[^ nil].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3875
    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
  3876
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3877
    "/ collect names & indent after sorting
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3878
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3879
    newList := newList collect:[:cls |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3880
        | nm owner s |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3881
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3882
        nm := self displayedClassNameOf:cls.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3883
        s := nm.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3884
        owner := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3885
        [ (owner := owner owningClass) notNil ] whileTrue:[    
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3886
            s := '  ' , s
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3887
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3888
        s
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3889
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  3890
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  3891
    ^ newList
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  3892
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  3893
    "Modified: 4.1.1997 / 15:07:47 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3894
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3895
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3896
listOfClassHierarchyOf:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3897
    "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
  3898
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3899
    |startClass classes thisOne|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3900
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3901
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3902
        startClass := aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3903
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3904
        startClass := aClass class.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3905
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3906
    classes := startClass allSuperclasses.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3907
    thisOne := Array with:startClass.
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
    classes notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3910
        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
  3911
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3912
        classes := thisOne
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3913
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3914
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3915
    fullProtocol ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3916
        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
  3917
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3918
    ^ classes collect:[:c | c name]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3919
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3920
    "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
  3921
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  3922
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3923
renameCurrentClassTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3924
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3925
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3926
    self doClassMenu:[:currentClass |
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3927
        |oldName oldSym newSym cls|
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3928
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3929
        (cls := Smalltalk classNamed:aString) notNil ifTrue:[
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3930
            (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
  3931
                ifFalse:[^ self]
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3932
        ].
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3933
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3934
        oldName := currentClass name.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3935
        oldSym := oldName asSymbol.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3936
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3937
        currentClass setName:aString.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3938
        newSym := aString asSymbol.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3939
        Smalltalk at:oldSym put:nil.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3940
        Smalltalk removeKey:oldSym.            
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3941
        Smalltalk at:newSym put:currentClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3942
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3943
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3944
        currentClass renameTo:aString.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3945
"
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3946
        Smalltalk renameClass:currentClass to:aString.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3947
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3948
        self updateClassList.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3949
        self updateMethodCategoryListWithScroll:false.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3950
        self updateMethodListWithScroll:false.
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3951
        self withWaitCursorDo:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  3952
            Transcript showCR:('searching for users of ' , oldSym); endEntry.
356
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3953
            SystemBrowser browseReferendsOf:oldSym warnIfNone:false
74f314ce6039 rename boxes contents
Claus Gittinger <cg@exept.de>
parents: 354
diff changeset
  3954
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3955
    ]
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
  3956
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
  3957
    "Created: 25.11.1995 / 13:02:53 / cg"
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  3958
    "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
  3959
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3960
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3961
switchToClass:newClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3962
    "switch to some other class;
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3963
     keep instance protocol as it was ..."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3964
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3965
    |cls meta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3966
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
  3967
"/    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
  3968
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
    self releaseClass.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3970
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3971
    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
  3972
    cls isMeta ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3973
        meta := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3974
        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
  3975
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3976
        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
  3977
    ].
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
  3978
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3979
    currentClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3980
    showInstance ifTrue:[
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3981
       actualClass := acceptClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3982
    ] 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
  3983
       actualClass := acceptClass := meta.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3984
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3985
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3986
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3987
        cls addDependent:self.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  3988
        meta addDependent:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3989
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3990
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3991
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3992
    "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
  3993
    "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
  3994
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3995
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3996
switchToClassNameMatching:aMatchString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3997
    |classNames thisName box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3998
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  3999
    classNames := Set new.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4000
    Smalltalk allBehaviorsDo:[:aClass |
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4001
        thisName := aClass name.
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4002
        (aMatchString match:thisName) ifTrue:[
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4003
            classNames add:thisName
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4004
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4005
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4006
    (classNames size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4007
    (classNames size == 1) ifTrue:[
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4008
        ^ self switchToClassNamed:(classNames first)
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4009
    ].
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4010
    classNames := classNames asArray sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4011
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4012
    box := self listBoxTitle:'select class to switch to:'
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4013
                      okText:'ok'
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4014
                        list:classNames.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4015
    box action:[:aString | self switchToClassNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4016
    box showAtPointer
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4017
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4018
    "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
  4019
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4020
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4021
switchToClassNamed:aString
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4022
    |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
  4023
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4024
    meta := false.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4025
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4026
    str := aString.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4027
    (aString endsWith:' class') ifTrue:[
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4028
        str := aString copyWithoutLast:6.
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4029
        meta := true
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4030
    ].
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4031
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4032
    theClass := self findClassNamed:str.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4033
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4034
    classCategoryListView notNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4035
        classCategoryListView list size == 0 ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4036
            classCategoryListView list:(self listOfAllClassCategories).
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4037
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4038
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4039
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4040
    theClass == currentClass ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4041
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4042
    theClass isBehavior ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4043
        classCategoryListView notNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4044
            currentClassHierarchy isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4045
                ((newCat := theClass category) ~= currentClassCategory) ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4046
                    currentClassCategory := newCat.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4047
                    newCat isNil ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4048
                        element := '* no category *'
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4049
                    ] ifFalse:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4050
                        element := newCat.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4051
                    ].
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4052
                    classCategoryListView setSelectElement:element.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4053
                    "/ classCategoryListView makeSelectionVisible.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4054
                ]
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4055
            ]
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4056
        ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4057
        self updateClassList.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4058
        self switchToClass:theClass.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4059
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4060
"/        (currentNamespace = '* all *'
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4061
"/        or:[currentNamespace ~= theClass nameSpace]) ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4062
"/            str := theClass name
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4063
"/        ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4064
"/            str := theClass nameWithoutPrefix
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4065
"/        ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4066
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4067
        l := classListView list.
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4068
        l notNil ifTrue:[
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4069
            idx := l findFirst:[:line | line withoutSpaces = str].
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4070
            classListView selection:idx.
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4071
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4072
"/            classListView setSelectElement:str.
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4073
        ].
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  4074
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4075
        self instanceProtocol:meta not.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4076
        idx ~~ 0 ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4077
            self classSelectionChanged.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4078
            classCategoryListView notNil ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4079
                classCategoryListView setSelectElement:theClass category
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4080
            ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4081
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4082
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4083
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4084
    "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
  4085
    "Modified: 17.6.1996 / 16:54:55 / stefan"
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4086
    "Modified: 3.1.1997 / 11:45:46 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4087
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4088
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4089
updateClassList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4090
    self updateClassListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4091
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4092
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4093
updateClassListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4094
    |classes oldClassName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4095
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  4096
    gotClassList == true ifTrue:[^ self].
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  4097
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4098
    classListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4099
        "
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4100
         refetch in case we are not up to date
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4101
        "
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4102
        (currentClass notNil and:[fullProtocol not]) ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4103
            oldClassName := currentClass name.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4104
            currentClass := self findClassNamed:oldClassName.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4105
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4106
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4107
        currentClassCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4108
            classes := self listOfAllClassesInCategory:currentClassCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4109
        ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4110
            currentClassHierarchy notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4111
                classes := self listOfClassHierarchyOf:currentClassHierarchy
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4112
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4113
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4114
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4115
        classListView list = classes ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4116
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4117
                classListView contents:classes
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4118
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4119
                classListView setContents:classes
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4120
            ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4121
            oldClassName notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4122
                classListView setContents:classes.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4123
                classListView setSelectElement:oldClassName
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4124
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4125
                variableListView notNil ifTrue:[variableListView contents:nil]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4126
            ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4127
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4128
            scroll ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4129
                fullProtocol ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4130
                    classListView scrollToBottom
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4131
                ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4132
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4133
        ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4134
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  4135
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  4136
    "Modified: 4.1.1997 / 19:57:38 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4137
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4138
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4139
!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
  4140
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
  4141
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
  4142
    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
  4143
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
  4144
    "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
  4145
    "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
  4146
!
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
  4147
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4148
classMethodFileOutAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4149
    "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
  4150
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4151
    |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
  4152
     fileBox|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4153
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4154
    append := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4155
    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
  4156
                        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
  4157
                        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
  4158
                        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
  4159
                        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
  4160
    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
  4161
    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
  4162
    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
  4163
        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
  4164
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4165
    fileBox showAtPointer.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4166
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4167
    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
  4168
        "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4169
         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
  4170
        "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4171
        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
  4172
            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
  4173
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4174
        append ifTrue:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4175
            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
  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
            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
  4178
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4179
        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
  4180
            ^ 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
  4181
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4182
        self withWaitCursorDo:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4183
            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
  4184
            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
  4185
                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
  4186
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4187
                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
  4188
                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
  4189
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4190
                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
  4191
                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
  4192
                    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
  4193
                ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4194
                    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
  4195
                    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
  4196
                        |box|
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4197
                        box := YesNoBox 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4198
                                    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
  4199
                                           , ex errorString 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4200
                                           , '\\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
  4201
                                    yesText:'continue' 
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4202
                                    noText:'abort'.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4203
                        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
  4204
                            ex proceed
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4205
                        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4206
                        self normalLabel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4207
                        ^ self
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4208
                    ] do:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4209
                        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
  4210
                    ]    
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4211
                ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4212
            ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4213
            outStream close.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4214
            self normalLabel.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4215
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4216
    ]
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
  4217
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4218
    "Modified: 17.6.1996 / 16:51:11 / stefan"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4219
    "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
  4220
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4221
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4222
classMethodMenu
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4223
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
587
74d27450aa79 added resource info
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
  4224
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4225
    |labels selectors shorties|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4226
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4227
    labels := #(
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4228
                                'fileOut'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4229
                                'fileOut all'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4230
                                'printOut'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4231
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4232
                                'browse'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4233
                                'spawn'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4234
                                'spawn class'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4235
                                'spawn full protocol'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4236
                                'spawn hierarchy'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4237
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4238
                                'senders ...'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4239
                                'implementors ...'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4240
                                'globals ...'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4241
"/                              '-'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4242
"/                              'breakpoint' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4243
"/                              'trace' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4244
"/                              'trace sender' 
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4245
                                '-'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4246
                                'remove'
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4247
               ).
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4248
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4249
    shorties := #(
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4250
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4251
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4252
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4253
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4254
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4255
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4256
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4257
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4258
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4259
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4260
                                #Cmds
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4261
                                #Cmdi
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4262
                                #Cmdg
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4263
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4264
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4265
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4266
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4267
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4268
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4269
               ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4270
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4271
    selectors := #(
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4272
                                methodFileOut
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4273
                                classMethodFileOutAll
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4274
                                methodPrintOut
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4275
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4276
                                classMethodBrowse
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4277
                                methodSpawn
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4278
                                classSpawn
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4279
                                classSpawnFullProtocol
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4280
                                classSpawnHierarchy
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4281
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4282
                                methodSenders
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4283
                                methodImplementors
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4284
                                methodGlobalReferends
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4285
"/                              nil
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4286
"/                              methodBreakPoint 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4287
"/                              methodTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4288
"/                              methodTraceSender
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4289
                                nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4290
                                methodRemove
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4291
                  ).
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4292
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4293
    ^ PopUpMenu 
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4294
        labels:(resources array:labels)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4295
        selectors:selectors
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4296
        accelerators:shorties
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4297
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4298
    "Modified: 10.7.1996 / 12:46:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4299
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4300
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4301
!BrowserView methodsFor:'class-method stuff'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4302
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4303
classFromClassMethodString:aString
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4304
    "helper for classMethod-list - extract class name from the string"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4305
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  4306
    |pos s|
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4307
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4308
    s := aString string withoutSpaces.
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4309
    (s endsWith:' !!') ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4310
        s := s copyWithoutLast:2
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4311
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4312
    (s endsWith:')') ifTrue:[
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4313
        s := aString copyTo:(aString lastIndexOf:$()-1.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4314
        s := s withoutSpaces.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4315
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4316
    (s endsWith:' !!') ifTrue:[
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4317
        s := s copyWithoutLast:2
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4318
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4319
    pos := s lastIndexOf:(Character space).
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4320
    ^ 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
  4321
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4322
    "Modified: 17.6.1996 / 17:06:59 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4323
    "Modified: 4.11.1996 / 23:56:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4324
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4325
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4326
classMethodSelection:lineNr
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4327
    "user clicked on a class/method line - show code"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4328
131
claus
parents: 130
diff changeset
  4329
    |cls string classString selectorString meta|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4330
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4331
    string := classMethodListView selectionValue string.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4332
    classString := self classFromClassMethodString:string.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4333
    selectorString := self selectorFromClassMethodString:string.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4334
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4335
    ((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
  4336
        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
  4337
        meta := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4338
    ] ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4339
        meta := false.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4340
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4341
    self switchToClass:(self findClassNamed:classString).
131
claus
parents: 130
diff changeset
  4342
    meta ifTrue:[cls := currentClass class] ifFalse:[cls := currentClass].
claus
parents: 130
diff changeset
  4343
    actualClass := acceptClass := cls.
129
claus
parents: 126
diff changeset
  4344
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4345
    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
  4346
        self warn:'oops class is gone'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4347
    ] ifFalse:[
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4348
        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
  4349
        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
  4350
        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
  4351
        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
  4352
            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
  4353
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4354
            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
  4355
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4356
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4357
        self methodSelectionChanged
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4358
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4359
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4360
    self setDoitActionForClass
131
claus
parents: 130
diff changeset
  4361
claus
parents: 130
diff changeset
  4362
    "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
  4363
    "Modified: 17.6.1996 / 16:51:28 / stefan"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4364
    "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
  4365
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4366
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4367
selectorFromClassMethodString:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4368
    "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
  4369
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4370
    |pos s|
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4371
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4372
    s := aString withoutSpaces.
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4373
    (s endsWith:' !!') ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4374
        s := s copyWithoutLast:2
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4375
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4376
    (s endsWith:')') ifTrue:[
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4377
        s := aString copyTo:(aString lastIndexOf:$()-1.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4378
        s := s withoutSpaces.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4379
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4380
    (s endsWith:' !!') ifTrue:[
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4381
        s := s copyWithoutLast:2
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  4382
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4383
    pos := s lastIndexOf:(Character space).
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  4384
    ^ 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
  4385
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  4386
    "Modified: 17.6.1996 / 17:04:38 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  4387
    "Modified: 4.11.1996 / 23:57:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4388
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4389
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4390
!BrowserView methodsFor:'event handling'!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4391
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4392
handlesKeyPress:key inView:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4393
    "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
  4394
     a keyPress in some other view ?"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4395
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4396
    <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
  4397
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4398
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4399
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4400
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4401
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4402
    view == classCategoryListView ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4403
        (key == #Find) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4404
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4405
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4406
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4407
    view == classListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4408
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4409
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4410
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4411
    view == methodCategoryListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4412
        (untranslatedKey == #Cmdn) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4413
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4414
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4415
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4416
    or:[view == classMethodListView]) ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4417
        (untranslatedKey == #Cmdi) ifTrue:[^ true].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4418
        (untranslatedKey == #Cmds) ifTrue:[^ true].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4419
        (untranslatedKey == #Cmdg) ifTrue:[^ true].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4420
        (untranslatedKey == #Cmdt) ifTrue:[^ true].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4421
        (untranslatedKey == #Cmda) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4422
    ].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4423
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4424
    ^ false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4425
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4426
    "Created: 2.3.1996 / 14:33:30 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4427
    "Modified: 27.10.1996 / 14:14:54 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4428
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4429
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4430
keyPress:key x:x y:y view:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4431
    "this method is reached via delegation from the classCategoryListView"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4432
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4433
    <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
  4434
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4435
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4436
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4437
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4438
    "/ have to untranslate (since we get #Inspect / #Search
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4439
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4440
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4441
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4442
    view == classCategoryListView ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4443
        (key == #Find) ifTrue:[^ self classCategoryFindClass].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4444
        (untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4445
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4446
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4447
    view == classListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4448
        (untranslatedKey == #Cmdn) ifTrue:[^ self classNewClass].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4449
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4450
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4451
    view == methodCategoryListView ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4452
        (untranslatedKey == #Cmdn) ifTrue:[^ self methodCategoryNewCategory].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4453
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4454
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4455
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  4456
    or:[view == classMethodListView]) ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4457
        (untranslatedKey == #Cmdi) ifTrue:[^ self methodImplementors].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4458
        (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
  4459
        (untranslatedKey == #Cmdg) ifTrue:[^ self methodGlobalReferends].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4460
        (untranslatedKey == #Cmdt) ifTrue:[^ self methodStringSearch].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  4461
        (untranslatedKey == #Cmda) ifTrue:[^ self methodAproposSearch].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4462
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4463
    view keyPress:key x:x y:y
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4464
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4465
    "Created: 2.3.1996 / 14:37:52 / cg"
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4466
    "Modified: 27.10.1996 / 14:14:44 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4467
! !
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4468
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4469
!BrowserView methodsFor:'help'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4470
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4471
helpTextFor:aComponent
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4472
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4473
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4474
    aComponent == classCategoryListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4475
        s := 'HELP_CCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4476
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4477
    aComponent == classListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4478
        fullProtocol ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4479
            s := 'HELP_PCLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4480
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4481
            currentClassHierarchy notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4482
                s := 'HELP_HCLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4483
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4484
                s := 'HELP_CLASS_LIST'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4485
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4486
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4487
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4488
    aComponent == methodCategoryListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4489
        s := 'HELP_MCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4490
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4491
    aComponent == methodListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4492
        s := 'HELP_METHOD_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4493
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4494
    aComponent == variableListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4495
        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
  4496
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4497
    aComponent == codeView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4498
        fullClass ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4499
            s := 'HELP_FULLCODE_VIEW'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4500
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4501
            s := 'HELP_CODE_VIEW'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4502
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4503
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4504
    (aComponent == instanceToggle 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4505
    or:[aComponent == classToggle]) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4506
        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
  4507
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4508
    aComponent == classMethodListView ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4509
        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
  4510
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4511
    s notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4512
        ^ resources string:s
105
claus
parents: 98
diff changeset
  4513
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4514
    ^ nil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4515
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4516
    "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
  4517
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4518
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4519
!BrowserView methodsFor:'initialize / release'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4520
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4521
autoSearch:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4522
    "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
  4523
     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
  4524
     search for the searchstring in the codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4525
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4526
    self setSearchPattern:aString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4527
    autoSearch := aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4528
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4529
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4530
destroy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4531
    "relese dependant - destroy popups"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4532
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4533
    Smalltalk removeDependent:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4534
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4535
        self releaseClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4536
        "/
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4537
        "/ 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
  4538
        "/ ... release refs to my class (not really needed)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4539
        "/
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4540
        currentClass := actualClass := acceptClass := nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4541
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4542
    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
  4543
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
  4544
    "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
  4545
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4546
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4547
initialize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4548
    super initialize.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4549
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4550
    showInstance := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4551
    fullClass := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4552
    fullProtocol := false.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  4553
    gotClassList := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4554
    aspect := nil.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4555
    currentNamespace := '* all *'.
149
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
    "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
  4558
    Smalltalk addDependent:self
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4559
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  4560
    "Modified: 4.1.1997 / 19:58:52 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4561
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4562
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4563
realize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4564
    |v checkBlock|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4565
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4566
    super realize.
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
    checkBlock := [:lineNr | self checkSelectionChangeAllowed].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4569
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4570
    v := classCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4571
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4572
        v action:[:lineNr | self classCategorySelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4573
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4574
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4575
        v list size == 0 ifTrue:[
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4576
            v list:(self listOfAllClassCategories).
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4577
        ].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4578
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4579
         tell classCategoryListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4580
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4581
        v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
107
claus
parents: 106
diff changeset
  4582
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4583
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4584
    v := classListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4585
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4586
        v action:[:lineNr | self classSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4587
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4588
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4589
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4590
         tell classListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4591
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4592
        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
  4593
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4594
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4595
    v := methodCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4596
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4597
        v action:[:lineNr | self methodCategorySelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4598
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4599
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4600
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4601
         tell methodCategoryListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4602
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4603
        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
  4604
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4605
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4606
    v := methodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4607
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4608
        v action:[:lineNr | self methodSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4609
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4610
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4611
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4612
         tell methodListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4613
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4614
        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
  4615
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4616
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4617
    v := classMethodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4618
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4619
        v action:[:lineNr | self classMethodSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4620
        v selectConditionBlock:checkBlock.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4621
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4622
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4623
         tell classMethodListView to ask for the menu
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4624
        "
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4625
        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
  4626
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4627
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4628
    v := variableListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4629
    v notNil ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4630
        v action:[:lineNr | self variableSelection:lineNr].
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4631
        v ignoreReselect:false.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4632
        v toggleSelect:true.
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4633
        v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
117
claus
parents: 114
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
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4637
     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
  4638
     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
  4639
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4640
    fullProtocol ifTrue:[
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4641
        classListView scrollToBottom.
123
claus
parents: 120
diff changeset
  4642
    ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4643
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  4644
    "Modified: 26.5.1996 / 15:59:13 / cg"
124
claus
parents: 123
diff changeset
  4645
!
claus
parents: 123
diff changeset
  4646
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4647
terminate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4648
    (self checkSelectionChangeAllowed) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4649
        super terminate
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4650
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4651
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4652
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4653
title:someString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4654
    myLabel := someString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4655
    self label:someString.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4656
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4657
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4658
!BrowserView methodsFor:'initialize subviews'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4659
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4660
createClassListViewIn:frame
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4661
    "setup the classlist subview, with its toggles"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4662
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4663
    |v panel spc|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4664
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4665
    self createTogglesIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4666
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4667
    panel := VariableVerticalPanel
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4668
                    origin:(0.0 @ 0.0) corner:(1.0 @ 1.0)
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4669
                    in:frame.
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4670
    styleSheet is3D ifTrue:[
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4671
        spc := ViewSpacing.
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4672
    ] ifFalse:[
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4673
        spc := 0
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  4674
    ].
811
fde69dbb949a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 810
diff changeset
  4675
    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
  4676
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4677
    v := HVScrollableView 
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4678
                for:SelectionInListView 
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  4679
                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
  4680
                in:panel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4681
    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
  4682
    classListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4683
    classListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4684
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4685
    v := ScrollableView for:SelectionInListView in:panel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4686
    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
  4687
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4688
    variableListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4689
    variableListView delegate:self.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4690
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4691
    "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
  4692
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4693
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4694
createCodeViewIn:aView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4695
    "setup the code view"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4696
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4697
    ^ self createCodeViewIn:aView atY:0.25
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4698
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4699
    "Modified: 2.3.1996 / 16:08:46 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4700
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4701
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4702
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
  4703
    "setup the code view"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4704
    |v|
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
    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
  4707
    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
  4708
    codeView := v scrolledView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4709
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4710
    "Created: 2.3.1996 / 16:09:03 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4711
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4712
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4713
createMethodListViewIn:aView atX:relX
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4714
    "setup the method list view"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4715
    |v|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4716
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4717
    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
  4718
    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
  4719
    methodListView := v scrolledView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4720
    methodListView delegate:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4721
    ^ v
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4722
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4723
    "Created: 2.3.1996 / 16:07:10 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4724
    "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
  4725
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4726
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4727
createTogglesIn:aFrame
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4728
    "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
  4729
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4730
    |h halfSpace classAction instanceAction|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4731
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4732
    classAction := [self instanceProtocol:false].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4733
    instanceAction := [self instanceProtocol:true].
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
    halfSpace := ViewSpacing // 2.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4736
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4737
    instanceToggle := Toggle label:(resources at:'instance') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  4738
    h := instanceToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4739
    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
  4740
    instanceToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4741
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4742
    instanceToggle turnOn.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4743
    instanceToggle pressAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4744
    instanceToggle releaseAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4745
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4746
    classToggle := Toggle label:(resources at:'class') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  4747
    h := classToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4748
    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
  4749
    classToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4750
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4751
    classToggle turnOff.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4752
    classToggle pressAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4753
    classToggle releaseAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4754
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4755
    styleSheet is3D ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4756
        instanceToggle bottomInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4757
        classToggle bottomInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4758
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4759
        instanceToggle leftInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4760
        classToggle leftInset:halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4761
        instanceToggle rightInset:ViewSpacing - halfSpace.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4762
        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
  4763
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4764
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4765
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4766
focusSequence
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4767
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4768
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4769
    s := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4770
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4771
    classCategoryListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4772
        s add:classCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4773
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4774
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4775
    classListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4776
        s add:classListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4777
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4778
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4779
"/    variableListView notNil ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4780
"/        s add:variableListView
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4781
"/    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4782
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4783
    instanceToggle notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4784
        s add:instanceToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4785
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4786
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4787
    methodCategoryListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4788
        s add:methodCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4789
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4790
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4791
    methodListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4792
        s add:methodListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4793
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4794
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4795
    classMethodListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  4796
        s add:classMethodListView
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4797
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4798
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4799
    s add:codeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4800
    ^ s
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4801
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4802
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4803
setupForAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4804
    "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
  4805
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4806
    |vpanel hpanel frame v spc nsHolder|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4807
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4808
    styleSheet is3D ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4809
        spc := ViewSpacing.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4810
    ] ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4811
        spc := 0
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4812
    ].
149
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 := 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
  4815
                  in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4816
    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
  4817
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4818
    v := HVScrollableView for:SelectionInListView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4819
                          miniScrollerH:true miniScrollerV:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4820
                          in:hpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4821
    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
  4822
    classCategoryListView := v scrolledView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4823
    classCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4824
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4825
    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
  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
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4828
    v bottomInset:(instanceToggle height + spc + instanceToggle borderWidth).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4829
    nsHolder := currentNamespace asValue.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4830
    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
  4831
    namespaceList topInset:(v bottomInset negated) + (spc // 2).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4832
    namespaceList bottomInset:(spc // 2).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4833
    namespaceList leftInset:(classCategoryListView originRelativeTo:v) x.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4834
"/    namespaceList rightInset:(classCategoryListView cornerRelativeTo:v) x.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4835
    self setListOfNamespaces.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4836
    namespaceList model:nsHolder.
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  4837
    namespaceList label menuHolder:self; menuMessage:#nameSpaceMenu.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4838
    nsHolder onChangeSend:#value
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4839
                       to:[
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4840
                                self changeNameSpaceTo:nsHolder value
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4841
                          ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4842
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4843
    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
  4844
    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
  4845
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4846
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4847
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4848
    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
  4849
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4850
    self createCodeViewIn:vpanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4851
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  4852
    "Modified: 4.1.1997 / 23:52:14 / cg"
149
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
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4855
setupForClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4856
    "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
  4857
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4858
    |vpanel hpanel frame v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4859
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4860
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4861
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4862
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4863
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4864
    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
  4865
    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
  4866
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4867
    self createTogglesIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4868
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4869
    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
  4870
    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
  4871
      extent:[frame width
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4872
              @
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4873
              (frame height 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4874
               - ViewSpacing
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4875
               - instanceToggle height
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4876
               - instanceToggle borderWidth
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4877
               + v borderWidth)].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4878
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4879
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4880
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4881
    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
  4882
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4883
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4884
    self switchToClass:aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4885
    actualClass := acceptClass := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4886
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4887
    self updateMethodList.
151
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  4888
    self updateCodeView.
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  4889
    self classDefinition.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4890
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4891
    "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
  4892
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4893
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4894
setupForClass:aClass methodCategory:aMethodCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4895
    "setup subviews to browse a method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4896
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4897
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4898
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4899
    vpanel := VariableVerticalPanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4900
                        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
  4901
                            in:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4902
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4903
    v := self createMethodListViewIn:vpanel atX:0.0.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4904
    v corner:(1.0 @ 0.25).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4905
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4906
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4907
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4908
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4909
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4910
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4911
    currentMethodCategory := aMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4912
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4913
    self updateCodeView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4914
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4915
    "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
  4916
!
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
setupForClass:aClass selector:selector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4919
    "setup subviews to browse a single method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4920
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4921
    |v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4922
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4923
    v := ScrollableView for:CodeView in:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4924
    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
  4925
    codeView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4926
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4927
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4928
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4929
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4930
    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
  4931
    currentMethod := actualClass compiledMethodAt:selector.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4932
    currentMethodCategory := currentMethod category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4933
    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
  4934
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
  4935
    "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
  4936
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4937
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4938
setupForClassCategory:aClassCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4939
    "setup subviews to browse a class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4940
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4941
    |vpanel hpanel frame v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4942
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4943
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4944
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4945
                                        in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4946
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4947
    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
  4948
    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
  4949
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4950
    self createClassListViewIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4951
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4952
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4953
    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
  4954
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4955
    methodCategoryListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4956
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4957
    self createMethodListViewIn:hpanel atX:0.66.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4958
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4959
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4960
    currentClassCategory := aClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4961
    self updateClassList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4962
    self updateMethodCategoryList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4963
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4964
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4965
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4966
    "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
  4967
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4968
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4969
setupForClassHierarchy:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4970
    "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
  4971
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4972
    |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
  4973
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4974
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4975
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4976
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4977
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4978
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4979
     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
  4980
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4981
    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
  4982
    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
  4983
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4984
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4985
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4986
    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
  4987
    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
  4988
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  4989
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4990
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4991
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4992
    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
  4993
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4994
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4995
    cls isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  4996
        cls := cls soleInstance
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4997
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4998
    currentClassHierarchy := currentClass := actualClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4999
    self updateClassList.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5000
    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
  5001
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5002
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5003
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5004
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5005
    aClass isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5006
        self instanceProtocol:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5007
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  5008
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5009
    "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
  5010
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5011
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5012
setupForClassList:aList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5013
    "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
  5014
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5015
    self setupForClassList:aList sort:true
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5016
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5017
    "Modified: 28.5.1996 / 13:53:03 / cg"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5018
!
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5019
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5020
setupForClassList:aList sort:doSort
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5021
    "setup subviews to browse classes from a list"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5022
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5023
    |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
  5024
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5025
    vpanel := VariableVerticalPanel 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5026
                 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
  5027
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5028
    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
  5029
    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
  5030
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5031
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5032
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5033
    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
  5034
    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
  5035
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5036
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5037
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5038
    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
  5039
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5040
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5041
    l := (aList collect:[:entry | 
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5042
                entry isBehavior ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5043
                    entry name
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5044
                ] ifFalse:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5045
                    entry
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5046
                ]]) asOrderedCollection.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5047
    doSort ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5048
        l sort.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5049
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5050
    classListView list:l.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  5051
    gotClassList := true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5052
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5053
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5054
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5055
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5056
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  5057
    "Created: 28.5.1996 / 13:52:47 / cg"
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  5058
    "Modified: 4.1.1997 / 19:45:30 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5059
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5060
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5061
setupForFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5062
    "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
  5063
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5064
    |vpanel hpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5065
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5066
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5067
                                    corner:(1.0 @ 1.0)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5068
                                        in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5069
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5070
    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
  5071
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5072
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5073
    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
  5074
    classCategoryListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5075
    classCategoryListView contents:(self listOfAllClassCategories).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5076
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5077
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5078
    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
  5079
    classListView := v scrolledView.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5080
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5081
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5082
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5083
    fullClass := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5084
    self updateCodeView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5085
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5086
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5087
setupForFullClassProtocol:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5088
    "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
  5089
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5090
    |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
  5091
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5092
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0)
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5093
                                    corner:(1.0 @ 1.0)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5094
                                        in:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5095
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5096
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5097
     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
  5098
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5099
    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
  5100
    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
  5101
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5102
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5103
    classListView multipleSelectOk:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5104
    classListView toggleSelect:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5105
    classListView strikeOut:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5106
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5107
    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
  5108
    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
  5109
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5110
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5111
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5112
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5113
    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
  5114
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5115
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5116
    cls isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5117
        cls := cls soleInstance
107
claus
parents: 106
diff changeset
  5118
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5119
    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
  5120
    fullProtocol := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5121
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5122
    self updateClassList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5123
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5124
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5125
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5126
    self updateVariableList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5127
    aClass isMeta ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5128
        self instanceProtocol:false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5129
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5130
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5131
    "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
  5132
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5133
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5134
setupForList:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5135
    "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
  5136
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5137
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5138
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5139
    vpanel := VariableVerticalPanel
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  5140
                        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
  5141
                        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
  5142
                            in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5143
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5144
    v := ScrollableView for:SelectionInListView in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5145
    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
  5146
    classMethodListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5147
    classMethodListView contents:aList.
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5148
    classMethodListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5149
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  5150
    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
  5151
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5152
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5153
    aList size == 1 ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  5154
        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
  5155
        self classMethodSelection:1. 
199
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
    self updateCodeView
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  5158
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  5159
    "Modified: 25.5.1996 / 12:26:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5160
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5161
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5162
!BrowserView methodsFor:'method category list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5163
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5164
methodCategoryCopyCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5165
    "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
  5166
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5167
    |title box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5168
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5169
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5170
        title := 'class to copy instance method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5171
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5172
        title := 'class to copy class method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5173
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5174
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5175
    box := self listBoxTitle:title 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5176
                      okText:'ok' 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5177
                        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
  5178
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5179
    box action:[:aString | self copyMethodsFromClass:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5180
    box showAtPointer
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5181
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5182
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5183
methodCategoryCreateAccessMethods
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5184
    "create access methods for instvars.
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5185
     If no variable is selected, for all instvars;
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5186
     otherwise for that selected instvar."
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5187
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5188
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5189
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5190
    showInstance ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5191
        self warn:'select instance - and try again'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5192
        ^ self.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5193
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5194
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5195
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5196
        |nm names source|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5197
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5198
        (variableListView notNil
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5199
        and:[(nm := variableListView selectionValue) notNil]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5200
            names := Array with:nm
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5201
        ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5202
            names := currentClass instVarNames 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5203
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5204
        names do:[:name |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5205
            "check, if method is not already present"
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5206
            (currentClass includesSelector:(name asSymbol)) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5207
                source := (name , '\    "return ' , name , '"\\    ^ ' , name) withCRs.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5208
                Compiler compile:source forClass:currentClass inCategory:'accessing'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5209
            ] ifTrue:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  5210
                Transcript showCR:'method ''', name , ''' already present'
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5211
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5212
            (currentClass includesSelector:((name , ':') asSymbol)) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5213
                source := (name , ':something\    "set ' , name , '"\\    ' , name , ' := something.') withCRs.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5214
                Compiler compile:source forClass:currentClass inCategory:'accessing'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5215
            ] ifTrue:[
547
3c4bebcb982b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 546
diff changeset
  5216
                Transcript showCR:'method ''', name , ':'' already present'
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5217
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5218
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5219
        self updateMethodCategoryListWithScroll:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5220
        self updateMethodListWithScroll:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5221
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5222
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  5223
    "Modified: 22.5.1996 / 13:36:59 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5224
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5225
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5226
methodCategoryCreateDocumentationMethods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5227
    "create empty documentation methods"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5228
120
claus
parents: 118
diff changeset
  5229
    |cls histStream|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5230
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5231
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5232
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5233
    cls := currentClass class.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5234
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5235
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5236
        |nm names source|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5237
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5238
        "/ add version method containing RCS template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5239
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5240
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5241
        (cls includesSelector:#version) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5242
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5243
'version
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  5244
    ^ ''$' , 'Header$''
120
claus
parents: 118
diff changeset
  5245
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5246
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5247
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5248
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5249
        "/ add documentation method containing doc template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5250
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5251
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5252
        (cls includesSelector:#documentation) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5253
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5254
'documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5255
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5256
    documentation to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5257
"
120
claus
parents: 118
diff changeset
  5258
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5259
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5260
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5261
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5262
        "/ add examples method containing examples template
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5263
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5264
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5265
        (cls includesSelector:#examples) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5266
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5267
'examples
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5268
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5269
    examples to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5270
"
120
claus
parents: 118
diff changeset
  5271
'                   forClass:cls 
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5272
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5273
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5274
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5275
        "/ add history method containing created-entry
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5276
        "/ but only if not already present.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5277
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5278
        (cls includesSelector:#history) ifFalse:[ 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5279
            histStream := ReadWriteStream on: String new.
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  5280
            histStream nextPutLine: 'history'.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5281
            HistoryLine isBehavior ifTrue:[ 
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  5282
                histStream nextPutLine: (HistoryLine newCreated printString).
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5283
            ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5284
                histStream cr.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5285
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5286
            Compiler compile:(histStream contents)
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5287
                    forClass:cls 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5288
                  inCategory:'documentation'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5289
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5290
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5291
        self instanceProtocol:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5292
        self switchToMethodNamed:#documentation 
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5293
"/        self updateMethodCategoryListWithScroll:false.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5294
"/        self updateMethodListWithScroll:false
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5295
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5296
852
7d4990a06c01 use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 848
diff changeset
  5297
    "Modified: 8.11.1996 / 23:53:09 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5298
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5299
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5300
methodCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5301
    "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
  5302
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5303
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5304
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5305
    self whenMethodCategorySelected:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5306
        self busyLabel:'saving: %1' with:currentClass name , '-' , currentMethodCategory.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5307
        Class fileOutErrorSignal handle:[:ex |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5308
            self warn:'cannot create: %1' with:ex parameter.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5309
            ex return.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5310
        ] do:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5311
            actualClass fileOutCategory:currentMethodCategory.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5312
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5313
        self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5314
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5315
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5316
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5317
methodCategoryFileOutAll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5318
    "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
  5319
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5320
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5321
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5322
    self whenMethodCategorySelected:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5323
        |fileName outStream|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5324
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5325
        fileName := currentMethodCategory , '.st'.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5326
        fileName replaceAll:Character space by:$_.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5327
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5328
         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
  5329
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5330
        Project notNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5331
            fileName := Project currentProjectDirectory , fileName.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5332
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5333
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5334
         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
  5335
        "
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5336
        fileName asFilename exists ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5337
            fileName asFilename copyTo:(fileName , '.sav')
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5338
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5339
        outStream := FileStream newFileNamed:fileName.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5340
        outStream isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5341
            ^ self warn:'cannot create: %1' with:fileName
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5342
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5343
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5344
        self busyLabel:'saving: ' with:currentMethodCategory.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5345
        Class fileOutErrorSignal handle:[:ex |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5346
            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
  5347
            ex return
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5348
        ] do:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5349
            Smalltalk allBehaviorsDo:[:class |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5350
                |hasMethodsInThisCategory|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5351
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5352
                hasMethodsInThisCategory := false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5353
                class methodDictionary do:[:method |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5354
                    method category = currentMethodCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5355
                        hasMethodsInThisCategory := true
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5356
                    ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5357
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5358
                hasMethodsInThisCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5359
                    class fileOutCategory:currentMethodCategory on:outStream.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5360
                    outStream cr
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5361
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5362
                hasMethodsInThisCategory := false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5363
                class class methodDictionary do:[:method |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5364
                    method category = currentMethodCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5365
                        hasMethodsInThisCategory := true
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5366
                    ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5367
                ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5368
                hasMethodsInThisCategory ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5369
                    class class fileOutCategory:currentMethodCategory on:outStream.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5370
                    outStream cr
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5371
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5372
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5373
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5374
        outStream close.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5375
        self normalLabel.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5376
    ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5377
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5378
    "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
  5379
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5380
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5381
methodCategoryFindAnyMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5382
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5383
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5384
    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
  5385
    box action:[:aString | self switchToAnyMethodNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5386
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5387
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5388
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5389
methodCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5390
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5391
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5392
    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
  5393
    box action:[:aString | self switchToMethodNamed:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5394
    box showAtPointer
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5395
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5396
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5397
methodCategoryMenu
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5398
    |labels selectors shorties i m|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5399
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5400
    currentClass isNil ifTrue:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5401
        methodCategoryListView flash.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5402
        ^ nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5403
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5404
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5405
    currentMethodCategory isNil ifTrue:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5406
        labels := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5407
                    'find method here ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5408
                    'find method ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5409
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5410
                    'new category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5411
                    'copy category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5412
                    'create access methods' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5413
                   ).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5414
        selectors := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5415
                    methodCategoryFindMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5416
                    methodCategoryFindAnyMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5417
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5418
                    methodCategoryNewCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5419
                    methodCategoryCopyCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5420
                    methodCategoryCreateAccessMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5421
                   ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5422
    ] ifFalse:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5423
        labels := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5424
                    'fileOut' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5425
                    'fileOut all' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5426
                    'printOut'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5427
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5428
                    'SPAWN_METHODCATEGORY'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5429
                    'spawn category'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5430
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5431
                    'find method here ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5432
                    'find method ...'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5433
                    '-'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5434
                    'new category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5435
                    'copy category ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5436
                    'create access methods' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5437
                    'rename ...' 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5438
                    'remove'
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5439
                   ).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5440
        selectors := #(
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5441
                    methodCategoryFileOut
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5442
                    methodCategoryFileOutAll
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5443
                    methodCategoryPrintOut
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5444
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5445
                    methodCategorySpawn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5446
                    methodCategorySpawnCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5447
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5448
                    methodCategoryFindMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5449
                    methodCategoryFindAnyMethod
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5450
                    nil
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5451
                    methodCategoryNewCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5452
                    methodCategoryCopyCategory
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5453
                    methodCategoryCreateAccessMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5454
                    methodCategoryRename
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5455
                    methodCategoryRemove
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5456
                   ).
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5457
    ].
199
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
    showInstance ifFalse:[
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5460
        labels := labels copy.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5461
        selectors := selectors copy.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5462
        i := labels indexOf:'create access methods'.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5463
        labels at:i put:'create documentation stubs'. 
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5464
        selectors at:i put:#methodCategoryCreateDocumentationMethods
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5465
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5466
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5467
    shorties := Array new:(selectors size).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5468
    (selectors includes:#methodCategoryNewCategory) ifTrue:[
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5469
        shorties at:(selectors indexOf:#methodCategoryNewCategory) put:#Cmdn
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5470
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5471
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5472
    m := PopUpMenu 
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5473
        labels:(resources array:labels)
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5474
        selectors:selectors
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5475
        accelerators:shorties.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5476
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5477
    currentClass isLoaded ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5478
        m disableAll:#(
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5479
                        methodCategoryNewCategory
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5480
                        methodCategoryCopyCategory
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5481
                        methodCategoryCreateAccessMethods
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5482
                      )
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5483
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5484
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5485
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5486
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5487
    "Modified: 3.1.1997 / 11:56:36 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5488
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5489
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5490
methodCategoryNewCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5491
    "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
  5492
     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
  5493
     useless typing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5494
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5495
    |someCategories existingCategories box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5496
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5497
    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
  5498
        someCategories := actualClass allCategories
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5499
    ] 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
  5500
        "
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
  5501
         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
  5502
        "
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
  5503
        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
  5504
            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
  5505
                                '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
  5506
                                '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
  5507
                                '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
  5508
                                '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
  5509
                                '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
  5510
                               )
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
  5511
        ] 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
  5512
            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
  5513
                                '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
  5514
                                '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
  5515
                                '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
  5516
                               ).
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
  5517
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5518
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5519
    someCategories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5520
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5521
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5522
     remove existing categories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5523
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5524
    existingCategories := methodCategoryListView list.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5525
    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
  5526
        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
  5527
    ].
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  5528
    someCategories := someCategories asSet asOrderedCollection sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5529
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5530
    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
  5531
                      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
  5532
                        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
  5533
    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
  5534
    box action:[:aString | self newMethodCategory:aString. lastCategory := aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5535
    box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5536
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  5537
    "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
  5538
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5539
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5540
methodCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5541
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5542
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5543
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5544
    self whenMethodCategorySelected:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5545
        printStream := Printer new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5546
        actualClass printOutCategory:currentMethodCategory on:printStream.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5547
        printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5548
    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5549
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5550
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5551
methodCategoryRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5552
    "show number of methods to remove and query user"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5553
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5554
    |t box sels count|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5555
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5556
    currentMethodCategory notNil ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5557
        sels := OrderedCollection new.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5558
        actualClass methodDictionary keysAndValuesDo:[:selector :aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5559
            (aMethod category = currentMethodCategory) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5560
                sels add:selector
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5561
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5562
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5563
        count := sels size.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5564
        (count ~~ 0) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5565
            (count == 1) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5566
                t := 'remove %1\(with 1 method) ?'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5567
            ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5568
                t := 'remove %1\(with %2 methods) ?'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5569
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5570
            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
  5571
            t := t withCRs.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5572
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5573
            box := YesNoBox 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5574
                       title:t
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5575
                       yesText:(resources at:'remove')
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5576
                       noText:(resources at:'abort').
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5577
            box confirm ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5578
                ^ self.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5579
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5580
            sels do:[:selector|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5581
                actualClass removeSelector:selector.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5582
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5583
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5584
        currentMethodCategory := nil.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5585
        currentMethod := currentSelector := nil.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5586
        self updateMethodCategoryListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5587
        self updateMethodList
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5588
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5589
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5590
    "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
  5591
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5592
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5593
methodCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5594
    "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
  5595
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5596
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5597
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5598
    self checkMethodCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5599
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5600
    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
  5601
                okText:(resources at:'rename').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5602
    box initialText:currentMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5603
    box action:[:aString | 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5604
        actualClass renameCategory:currentMethodCategory to:aString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5605
        currentMethodCategory := aString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5606
        currentMethod := currentSelector := nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5607
        self updateMethodCategoryList.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5608
        self updateMethodListWithScroll:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5609
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5610
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5611
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5612
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5613
methodCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5614
    "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
  5615
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5616
    currentMethodCategory notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5617
        self withWaitCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5618
            SystemBrowser browseClass:actualClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5619
                    methodCategory:currentMethodCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5620
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5621
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5622
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5623
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5624
methodCategorySpawnCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5625
    "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
  5626
     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
  5627
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5628
    self askAndBrowseMethodCategory:'category to browse methods:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5629
                             action:[:aString | 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5630
                                        SystemBrowser browseMethodCategory:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5631
                                    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5632
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5633
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5634
!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
  5635
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5636
checkMethodCategorySelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5637
    currentMethodCategory isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5638
        self warn:'select a method category first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5639
        ^ false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5640
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5641
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5642
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5643
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5644
copyMethodsFromClass:aClassName
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5645
    |class box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5646
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5647
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5648
        class := Smalltalk classNamed:aClassName.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5649
        class isBehavior ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5650
            self warn:'no class named %1' with:aClassName.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5651
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5652
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5653
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5654
        showInstance ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5655
            class := class class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5656
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5657
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5658
        "show enterbox for category to copy from"
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5659
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5660
        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
  5661
                           okText:'copy'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5662
        box action:[:aString | self copyMethodsFromClass:class category:aString].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5663
        box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5664
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5665
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5666
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5667
copyMethodsFromClass:class category:category
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5668
    currentClass notNil ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5669
        Object abortSignal catch:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5670
            class methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5671
                |source|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5672
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5673
                (category match:aMethod category) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5674
                    source := aMethod source.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5675
                    codeView contents:source.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5676
                    codeView modified:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5677
                    actualClass compilerClass
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5678
                         compile:source 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5679
                         forClass:actualClass 
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5680
                         inCategory:aMethod category
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5681
                         notifying:codeView.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5682
                    self updateMethodCategoryListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5683
                    self updateMethodListWithScroll:false.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5684
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5685
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5686
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5687
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5688
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5689
    "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
  5690
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5691
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5692
listOfAllMethodCategoriesInClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5693
    "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
  5694
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5695
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5696
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5697
    newList := Set new.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5698
    aClass methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5699
        |cat|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5700
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5701
        cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5702
        cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5703
            cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5704
        ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5705
        newList add:cat
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5706
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5707
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5708
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5709
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5710
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5711
    "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
  5712
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5713
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5714
listOfAllMethodCategoriesInFullProtocolHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5715
    "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
  5716
     and all of its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5717
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5718
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5719
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5720
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5721
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5722
    self classesInFullProtocolHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5723
        |cat|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5724
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5725
        c methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5726
            cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5727
            cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5728
                cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5729
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5730
            newList add:cat
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5731
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5732
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5733
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5734
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5735
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5736
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  5737
    "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
  5738
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5739
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5740
methodCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5741
    "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
  5742
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5743
    self switchToMethodCategory:(methodCategoryListView selectionValue string).
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5744
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  5745
    "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
  5746
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5747
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5748
methodCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5749
    "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
  5750
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5751
    self withWaitCursorDo:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5752
        currentMethod := currentSelector := nil.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5753
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5754
        self updateMethodList.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5755
        self updateCodeView.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5756
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5757
        currentMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5758
            methodCategoryListView setSelectElement:currentMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5759
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5760
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5761
        aspect isNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5762
            self setAcceptAndExplainActionsForMethod.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5763
        ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5764
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5765
"/ this is now done in
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5766
"/ #updateMethodList
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5767
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5768
"/        (variableListView notNil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5769
"/        and:[variableListView hasSelection]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5770
"/            self hilightMethodsInMethodCategoryList:false inMethodList:true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5771
"/        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5772
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5773
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5774
    "Created: 23.11.1995 / 14:17:38 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5775
    "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
  5776
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5777
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5778
newMethodCategory:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5779
    |categories|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5780
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5781
    currentClass isNil ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5782
        ^ 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
  5783
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5784
    categories := methodCategoryListView list.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5785
    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
  5786
    (categories includes:aString) ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5787
        categories add:aString.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5788
        categories sort.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5789
        methodCategoryListView contents:categories
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5790
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5791
    currentMethodCategory := aString.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5792
    aspect := nil.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5793
    self methodCategorySelectionChanged
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5794
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  5795
    "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
  5796
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5797
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5798
switchToMethodCategory:aCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5799
    |oldSelector|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5800
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5801
    oldSelector := currentSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5802
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5803
    aspect := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5804
    (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
  5805
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5806
    currentMethodCategory := aCategory.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5807
    self methodCategorySelectionChanged.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5808
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5809
    "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
  5810
    methodListView list size == 1 ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5811
        methodListView setSelection:1.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5812
        self methodSelection:1
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5813
    ] ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5814
      oldSelector notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5815
          methodListView setSelectElement:oldSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5816
          methodListView hasSelection ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5817
              self methodSelection:methodListView selection.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5818
          ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5819
      ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5820
    ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5821
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5822
    "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
  5823
    "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
  5824
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  5825
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5826
updateMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5827
    self updateMethodCategoryListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5828
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5829
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5830
updateMethodCategoryListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5831
    |categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5832
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5833
    methodCategoryListView notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5834
        fullProtocol ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5835
            currentClassHierarchy notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5836
                categories := self listOfAllMethodCategoriesInFullProtocolHierarchy:actualClass 
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5837
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5838
        ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5839
            currentClass notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5840
                categories := self listOfAllMethodCategoriesInClass:actualClass
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5841
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5842
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5843
        methodCategoryListView list = categories ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5844
            scroll ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5845
                methodCategoryListView contents:categories
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5846
            ] ifFalse:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5847
                methodCategoryListView setContents:categories
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5848
            ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5849
            currentMethodCategory notNil ifTrue:[
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5850
                methodCategoryListView setSelectElement:currentMethodCategory
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5851
            ]
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5852
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5853
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5854
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5855
    "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
  5856
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5857
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5858
whenMethodCategorySelected:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5859
    self checkMethodCategorySelected ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  5860
        self withWaitCursorDo:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5861
    ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5862
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5863
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5864
!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
  5865
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5866
commonTraceHelperWith:aSelector
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  5867
    "install a break/trace or countPoint for the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  5868
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5869
    currentMethod := MessageTracer perform:aSelector with:currentMethod.
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5870
"/    self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5871
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5872
"/    (currentMethod notNil and:[currentMethod isWrapped not]) ifTrue:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5873
        Class withoutUpdatingChangesDo:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5874
            currentClass changed:#methodDictionary with:currentSelector.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5875
        ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5876
"/    ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5877
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5878
    "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
  5879
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5880
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5881
commonTraceHelperWith:aSelector with:argument
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5882
    "install a break/trace or countPoint for the current method"
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5883
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5884
    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
  5885
"/    self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5886
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5887
"/    (currentMethod notNil and:[currentMethod isWrapped not]) ifTrue:[
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5888
        Class withoutUpdatingChangesDo:[
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5889
            currentClass changed:#methodDictionary with:currentSelector.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5890
        ]
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5891
"/    ]
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  5892
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5893
    "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
  5894
    "Modified: 22.10.1996 / 21:24:52 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5895
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5896
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5897
methodAproposSearch
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5898
    "launch an enterBox for a keyword search"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5899
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5900
    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
  5901
                  openWith:#aproposSearch:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5902
                isSelector:true
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  5903
                searchArea:#class
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  5904
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  5905
    "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
  5906
!
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
methodBreakPoint
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5909
    "set a breakpoint on the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5910
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5911
    self commonTraceHelperWith:#trapMethod:
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5912
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  5913
    "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
  5914
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5915
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5916
methodBreakPointInProcess
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5917
    "set a breakpoint on the current method, which only triggers if
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5918
     executed by some particular process."
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5919
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5920
    |processes processNames box|
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5921
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5922
    processes := ProcessorScheduler knownProcesses asOrderedCollection.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5923
    processes := processes select:[:aProcess |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5924
                        aProcess notNil 
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5925
                        and:[aProcess id notNil]
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5926
                 ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5927
    processes := processes sort:[:a :b | a id < b id].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5928
    processNames := processes collect:[:aProcess |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5929
                        aProcess id printString , ' -> ' , aProcess nameOrId
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5930
                    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5931
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5932
    "/ let user specify which one ...
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5933
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5934
    box := ListSelectionBox new.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5935
    box noEnterField.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5936
    box list:processNames.
766
40cc3873c426 box title
Claus Gittinger <cg@exept.de>
parents: 764
diff changeset
  5937
    box label:'process selection'.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5938
    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
  5939
    box action:[:selection |
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5940
        self commonTraceHelperWith:#trapMethod:inProcess: 
757
e11e8984a976 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 756
diff changeset
  5941
                              with:(processes at:box selectionIndex)
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5942
    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5943
    box showAtPointer.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5944
    box destroy
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5945
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5946
    "Created: 14.10.1996 / 15:40:53 / cg"
766
40cc3873c426 box title
Claus Gittinger <cg@exept.de>
parents: 764
diff changeset
  5947
    "Modified: 15.10.1996 / 12:51:28 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5948
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  5949
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5950
methodChangeCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5951
    "move the current method into another category -
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5952
     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
  5953
     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
  5954
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5955
    |box txt|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5956
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5957
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5958
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5959
    actualClass isNil ifTrue:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5960
        box := self enterBoxTitle:'' okText:'change'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5961
    ] ifFalse:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5962
        |someCategories|
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5963
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5964
        someCategories := actualClass categories sort.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5965
        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
  5966
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5967
    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
  5968
    lastMethodCategory isNil ifTrue:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5969
        txt := currentMethod category.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5970
    ] ifFalse:[
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5971
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5972
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5973
    box initialText:txt.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5974
    box action:[:aString |
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5975
                    |method|
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5976
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5977
                    lastMethodCategory := aString.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5978
                    method := currentMethod.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5979
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5980
                    method category:aString asSymbol.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5981
                    actualClass changed.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5982
                    method changed:#category.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5983
                    actualClass addChangeRecordForMethodCategory:method category:aString.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5984
                    self updateMethodCategoryListWithScroll:false.
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5985
                    self updateMethodListWithScroll:false
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5986
               ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5987
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5988
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5989
    "Created: 29.10.1995 / 19:59:22 / cg"
567
4bf089a6b667 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 561
diff changeset
  5990
    "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
  5991
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5992
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5993
methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5994
    "compare with previous version"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5995
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5996
    |prev v|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5997
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5998
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  5999
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6000
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6001
    prev isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6002
        self warn:'oops - previous version is gone'.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6003
        ^ self
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6004
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6005
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6006
    v := DiffTextView 
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6007
        openOn:codeView contents
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6008
        label:(resources string:'code here')
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6009
        and:prev source
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6010
        label:'previous version'.      
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6011
    v label:'comparing ' , currentMethod whoString.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6012
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6013
    "Modified: 7.11.1996 / 18:53:55 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6014
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6015
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6016
methodDecompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6017
    "decompile the current methods bytecodes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6018
     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
  6019
     avaliable with the system."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6020
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6021
    |s|
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6022
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6023
    self checkMethodSelected ifFalse:[^ self].
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6024
    self checkSelectionChangeAllowed ifFalse:[^ self].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6025
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6026
    s := '' writeStream.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6027
    (currentMethod decompileTo:s) ifFalse:[
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6028
        self warn:'No decompiler available'.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6029
    ].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6030
    codeView contents:s contents.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6031
    codeView modified:false.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6032
    codeView acceptAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6033
    codeView explainAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6034
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  6035
    "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
  6036
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6037
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6038
methodFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6039
    "file out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6040
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6041
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6042
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6043
    self busyLabel:'saving:' with:currentSelector.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6044
    Class fileOutErrorSignal handle:[:ex |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6045
        self warn:'cannot create: %1' with:ex parameter.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6046
        ex return
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6047
    ] do:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6048
        actualClass fileOutMethod:currentMethod.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6049
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6050
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6051
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6052
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6053
methodGlobalReferends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6054
    "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
  6055
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6056
    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
  6057
                  openWith:#browseReferendsOf:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6058
                isSelector:false
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6059
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6060
"/    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
  6061
"/                         action:[:aString | 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6062
"/                                    SystemBrowser browseReferendsOf:aString asSymbol
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6063
"/                                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6064
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6065
    "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
  6066
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6067
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6068
methodImplementors
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6069
    "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
  6070
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6071
    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
  6072
                  openWith:#browseImplementorsOf:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6073
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6074
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6075
    "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
  6076
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6077
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6078
methodInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6079
    "inspect  the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6080
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6081
    self checkMethodSelected ifFalse:[^ self].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6082
    currentMethod inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6083
"/    (actualClass compiledMethodAt:currentSelector) inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6084
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6085
    "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
  6086
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6087
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6088
methodLocalSuperSends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6089
    "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
  6090
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6091
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6092
    self withSearchCursorDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6093
        SystemBrowser browseSuperCallsUnder:currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6094
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6095
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6096
    "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
  6097
    "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
  6098
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6099
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
  6100
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
  6101
    "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
  6102
     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
  6103
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
  6104
    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
  6105
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
  6106
    "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
  6107
!
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
  6108
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6109
methodMakePrivate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6110
    "make the current method private.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6111
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6112
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6113
    self methodPrivacy:#private 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6114
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6115
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6116
methodMakeProtected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6117
    "make the current method protected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6118
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6119
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6120
    self methodPrivacy:#protected 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6121
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6122
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6123
methodMakePublic
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6124
    "make the current method public.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6125
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6126
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6127
    self methodPrivacy:#public 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6128
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6129
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6130
methodMenu
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6131
    "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
  6132
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6133
    <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
  6134
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6135
    |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
  6136
     newLabels newSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6137
     mthdLabels mthdSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6138
     brkLabels brkSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6139
     fileLabels fileSelectors
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6140
     searchLabels searchSelectors searchShorties
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6141
     sepLocalLabels sepLocalSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6142
     localSearchLabels localSearchSelectors|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6143
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6144
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6145
        currentMethod isWrapped ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6146
            (MessageTracer isCountingMemoryUsage:currentMethod) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6147
                brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6148
                                    '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6149
                                    'stop mem usage' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6150
                              ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6151
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6152
                brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6153
                                    nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6154
                                    methodStopMemoryUsage
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
            ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6157
                (MessageTracer isCounting:currentMethod) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6158
                    brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6159
                                        '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6160
                                        'stop counting' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6161
                                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6162
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6163
                    brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6164
                                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6165
                                        methodStopCounting
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6166
                                     )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6167
                ] ifFalse:[
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6168
                    (MessageTracer isTiming:currentMethod) ifTrue:[
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6169
                        brkLabels := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6170
                                            '-'
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6171
                                            'stop timing' 
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6172
                                      ).
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6173
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6174
                        brkSelectors := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6175
                                            nil
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6176
                                            methodStopTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6177
                                         )
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6178
                    ] ifFalse:[
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6179
                        brkLabels := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6180
                                            '-'
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6181
                                            'remove break/trace' 
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6182
                                      ).
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6183
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6184
                        brkSelectors := #(
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6185
                                            nil
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6186
                                            methodRemoveBreakOrTrace
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6187
                                         )
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6188
                    ]
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6189
                ]
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
        ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6192
            brkLabels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6193
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6194
                                'breakpoint' 
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  6195
                                'breakpoint in ...' 
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6196
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6197
                                'trace' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6198
                                'trace sender' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6199
                                'trace full walkback' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6200
                                '-'
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6201
                                'start timing'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6202
                                'start counting'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6203
                                'start mem usage'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6204
                          ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6205
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6206
            brkSelectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6207
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6208
                                methodBreakPoint
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  6209
                                methodBreakPointInProcess
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6210
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6211
                                methodTrace
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6212
                                methodTraceSender
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6213
                                methodTraceFull
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6214
                                nil
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6215
                                methodStartTiming
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6216
                                methodStartCounting
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6217
                                methodStartMemoryUsage
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6218
                             )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6219
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6220
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6221
        Method methodPrivacySupported ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6222
            labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6223
                            'inspect method'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6224
                            'compile to machine code'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6225
                            'decompile'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6226
                            '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6227
                            'make public'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6228
                            'make private'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6229
                            'make protected'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6230
                            'make ignored'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6231
                       ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6232
            selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6233
                            methodInspect
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6234
                            methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6235
                            methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6236
                            nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6237
                            methodMakePublic
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6238
                            methodMakePrivate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6239
                            methodMakeProtected
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6240
                            methodMakeIgnored
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6241
                          )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6242
        ] ifFalse:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6243
            labels := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6244
                            'inspect method'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6245
                            'compile to machine code'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6246
                            'decompile'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6247
                       ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6248
            selectors := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6249
                            methodInspect
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6250
                            methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6251
                            methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6252
                          )
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6253
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6254
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6255
        labels := labels , brkLabels.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6256
        selectors := selectors , brkSelectors.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6257
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6258
        specialMenu := PopUpMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6259
                            labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6260
                            selectors:selectors.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6261
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6262
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6263
    device ctrlDown ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6264
        currentMethod isNil ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6265
            methodListView flash.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6266
            ^ nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6267
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6268
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6269
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6270
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6271
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6272
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6273
    sepLocalLabels := sepLocalSelectors := #().
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6274
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6275
    searchLabels := #(
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6276
                                'senders ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6277
                                'implementors ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6278
                                'globals ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6279
                                'string search ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6280
                                'apropos ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6281
                    ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6282
    searchSelectors := #(
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6283
                                methodSenders
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6284
                                methodImplementors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6285
                                methodGlobalReferends
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6286
                                methodStringSearch
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6287
                                methodAproposSearch
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6288
                        ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6289
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6290
    searchShorties := #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6291
                                Cmds
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6292
                                Cmdi
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6293
                                Cmdg
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6294
                                Cmdt
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6295
                                Cmda
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6296
                       ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6297
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6298
"/    currentClass notNil ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6299
"/        localSearchLabels := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6300
"/                                '-'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6301
"/                                'local senders ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6302
"/                                'local implementors ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6303
"/                                'local super sends ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6304
"/                                'local string search ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6305
"/                                'local apropos ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6306
"/                            ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6307
"/        localSearchSelectors := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6308
"/                                nil
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6309
"/                                methodLocalSenders
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6310
"/                                methodLocalImplementors
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6311
"/                                methodLocalSuperSends
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6312
"/                                methodLocalStringSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6313
"/                                methodLocalAproposSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6314
"/                              ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6315
"/    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6316
"/        localSearchLabels := localSearchSelectors := #()
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6317
"/    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6318
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6319
    currentMethodCategory notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6320
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6321
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6322
        newLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6323
                                'new method' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6324
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6325
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6326
        newSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6327
                                methodNewMethod
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6328
                             ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6329
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6330
        newLabels := newSelectors := #()
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6331
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6332
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6333
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6334
        fileLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6335
                                'fileOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6336
                                'printOut'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6337
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6338
                                'SPAWN_METHOD'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6339
                                '-'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6340
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6341
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6342
        fileSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6343
                                methodFileOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6344
                                methodPrintOut
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6345
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6346
                                methodSpawn
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6347
                                nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6348
                             ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6349
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6350
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6351
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6352
        mthdLabels :=           #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6353
                                'change category ...' 
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6354
                                'move ...'
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6355
                                'remove'
842
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
                                'compare with previous'
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6358
                                'back to previous'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6359
                                ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6360
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6361
        mthdSelectors :=    #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6362
                                methodChangeCategory
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6363
                                methodMove
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6364
                                methodRemove
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6365
                                nil
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6366
                                methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6367
                                methodPreviousVersion
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6368
                             ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6369
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6370
    ] ifFalse:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6371
        fileLabels := fileSelectors := #().
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6372
        mthdLabels := mthdSelectors := #().
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6373
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6374
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6375
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6376
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6377
    labels :=
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6378
                fileLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6379
                searchLabels ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6380
"/                localSearchLabels ,
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6381
                sepLocalLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6382
                newLabels ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6383
                mthdLabels.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6384
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6385
    selectors :=
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6386
                fileSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6387
                searchSelectors ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6388
"/                localSearchSelectors ,
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6389
                sepLocalSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6390
                newSelectors ,
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6391
                mthdSelectors .
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6392
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6393
    shorties := (Array new:(fileSelectors size))
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6394
                , searchShorties
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6395
                , (Array new:(localSearchSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6396
                              + sepLocalSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6397
                              + newSelectors size
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6398
                              + mthdSelectors size)).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6399
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6400
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6401
    specialMenu notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6402
        labels := labels , #(
543
6e4b59eda69a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
  6403
                        '='
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  6404
                        'others'
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6405
                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6406
        selectors := selectors , #(
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6407
                        nil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6408
                        #otherMenu
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6409
                  ).
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6410
        shorties := shorties , #( nil #'Ctrl')
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6411
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6412
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6413
    m := PopUpMenu
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6414
         labels:(resources array:labels)
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6415
         selectors:selectors
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6416
         accelerators:shorties.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6417
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6418
    specialMenu notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6419
        m subMenuAt:#otherMenu put:specialMenu.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6420
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  6421
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6422
    currentMethod notNil ifTrue:[
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6423
        currentMethod isPrivate ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6424
            m disable:#methodMakePrivate
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6425
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6426
        currentMethod isProtected ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6427
            m disable:#methodMakeProtected
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6428
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6429
        currentMethod isPublic ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6430
            m disable:#methodMakePublic
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6431
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6432
        currentMethod isIgnored ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6433
            m disable:#methodMakeIgnored
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6434
        ].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6435
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6436
        (currentMethod code notNil
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6437
        or:[Compiler canCreateMachineCode not]) ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6438
            m disable:#methodSTCCompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6439
        ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6440
        currentMethod byteCode isNil ifTrue:[
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6441
            m disable:#methodDecompile
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6442
        ].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6443
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6444
        currentMethod previousVersion isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6445
            m disable:#methodPreviousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6446
            m disable:#methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6447
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6448
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6449
    ^ m
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6450
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6451
    "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
  6452
    "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
  6453
    "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
  6454
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6455
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6456
methodMove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6457
    "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
  6458
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6459
    |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
  6460
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6461
    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
  6462
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6463
    (initial := lastMethodMoveClass) isNil ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6464
        (sup := currentClass superclass) notNil ifTrue:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6465
            initial := sup name
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6466
        ] ifFalse:[
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6467
            initial := nil.
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6468
        ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6469
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6470
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6471
    newClassName := Dialog 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6472
                    request:'move current method to which class:'
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6473
                    initialAnswer:initial
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6474
                    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
  6475
    newClassName isNil ifTrue:[^ self].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6476
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6477
    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
  6478
    newClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6479
        self warn:'no such class'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6480
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6481
    ].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6482
    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
  6483
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6484
    showInstance ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6485
        newClass isMeta ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6486
            newClass := newClass class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6487
        ]
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6488
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6489
    (newClass compile:(currentMethod source) classified:currentMethodCategory) isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6490
        self warn:'not moved - compilation failed due'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6491
        ^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6492
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6493
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6494
    self methodRemove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6495
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  6496
    "Created: 13.12.1995 / 10:56:42 / cg"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  6497
    "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
  6498
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6499
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6500
methodNewMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6501
    "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
  6502
     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
  6503
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6504
    currentClass isNil ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6505
        ^ 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
  6506
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6507
    currentMethodCategory isNil ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6508
        ^ 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
  6509
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6510
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6511
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6512
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6513
    methodListView setSelection:nil.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6514
    codeView contents:(self methodTemplate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6515
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6516
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6517
    self setAcceptAndExplainActionsForMethod.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6518
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  6519
    "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
  6520
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6521
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6522
methodPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6523
    "switch back to the previous version
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6524
     (undo last change)"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6525
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6526
    |cls sel prev|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6527
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6528
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6529
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6530
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6531
    prev isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6532
        self warn:'oops - previous version is gone'.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6533
        ^ self
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6534
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6535
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6536
    cls := currentMethod containingClass.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6537
    cls notNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6538
        sel := actualClass selectorAtMethod:currentMethod.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6539
        sel isNil ifTrue:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6540
            self warn:'oops - cannot find methods selector (gone)'
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6541
        ] ifFalse:[        
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6542
            cls basicAddSelector:sel withMethod:prev.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6543
            currentMethod := prev.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6544
            self updateCodeView
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6545
        ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6546
    ] ifFalse:[
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6547
        self warn:'oops - cannot find containing class'
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6548
    ]
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6549
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6550
    "Modified: 7.11.1996 / 18:51:09 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6551
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  6552
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6553
methodPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6554
    "print out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6555
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6556
    |printStream|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6557
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6558
    self checkMethodSelected ifFalse:[^ self].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6559
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6560
    printStream := Printer new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6561
    actualClass printOutSource:(currentMethod source) on:printStream.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6562
    printStream close
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6563
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6564
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6565
methodPrivacy:how
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6566
    "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
  6567
     EXPERIMENTAL"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6568
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6569
    |cls m|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6570
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6571
    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
  6572
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6573
    m := currentMethod.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6574
    m isWrapped ifTrue:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6575
        m := m originalMethod
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6576
    ].
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6577
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6578
    (how == m privacy ) ifFalse:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6579
        m privacy:how.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6580
        cls := currentMethod containingClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6581
        cls notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6582
            cls addChangeRecordForMethodPrivacy:currentMethod.
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6583
        ] ifFalse:[
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6584
            self warn:'cannot write change record (no class)'
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6585
        ].
795
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6586
"/        self updateMethodListWithScroll:false keepSelection:true.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6587
        Class withoutUpdatingChangesDo:[
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6588
            currentClass changed:#methodDictionary with:currentSelector.
6f24c4b8e04a update for privacy/wrapping changes fixed.
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  6589
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6590
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6591
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6592
    "Created: 29.10.1995 / 20:00:00 / cg"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6593
    "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
  6594
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6595
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6596
methodRemove
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6597
    "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
  6598
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6599
    |cls sel|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6600
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6601
    self checkMethodSelected ifFalse:[^ self].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6602
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6603
    cls := currentMethod containingClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6604
    cls notNil ifTrue:[
625
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6605
        sel := actualClass selectorAtMethod:currentMethod.
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6606
        sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6607
            cls removeSelector:sel
625
072915402b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  6608
        ].
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6609
        currentMethod := currentSelector := nil.
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6610
        self updateMethodListWithScroll:false
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6611
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6612
        self warn:'cannot remove method (no class)'
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6613
    ]
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6614
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6615
    "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
  6616
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6617
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6618
methodRemoveBreakOrTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6619
    "turn off tracing of the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6620
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6621
    (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6622
        self commonTraceHelperWith:#unwrapMethod:
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6623
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6624
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6625
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6626
methodSTCCompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6627
    "compile the current method to machine code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6628
     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
  6629
     the demo version."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6630
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6631
    |prev|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6632
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6633
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6634
    prev := Compiler stcCompilation:#always.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6635
    [
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6636
        codeView accept.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6637
    ] valueNowOrOnUnwindDo:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6638
        Compiler stcCompilation:prev
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6639
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6640
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6641
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6642
methodSenders
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6643
    "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
  6644
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6645
    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
  6646
                  openWith:#browseAllCallsOn:in:
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6647
                isSelector:true
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6648
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  6649
    "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
  6650
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6651
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6652
methodSpawn
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6653
    "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
  6654
     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
  6655
     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
  6656
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6657
    |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
  6658
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6659
    classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6660
        s := classMethodListView selectionValue string.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6661
        clsName := self classFromClassMethodString:s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6662
        sel := self selectorFromClassMethodString:s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6663
        isMeta := false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6664
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6665
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6666
    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6667
        clsName := c.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6668
        sel := s.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6669
        isMeta := m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6670
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6671
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6672
    (sel notNil and:[clsName notNil]) ifTrue:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6673
        (clsName knownAsSymbol and:[sel knownAsSymbol]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6674
            clsSymbol := clsName asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6675
            (Smalltalk includesKey:clsSymbol) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6676
                cls := Smalltalk at:clsSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6677
                isMeta ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6678
                    cls := cls class
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6679
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6680
                cls isBehavior ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6681
                    cls := cls class
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6682
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6683
                cls isBehavior ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6684
                    selSymbol := sel asSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6685
                    self withWaitCursorDo:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6686
                        (cls includesSelector:selSymbol) ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6687
                            cls := cls class.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6688
                        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6689
                        (cls includesSelector:selSymbol) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6690
                            SystemBrowser browseClass:cls selector:selSymbol.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6691
                            ^ self
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6692
                        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6693
                        w := ' does not implement #' , sel
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6694
                    ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6695
                ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6696
                    w := ' is not a class'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6697
                ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6698
            ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6699
                w := ' is unknown'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6700
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6701
        ] ifFalse:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6702
            w := ' and/or ' , sel , ' are unknown'
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6703
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6704
        self warn:(clsName , w).
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6705
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6706
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6707
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6708
    self checkMethodSelected ifFalse:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6709
        self warn:'select a method first'.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6710
        ^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6711
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6712
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6713
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6714
        w := currentMethod who.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6715
        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
  6716
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6717
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6718
    "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
  6719
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6720
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6721
methodStartCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6722
    "set a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6723
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6724
    self commonTraceHelperWith:#countMethod:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6725
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6726
    "Modified: 15.12.1995 / 10:53:59 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6727
    "Created: 15.12.1995 / 11:00:44 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6728
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6729
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6730
methodStartMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6731
    "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
  6732
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6733
    self commonTraceHelperWith:#countMemoryUsageOfMethod:
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6734
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6735
    "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
  6736
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6737
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6738
methodStartTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6739
    "set a timing on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6740
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6741
    self commonTraceHelperWith:#timeMethod:
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6742
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6743
    "Modified: 15.12.1995 / 10:53:59 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6744
    "Created: 17.6.1996 / 17:12:06 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6745
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6746
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6747
methodStopCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6748
    "show the number of invocations & remove a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6749
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6750
"/    self information:'called ' , (MessageTracer executionCountOfMethod:currentMethod) printString , ' times.'.
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6751
    self commonTraceHelperWith:#stopCountingMethod:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6752
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6753
    "Created: 15.12.1995 / 11:03:22 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6754
    "Modified: 15.12.1995 / 17:13:05 / cg"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6755
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6756
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6757
methodStopMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6758
    "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
  6759
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6760
"/    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
  6761
    self commonTraceHelperWith:#stopCountingMemoryUsageOfMethod:
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6762
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6763
    "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
  6764
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  6765
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6766
methodStopTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6767
    "show the execution times on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6768
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6769
"/    self information:'called ' , (MessageTracer executionCountOfMethod:currentMethod) printString , ' times.'.
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6770
    self commonTraceHelperWith:#stopTimingMethod:
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6771
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6772
    "Modified: 15.12.1995 / 17:13:05 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6773
    "Created: 17.6.1996 / 17:12:27 / cg"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6774
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  6775
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6776
methodStringSearch
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6777
    "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
  6778
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6779
    self 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6780
        askForSearchTitle:'string to search for in sources:' 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6781
        openWith:#browseForString:in:
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6782
        isSelector:true
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6783
        searchArea:#class
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6784
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  6785
    "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
  6786
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6787
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6788
methodTrace
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6789
    "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
  6790
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6791
    self commonTraceHelperWith:#traceMethod:
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6792
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6793
    "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
  6794
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6795
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6796
methodTraceFull
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6797
    "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
  6798
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6799
    self commonTraceHelperWith:#traceMethodFull:
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6800
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6801
    "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
  6802
    "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
  6803
!
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  6804
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6805
methodTraceSender
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6806
    "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
  6807
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6808
    self commonTraceHelperWith:#traceMethodSender:
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  6809
308
920ebf8d011e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
  6810
    "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
  6811
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6812
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6813
!BrowserView methodsFor:'method stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6814
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6815
checkMethodSelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6816
    currentMethod isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6817
        self warn:'select a method first'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6818
        ^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6819
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6820
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6821
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6822
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6823
listEntryForMethod:aMethod selector:selector
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6824
    "answer a method list entry 
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6825
     (gimmic: adding a little image to breakPointed methods)"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6826
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6827
    |s icn|
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6828
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6829
    s := aMethod printStringForBrowserWithSelector:selector.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6830
    aMethod isWrapped ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6831
        (s endsWith:' !!') ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6832
            s := s copyWithoutLast:2
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6833
        ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6834
        (MessageTracer isTrapped:aMethod) ifTrue:[
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6835
            icn := self stopIcon
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6836
        ] ifFalse:[
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6837
            icn := self traceIcon
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6838
        ].
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6839
        ^ LabelAndIcon icon:icn string:s
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6840
    ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6841
    ^ s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6842
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6843
    "Created: 22.10.1996 / 19:51:00 / cg"
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  6844
    "Modified: 9.11.1996 / 19:49:49 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6845
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6846
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6847
listOfAllSelectorsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6848
    "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
  6849
     of the argument, aClass and its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6850
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6851
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6852
    |newList otherSelectors allCategories|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6853
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6854
    newList := Set new.
611
f3e973ecc846 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
  6855
    otherSelectors := IdentitySet new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6856
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6857
    allCategories := (aCategory = '* all *').
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6858
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6859
    self classesInFullProtocolHierarchy:aClass do:[:c |
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6860
        |searchCategory|
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6861
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6862
        (aCategory = '* no category *') ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6863
            searchCategory := nil
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6864
        ] ifFalse:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6865
            searchCategory := aCategory
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6866
        ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6867
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6868
        c methodDictionary keysAndValuesDo:[:selector :aMethod |
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6869
            (allCategories
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6870
             or:[aMethod category = searchCategory]) ifTrue:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6871
                (otherSelectors includes:selector) ifFalse:[
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6872
                    newList add:(self listEntryForMethod:aMethod selector:selector)
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6873
                ].
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6874
            ] ifFalse:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6875
                otherSelectors add:selector
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6876
            ]
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  6877
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6878
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6879
    (newList size == 0) ifTrue:[^ nil].
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6880
    ^ newList asOrderedCollection sort:[:a :b | a string < b string]
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6881
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6882
    "Modified: 5.6.1996 / 11:40:25 / stefan"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6883
    "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
  6884
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6885
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6886
listOfAllSelectorsInCategory:aCategory ofClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6887
    "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
  6888
     of the argument, aClass"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6889
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6890
    |newList searchCategory all|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6891
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6892
    all := (aCategory = '* all *').
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6893
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6894
    (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
  6895
        searchCategory := nil
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6896
    ] ifFalse:[
480
c1b167926f12 ask method to present itself in methodList (for alien codeObjects)
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
  6897
        searchCategory := aCategory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6898
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6899
    newList := OrderedCollection new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6900
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6901
    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
  6902
        (all or:[aMethod category = searchCategory]) ifTrue:[
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6903
            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
  6904
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6905
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6906
    (newList size == 0) ifTrue:[^ nil].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6907
    ^ 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
  6908
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6909
    "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
  6910
    "Modified: 5.6.1996 / 11:42:51 / stefan"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  6911
    "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
  6912
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6913
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6914
methodSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6915
    "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
  6916
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6917
    self switchToMethod:(methodListView selectionValue string).
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6918
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6919
    "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
  6920
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6921
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6922
methodSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6923
    "method selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6924
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6925
    self withWaitCursorDo:[
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6926
        |index cls|
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6927
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6928
        aspect := nil.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6929
        self updateCodeView.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6930
        (currentMethod notNil and:[MessageTracer isCounting:currentMethod]) ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6931
            self updateMethodListWithScroll:false.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6932
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6933
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6934
        self setAcceptAndExplainActionsForMethod.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6935
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6936
        "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6937
         if there is any autoSearch string, do the search
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6938
        "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6939
        autoSearch notNil ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6940
            codeView searchFwd:autoSearch startingAtLine:1 col:0 ifAbsent:[]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6941
        ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6942
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6943
        fullProtocol ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6944
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6945
             remove any bold attribute from classList
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6946
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6947
            1 to:classListView list size do:[:i |
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6948
                classListView attributeAt:i remove:#bold.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6949
            ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6950
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6951
             boldify the class where this method is implemented
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6952
            "
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6953
            currentMethod notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6954
                cls := currentMethod containingClass.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6955
                index := classListView list indexOf:(cls name).
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6956
                (index == 0 
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6957
                 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
  6958
                 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
  6959
                    index := classListView list indexOf:(cls name copyWithoutLast:6).
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6960
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6961
                index ~~ 0 ifTrue:[
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6962
                    classListView attributeAt:index add:#bold.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6963
                ].
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6964
                currentClass := acceptClass := cls.
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6965
            ]
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6966
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6967
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6968
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6969
    "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
  6970
    "Modified: 17.6.1996 / 16:47:50 / stefan"
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  6971
    "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
  6972
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6973
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6974
methodTemplate
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6975
    "return a method definition template"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6976
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6977
    ^ 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6978
'message selector and argument names
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6979
    "comment stating purpose of this message"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6980
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6981
    |temporaries|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6982
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6983
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6984
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6985
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6986
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6987
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6988
     optional: comment giving example use
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6989
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6990
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6991
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6992
 change above template into real code.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6993
 Then `accept'' either via the menu 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6994
 or via the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6995
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6996
 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
  6997
 select any existing methods code, change it,
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6998
 and finally `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  6999
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7000
 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
  7001
 and install it with `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7002
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7003
'
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7004
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7005
    "Modified: 8.2.1996 / 13:45:58 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7006
    "Created: 8.2.1996 / 18:21:53 / cg"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7007
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7008
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7009
switchToAnyMethodNamed:matchString
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7010
    "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
  7011
     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
  7012
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  7013
    |aSelector classToStartSearch classToSearch aClass nm idx|
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7014
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7015
    actualClass isNil ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7016
        currentClassHierarchy notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7017
            classToStartSearch := currentClassHierarchy
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7018
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7019
    ] ifFalse:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7020
        classToStartSearch := actualClass 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7021
    ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7022
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7023
    classToStartSearch notNil ifTrue:[
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7024
"/        showInstance ifFalse:[
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7025
"/            classToStartSearch := classToStartSearch class
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7026
"/        ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7027
        ((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7028
            classToSearch := classToStartSearch.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7029
            aClass := nil.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7030
            [classToSearch notNil and:[aClass isNil]] whileTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7031
                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
  7032
                aSelector notNil ifTrue:[
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7033
                    aClass := classToSearch
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  7034
                ] ifFalse:[
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  7035
                    classToSearch := classToSearch superclass
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7036
                ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7037
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7038
        ] ifFalse:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7039
            aSelector := matchString asSymbolIfInterned.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7040
            aSelector notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7041
                aClass := classToStartSearch whichClassIncludesSelector:aSelector.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7042
            ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7043
        ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7044
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7045
        aClass notNil ifTrue:[
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7046
            nm := aClass name.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7047
"/            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
  7048
"/                ((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
  7049
"/                    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
  7050
"/                ]
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7051
"/            ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7052
            aClass ~~ actualClass ifTrue:[
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7053
                self switchToClassNamed:nm.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7054
            ].    
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7055
            self switchToMethodNamed:aSelector "matchString".
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7056
            ^ self.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7057
        ]
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7058
    ].
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7059
    self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7060
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7061
    "Modified: 17.6.1996 / 16:52:36 / stefan"
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  7062
    "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
  7063
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7064
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7065
switchToMethod:aString
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7066
    "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
  7067
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7068
    |selectorString selectorSymbol|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7069
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7070
    (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
  7071
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7072
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7073
     kludge: extract real selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7074
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7075
    selectorString := aString withoutSpaces upTo:(Character space).
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7076
    selectorSymbol := selectorString asSymbolIfInterned.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7077
    selectorSymbol isNil ifTrue:[
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7078
        self beep.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7079
        ^ self
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7080
    ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7081
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7082
    fullProtocol ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7083
        currentMethod := currentSelector := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7084
        "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7085
         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
  7086
        "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7087
        self classesInFullProtocolHierarchy:actualClass do:[:c |
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7088
            (currentMethod isNil 
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7089
             and:[c includesSelector:selectorSymbol]) ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7090
                currentSelector := selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7091
                currentMethod := c compiledMethodAt:selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7092
                acceptClass := c
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7093
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7094
        ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7095
    ] ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7096
        currentSelector := selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7097
        currentMethod := actualClass compiledMethodAt:selectorSymbol.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7098
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7099
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7100
    methodCategoryListView notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7101
        currentMethod notNil ifTrue:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7102
            (currentMethodCategory = currentMethod category) ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7103
                currentMethodCategory := currentMethod category.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7104
                methodCategoryListView setSelectElement:currentMethodCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7105
            ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7106
        ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7107
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7108
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7109
    self methodSelectionChanged
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7110
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7111
    "Created: 4.6.1996 / 23:00:12 / cg"
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  7112
    "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
  7113
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7114
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7115
switchToMethodNamed:matchString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7116
    "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
  7117
     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
  7118
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7119
    |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
  7120
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7121
    currentClass notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7122
        classToSearch := actualClass.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7123
        dict := classToSearch methodDictionary.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7124
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7125
        ((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7126
            aSelector := dict findFirstKey:[:element | matchString match:element].       
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7127
            aSelector notNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7128
                method := dict at:aSelector.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7129
            ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7130
        ] ifFalse:[
650
bb426452251e Fix #switchToMethodNamed: -- select name in methodListView.
Stefan Vogel <sv@exept.de>
parents: 637
diff changeset
  7131
            aSelector := matchString.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7132
            method := dict at:matchString ifAbsent:[]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7133
        ].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7134
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7135
        method notNil ifTrue:[
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7136
            cat := method category.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7137
            cat isNil ifTrue:[cat := '* all *'].
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7138
            methodCategoryListView setSelectElement:cat.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7139
            currentMethodCategory := cat.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7140
            self updateMethodCategoryListWithScroll:false.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7141
            self methodCategorySelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7142
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7143
            currentMethod := method.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  7144
            currentSelector := aSelector.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7145
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7146
            m := aSelector , '*(*)'.
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7147
            idx := methodListView list findFirst:[:line |
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7148
                                                line = aSelector
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7149
                                                or:[m match:line]].
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7150
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  7151
            methodListView setSelection:idx. "/ setSelectElement:aSelector.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7152
            self methodSelectionChanged.
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7153
            ^ self
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7154
        ]
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  7155
    ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7156
    self beep.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  7157
650
bb426452251e Fix #switchToMethodNamed: -- select name in methodListView.
Stefan Vogel <sv@exept.de>
parents: 637
diff changeset
  7158
    "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
  7159
    "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
  7160
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7161
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7162
updateMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7163
    self updateMethodListWithScroll:true keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7164
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7165
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7166
updateMethodListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7167
    self updateMethodListWithScroll:scroll keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7168
!
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
updateMethodListWithScroll:scroll keepSelection:keep
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7171
    |selectors scr first last selection|
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7174
    methodListView notNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7175
        selection := methodListView selection.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7176
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7177
        currentMethodCategory notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7178
            fullProtocol ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7179
                selectors := self listOfAllSelectorsInCategory:currentMethodCategory 
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7180
                                inFullProtocolHierarchyOfClass:actualClass
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7181
            ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7182
                selectors := self listOfAllSelectorsInCategory:currentMethodCategory
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7183
                                                       ofClass:actualClass
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7184
            ]
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7185
        ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7186
        scr := scroll.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7187
        first := methodListView firstLineShown.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7188
        first ~~ 1 ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7189
            last := methodListView lastLineShown.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7190
            selectors size <= (last - first + 1) ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7191
                scr := true
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7192
            ]
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7193
        ].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7194
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7195
        scr ifTrue:[
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7196
            methodListView list: "contents:" selectors
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7197
        ] ifFalse:[
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7198
            methodListView setList: "setContents:" selectors
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  7199
        ].
802
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7200
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7201
        (variableListView notNil 
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7202
        and:[variableListView hasSelection]) ifTrue:[
802
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7203
            self hilightMethodsInMethodList.
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7204
        ].
da3f109853ba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  7205
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7206
        keep ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7207
            methodListView setSelection:selection.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7208
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7209
    ]
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  7210
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  7211
    "Modified: 18.12.1995 / 22:54:04 / stefan"
805
02ab612cc30d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 802
diff changeset
  7212
    "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
  7213
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7214
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7215
!BrowserView methodsFor:'misc'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7216
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7217
instanceProtocol:aBoolean
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7218
    "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
  7219
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7220
    |onToggle offToggle|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7221
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7222
    showInstance ~~ aBoolean ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7223
        self checkSelectionChangeAllowed ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7224
            instanceToggle notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7225
                aBoolean ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7226
                    offToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7227
                    onToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7228
                ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7229
                    onToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7230
                    offToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7231
                ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7232
                onToggle turnOn.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7233
                offToggle turnOff.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7234
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7235
            showInstance := aBoolean.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7236
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7237
            (variableListView notNil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7238
            and:[variableListView hasSelection]) ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7239
                self unhilightMethodCategories.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7240
                self unhilightMethods.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7241
                variableListView setSelection:nil
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7242
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7243
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7244
            fullProtocol ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7245
                showInstance ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7246
                    actualClass := currentClassHierarchy.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7247
                ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7248
                    actualClass := currentClassHierarchy class.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7249
                ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7250
                acceptClass := actualClass.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7251
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7252
                self updateClassList.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7253
                self updateMethodCategoryListWithScroll:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7254
                self updateMethodListWithScroll:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7255
                self updateVariableList.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7256
                ^ self
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7257
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7258
            currentClass notNil ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7259
                self classSelectionChanged
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7260
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7261
            codeView modified:false.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7262
        ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7263
            aBoolean ifTrue:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7264
                onToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7265
                offToggle := instanceToggle
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7266
            ] ifFalse:[
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7267
                offToggle := classToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7268
                onToggle := instanceToggle.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7269
            ].
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7270
            onToggle turnOn.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7271
            offToggle turnOff.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7272
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7273
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7274
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7275
    "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
  7276
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7277
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7278
processName
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7279
    "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
  7280
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7281
    ^ 'System Browser'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7282
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7283
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7284
showActivity:someMessage
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7285
    "some activityNotification to be forwarded to the user;
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7286
     show it in the windows title area here."
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7287
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7288
    self busyLabel:someMessage with:nil
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7289
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7290
    "Created: 16.12.1995 / 18:41:37 / cg"
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  7291
    "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
  7292
!
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  7293
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7294
updateCodeView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7295
    |code|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7296
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7297
    aspect == #hierarchy ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7298
        ^ self classHierarchy
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7299
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7300
    aspect == #classInstVars ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7301
        ^ self classClassInstVars
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7302
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7303
    aspect == #comment ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7304
        ^ self classComment
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7305
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7306
    aspect == #primitiveDefinitions ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7307
        ^ self classPrimitiveDefinitions
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7308
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7309
    aspect == #primitiveFunctions ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7310
        ^ self classPrimitiveFunctions
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7311
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7312
    aspect == #primitiveVariables ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7313
        ^ self classPrimitiveVariables
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7314
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7315
    aspect == #revisionInfo ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7316
        ^ self classRevisionInfo
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7317
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7318
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7319
    fullClass ifTrue:[
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7320
        currentClass notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7321
            code := currentClass source.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7322
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7323
    ] ifFalse:[
441
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7324
        aspect == #definition ifTrue:[
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7325
            ^ self classDefinition
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7326
        ].
fe36c7fece30 oops - fullClass browser always displayed definition only
Claus Gittinger <cg@exept.de>
parents: 439
diff changeset
  7327
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7328
        currentMethod notNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7329
            (codeView acceptAction isNil
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7330
            and:[actualClass notNil 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7331
            and:[currentMethodCategory notNil]]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7332
                self setAcceptAndExplainActionsForMethod.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7333
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7334
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7335
            code := currentMethod source.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7336
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7337
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7338
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7339
    codeView contents:code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7340
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7341
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7342
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7343
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7344
    "Created: 23.11.1995 / 14:16:43 / cg"
442
30b20fd70dd5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
  7345
    "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
  7346
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7347
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7348
!BrowserView methodsFor:'namespace menu'!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7349
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7350
nameSpaceMenu
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7351
    |labels selectors|
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7352
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7353
    labels := #('new namespace').
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7354
    selectors := #(nameSpaceNewNameSpace).
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7355
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7356
    (currentNamespace notNil
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7357
    and:[currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7358
    and:[currentNamespace ~= '* all *']]) ifTrue:[
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7359
        "/ is it all empty ?
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7360
        currentNamespace allClasses isEmpty ifTrue:[
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7361
            labels := #('new namespace' '-' 'remove').
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7362
            selectors := #(nameSpaceNewNameSpace nil nameSpaceRemove).
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7363
        ]
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7364
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7365
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7366
    ^ PopUpMenu
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7367
        labels:(resources array:labels)
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7368
        selectors:selectors
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7369
        receiver:self.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7370
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7371
    "Created: 4.1.1997 / 23:51:38 / cg"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7372
    "Modified: 4.1.1997 / 23:57:26 / cg"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7373
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7374
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7375
nameSpaceNewNameSpace
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7376
    "create a namespace-definition prototype in codeview"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7377
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7378
    self classClassDefinitionTemplateFor:nil in:nil namespace:true private:false.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7379
    aspect := nil.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7380
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7381
    "Modified: 23.12.1996 / 12:47:06 / cg"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7382
    "Created: 23.12.1996 / 13:11:48 / cg"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7383
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7384
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7385
nameSpaceRemove
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7386
    "remove that nameSpace - but only if its empty"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7387
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7388
    (currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7389
    and:[currentNamespace allClasses isEmpty]) ifTrue:[
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7390
        self withWaitCursorDo:[
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7391
            Smalltalk removeClass:currentNamespace.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7392
            allNamespaces := nil.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7393
            self setListOfNamespaces.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7394
            self changeNameSpaceTo:'* all *'.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7395
            namespaceList contents:'* all *'
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7396
        ]
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7397
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7398
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7399
    "Modified: 5.1.1997 / 00:10:05 / cg"
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7400
! !
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  7401
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7402
!BrowserView methodsFor:'private'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7403
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7404
askAndBrowseMethodCategory:title action:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7405
    "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
  7406
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7407
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7408
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7409
    box := self enterBoxTitle:title okText:'browse'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7410
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7411
    sel isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7412
        currentMethodCategory notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7413
            sel := currentMethodCategory
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7414
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7415
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7416
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7417
        box initialText:(sel asString withoutSpaces)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7418
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7419
    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
  7420
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7421
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7422
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7423
askForMethodCategory
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7424
    |someCategories box txt retVal|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7425
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7426
    someCategories := actualClass categories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7427
    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
  7428
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7429
    lastMethodCategory isNil ifTrue:[
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7430
        txt := 'new methods'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7431
    ] ifFalse:[
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7432
        txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7433
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7434
    box initialText:txt.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7435
    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
  7436
    box showAtPointer.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7437
    ^ retVal
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7438
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  7439
    "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
  7440
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7441
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7442
askForSearchSelectorTitle:title openWith:aSelector
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7443
    "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
  7444
     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
  7445
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7446
    ^ self 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7447
        askForSearchTitle:title 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7448
        openWith:aSelector 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7449
        isSelector:true
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7450
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7451
    "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
  7452
!
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7453
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7454
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
  7455
    "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
  7456
     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
  7457
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7458
    ^ self
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7459
        askForSearchTitle:title 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7460
        openWith:aSelector 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7461
        isSelector:isSelector 
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7462
        searchArea:#everywhere
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7463
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7464
    "Modified: 11.11.1996 / 12:42:46 / cg"
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7465
!
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7466
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7467
askForSearchTitle:title openWith:aSelector isSelector:isSelector searchArea:whereDefault
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7468
    "convenient method: setup enterBox with text from codeView or selected
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7469
     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
  7470
     SearchArea may be one of #everywhere, #classCategory, #class or #classHierarchy"
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7471
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  7472
    |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
  7473
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7474
    isSelector ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7475
        selectorHolder := (self selectorToSearchFor) asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7476
    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7477
        selectorHolder := (self stringToSearchFor) asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7478
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7479
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7480
    box := Dialog new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7481
    (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
  7482
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7483
    (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
  7484
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7485
    (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
  7486
        box addHorizontalLine.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7487
        box addVerticalSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7488
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7489
        (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
  7490
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7491
        panel := VerticalPanelView "HorizontalPanelView" new.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7492
        panel horizontalLayout:#fitSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7493
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7494
        grp := RadioButtonGroup new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7495
        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
  7496
        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
  7497
        box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7498
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7499
        currentClassCategory notNil ifTrue:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7500
            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
  7501
            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
  7502
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7503
        ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7504
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7505
        currentClass notNil ifTrue:[
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7506
            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
  7507
            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
  7508
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7509
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7510
            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
  7511
            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
  7512
            box makeTabable:b.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7513
        ].
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7514
        whereDefault notNil ifTrue:[
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7515
            where := (#(everywhere classCategory class classHierarchy)
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7516
                      indexOf:whereDefault).
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7517
            where == 0 ifTrue:[where := 1].
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7518
        ] ifFalse:[
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7519
            where := 1.
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7520
        ].
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7521
        grp value:where.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7522
        whereChannel := grp valueChannel.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7523
        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
  7524
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7525
        box addVerticalSpace.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7526
        box addHorizontalLine.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7527
    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7528
        whereChannel := 1 asValue.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7529
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7530
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7531
    box addAbortButton.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  7532
    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
  7533
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7534
    box label:'Search'.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7535
    box open.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7536
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7537
    box accepted ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7538
        sel := selectorHolder value.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7539
        where := whereChannel value.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7540
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7541
        where == 1 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7542
            classes := Smalltalk allClasses.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7543
        ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7544
            where == 2 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7545
                classes := Smalltalk allClassesInCategory:currentClassCategory
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7546
            ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7547
                where == 3 ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7548
                    classes := Array with:currentClass
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7549
                ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7550
                    classes := currentClass withAllSubclasses
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7551
                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7552
            ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7553
        ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7554
        self withSearchCursorDo:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7555
            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
  7556
        ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7557
    ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7558
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7559
    "Created: 11.11.1996 / 12:42:14 / cg"
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7560
    "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
  7561
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7562
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7563
busyLabel:what with:someArgument
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7564
    "set the title for some warning"
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
    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
  7567
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7568
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7569
checkSelectionChangeAllowed
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7570
    "return true, if selection change is ok;
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7571
     its not ok, if code has been changed.
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7572
     in this case, return the result of a user query"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7573
857
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7574
    |what m src1 src2 v|
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7575
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7576
    codeView modified ifFalse:[
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7577
        ^ true
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7578
    ].
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  7579
387
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7580
    (currentMethod notNil and:[actualClass notNil]) ifTrue:[
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7581
        self withWaitCursorDo:[
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7582
            m := actualClass compiledMethodAt:currentSelector.
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7583
            m notNil ifTrue:[
857
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7584
                (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
  7585
                    (src1 asCollectionOfLines collect:[:line | line withoutTrailingSeparators])
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7586
                    =
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7587
                    (src2 asCollectionOfLines collect:[:line | line withoutTrailingSeparators])
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7588
                    ifFalse:[
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7589
                        what := self checkSelectionChangeAllowedWithCompare:true.
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7590
                        what == #compare ifTrue:[
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7591
                            v := DiffTextView 
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7592
                                    openOn:src2 
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7593
                                    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
  7594
                                    and:src1 
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7595
                                    label:(resources string:'methods actual code').
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7596
                            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
  7597
                            ^ false
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7598
                        ].
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7599
                        ^ what
431
830e2211ec00 restore label after createContainer
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
  7600
                    ].
857
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7601
                ].
fd1c26c79d18 try better compare, before asking about changed windowContents
Claus Gittinger <cg@exept.de>
parents: 856
diff changeset
  7602
                ^ true
387
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7603
            ]
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  7604
        ]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7605
    ].
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7606
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7607
    ^ self checkSelectionChangeAllowedWithCompare:false
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7608
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7609
    "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
  7610
    "Modified: 10.11.1996 / 18:14:31 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7611
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  7612
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7613
checkSelectionChangeAllowedWithCompare:compareOffered
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7614
    "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
  7615
     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
  7616
     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
  7617
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7618
    |action labels values|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7619
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7620
    codeView modified ifFalse:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7621
        ^ true
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7622
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7623
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7624
    compareOffered ifTrue:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7625
        labels := #('cancel' 'compare' 'accept' 'continue').
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7626
        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
  7627
    ] ifFalse:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7628
        labels := #('cancel' 'accept' 'continue').
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7629
        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
  7630
    ].
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7631
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7632
    action := OptionBox 
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7633
                  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
  7634
                  label:(resources string:'Attention')
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7635
                  form:(WarningBox iconBitmap)
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7636
                  buttonLabels:(resources array:labels)
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7637
                  values:values
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7638
                  default:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7639
    action ~~ #accept ifTrue:[
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7640
        ^ action
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7641
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7642
    codeView accept. 
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7643
    ^ true
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7644
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7645
    "Created: 24.11.1995 / 10:54:46 / cg"
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  7646
    "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
  7647
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  7648
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7649
classHierarchyOf:aClass level:level do:aBlock using:aDictionary removeFrom:remainSet
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7650
    "evaluate the 2-arg block for every subclass of aClass,
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7651
     passing class and nesting level to the block."
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7652
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7653
    |names subclasses|
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7654
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7655
    remainSet remove:aClass ifAbsent:[].
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7656
    aBlock value:aClass value:level.
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7657
    subclasses := aDictionary at:aClass ifAbsent:[nil].
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7658
    (subclasses size == 0) ifFalse:[
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7659
        names := subclasses collect:[:class | class name].
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7660
        names sortWith:subclasses.
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7661
        subclasses do:[:aSubClass |
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7662
            self classHierarchyOf:aSubClass 
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7663
                            level:(level + 1) 
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7664
                               do:aBlock 
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7665
                            using:aDictionary
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7666
                       removeFrom:remainSet
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7667
        ]
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7668
    ]
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7669
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7670
    "Created: 20.12.1996 / 17:05:06 / cg"
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7671
    "Modified: 20.12.1996 / 17:53:47 / cg"
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7672
!
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7673
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7674
classHierarchyOf:topClass withAutoloaded:withAutoloaded do:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7675
    "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
  7676
     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
  7677
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7678
    |classes s classDict l remaining|
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
    classes := IdentitySet new.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7681
    self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7682
        aNamespace allClasses do:[:aClass |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7683
            aClass isMeta ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7684
                classes addAll:(aClass withAllSuperclasses).
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
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7688
    classDict := IdentityDictionary new:classes size.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7689
    classes do:[:aClass |
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7690
        s := aClass superclass.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7691
        s notNil ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7692
            l := classDict at:s ifAbsent:[nil].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7693
            l isNil ifTrue:[
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7694
                l := OrderedCollection new:5.
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7695
                classDict at:s put:l
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7696
            ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7697
            l add:aClass
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7698
        ]
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7699
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7700
    remaining := classes.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7701
    self classHierarchyOf:topClass level:0 do:aBlock using:classDict removeFrom:remaining.
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7702
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7703
    withAutoloaded ifTrue:[
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7704
        (remaining includes:Autoload) ifTrue:[
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7705
            self classHierarchyOf:Autoload level:0 do:aBlock using:classDict removeFrom:remaining.
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7706
        ].
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7707
        (remaining asSortedCollection:[:a :b | a name < b name]) do:[:aNilSubclass |
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7708
            aBlock value:aNilSubclass value:0
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7709
        ]
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7710
    ].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7711
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  7712
    "Created: 28.5.1996 / 13:46:23 / cg"
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  7713
    "Modified: 4.1.1997 / 13:37:03 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7714
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7715
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7716
classesInFullProtocolHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7717
    "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
  7718
     the hierarchy"
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
    |index|
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
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7723
    aClass withAllSuperclasses do:[:c |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7724
        (classListView isInSelection:index) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7725
            aBlock value:c
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7726
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7727
        index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7728
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7729
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7730
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7731
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7732
classesInHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7733
    |index|
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
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7736
    aClass withAllSuperclasses do:[:c |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7737
        (classListView isInSelection:index) ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7738
            aBlock value:c
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7739
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7740
        index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7741
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7742
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7743
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7744
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7745
compileCode:someCode
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7746
    (ReadStream on:someCode) fileIn
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
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7749
displayedClassNameOf:aClass
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7750
    |owner nm ns|
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7751
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7752
    nm := aClass nameWithoutNameSpacePrefix.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7753
    owner := aClass topOwningClass.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7754
    owner notNil ifTrue:[
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7755
        ns := owner nameSpace.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7756
    ] ifFalse:[
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7757
        ns := aClass nameSpace.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7758
    ].
890
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7759
    ns isNil ifTrue:[
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7760
        ^ nm
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7761
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7762
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7763
    currentNamespace = '* all *' ifTrue:[
890
da8b66193d6c checkin from browser
ca
parents: 889
diff changeset
  7764
        (ns == Smalltalk) ifTrue:[
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7765
            ^ nm
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7766
        ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7767
        ^ ns name , '::' , nm   "/ full name
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7768
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7769
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7770
    "/ is it in one of the selected namespaces ?
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7771
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7772
    (self findClassNamedInNameSpace:nm) isNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7773
        ^ ns name , '::' , nm   "/ full name
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7774
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7775
    currentNamespace = ns ifFalse:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7776
        ^ ns name , '::' , nm   "/ full name
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7777
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7778
    ^ nm.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7779
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7780
    "Created: 20.12.1996 / 17:46:41 / cg"
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7781
    "Modified: 3.1.1997 / 19:28:07 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7782
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7783
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7784
enterBoxForBrowseTitle:title action:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7785
    "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
  7786
     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
  7787
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7788
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7789
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7790
    box := self enterBoxTitle:title okText:'browse'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7791
    box initialText:(self stringToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7792
    box action:[:aString | 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7793
        aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7794
            self withWaitCursorDo:[aBlock value:aString]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7795
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7796
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7797
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7798
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7799
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7800
enterBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7801
    "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
  7802
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7803
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7804
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7805
    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
  7806
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7807
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7808
        box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7809
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7810
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7811
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7812
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7813
enterBoxForSearchSelectorTitle:title
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7814
    "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
  7815
     method for browsing based on a selector"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7816
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7817
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7818
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7819
    box := self enterBoxTitle:title okText:'search'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7820
    box initialText:(self selectorToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7821
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7822
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7823
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7824
enterBoxTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7825
    "convenient method: setup enterBox"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7826
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7827
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7828
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7829
    box := EnterBox new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7830
    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
  7831
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7832
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7833
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7834
extractClassAndSelectorFromSelectionInto:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7835
    "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
  7836
     '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
  7837
    the result."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7838
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7839
    |sel clsName isMeta sep s|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7840
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7841
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7842
    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
  7843
        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
  7844
        ('*>>*' 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
  7845
            sep := $>
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7846
        ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7847
            ('* *' 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
  7848
                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
  7849
            ]
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7850
        ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7851
        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
  7852
            "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7853
             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
  7854
            "
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7855
            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
  7856
            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
  7857
            [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
  7858
            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
  7859
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7860
            (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
  7861
                isMeta := true.
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7862
                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
  7863
            ] ifFalse:[
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7864
                isMeta := false
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7865
            ].
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7866
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7867
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7868
    aBlock value:clsName value:sel value:isMeta
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7869
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  7870
    "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
  7871
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7872
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7873
findClassNamed:aClassName
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7874
    "search through namespaces for aClassName."
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7875
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7876
    |cls|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7877
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7878
    currentNamespace = '* all *' ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7879
        (cls := Smalltalk at:aClassName asSymbol) notNil ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7880
            ^ cls
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7881
        ]
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7882
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7883
    self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7884
        (cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7885
            ^ cls
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7886
        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7887
    ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7888
    currentNamespace ~= '* all *' ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7889
        (cls := Smalltalk at:aClassName asSymbol) notNil ifTrue:[
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7890
            ^ cls
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7891
        ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7892
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7893
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7894
    (aClassName startsWith:'Smalltalk::') ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7895
        cls := Smalltalk classNamed:(aClassName copyFrom:'Smalltalk::' size + 1).
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7896
        cls notNil ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7897
            ^ cls
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7898
        ]
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7899
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7900
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7901
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7902
    "Created: 20.12.1996 / 15:39:38 / cg"
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  7903
    "Modified: 20.12.1996 / 21:40:14 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7904
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7905
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7906
findClassNamedInNameSpace:aClassName
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7907
    "search through current namespaces for aClassName.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7908
     Return the class or nil, if not found."
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7909
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7910
    |cls owner|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7911
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7912
    self listOfNamespaces do:[:aNamespace |
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7913
        (cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7914
            (owner := cls topOwningClass) notNil ifTrue:[
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7915
                owner nameSpace == aNamespace ifTrue:[
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7916
                    ^ cls
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7917
                ]
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7918
            ] ifFalse:[
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7919
                cls nameSpace == aNamespace ifTrue:[
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7920
                    ^ cls
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7921
                ]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7922
            ]
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
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7925
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7926
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7927
    "Created: 20.12.1996 / 17:41:54 / cg"
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  7928
    "Modified: 3.1.1997 / 19:30:53 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7929
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  7930
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7931
findClassOfVariable:aVariableName accessWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7932
    "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
  7933
     is defined; 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7934
     needs either #instVarNames or #classVarNames as aSelector."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7935
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7936
    |cls homeClass|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7937
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7938
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7939
     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
  7940
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7941
    cls := currentClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7942
    [cls notNil] whileTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7943
        ((cls perform:aSelector) includes:aVariableName) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7944
            homeClass := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7945
            cls := nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7946
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7947
            cls := cls superclass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7948
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7949
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7950
    homeClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7951
        "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
  7952
         for the declaring class ...
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7953
        "
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7954
        homeClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7955
    ] ifFalse:[
552
c61c0758c10b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 547
diff changeset
  7956
"/        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
  7957
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7958
    ^ homeClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7959
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7960
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7961
listBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7962
    "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
  7963
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7964
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7965
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7966
    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
  7967
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7968
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7969
        box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7970
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7971
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7972
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7973
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7974
listBoxTitle:title okText:okText list:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7975
    "convenient method: setup a listBox & return it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7976
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7977
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7978
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7979
    box := ListSelectionBox 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7980
                title:(resources string:title)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7981
                okText:(resources string:okText)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7982
                action:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7983
    box list:aList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7984
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7985
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7986
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7987
normalLabel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7988
    "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
  7989
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7990
    |l il|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7991
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7992
    myLabel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7993
        "if I have been given an explicit label,
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7994
         and its not the default, take that one"
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7995
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7996
        myLabel ~= 'System Browser' ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7997
            l := il := myLabel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7998
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7999
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8000
    l isNil ifTrue:[    
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8001
        l := resources string:'System Browser'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8002
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8003
        currentClass notNil ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8004
"/            l := l, ': ', currentClass name.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8005
            l := self displayedClassNameOf:currentClass.
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8006
            classListView isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8007
                currentSelector notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8008
                    l := l , ' ' ,  currentSelector
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8009
                ]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8010
            ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8011
                currentClass isLoaded ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8012
                    l := l , ' (unloaded)'
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8013
                ]
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8014
            ].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8015
            il := currentClass nameWithoutPrefix
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8016
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8017
            il := l.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8018
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8019
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8020
    self label:l.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8021
    self iconLabel:il.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8022
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  8023
    "Modified: 4.1.1997 / 14:37:08 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8024
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8025
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
  8026
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
  8027
    |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
  8028
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
  8029
    currentClass notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8030
        cls := currentClass.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8031
        cls isMeta ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8032
            meta := cls.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8033
            cls := meta soleInstance
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8034
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8035
            meta := cls class
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8036
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8037
        cls removeDependent:self.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8038
        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
  8039
    ].
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
  8040
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
  8041
    "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
  8042
!
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
  8043
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8044
selectorToSearchFor
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8045
    "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
  8046
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8047
    |sel t|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8048
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8049
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8050
    sel notNil ifTrue:[
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8051
        sel := sel asString.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8052
        t := Parser selectorInExpression:sel.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8053
        t notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8054
            sel := t
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8055
        ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8056
        sel := sel withoutSpaces.
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8057
        sel == #>> ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8058
            "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
  8059
            self extractClassAndSelectorFromSelectionInto:[:c :s :m |
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8060
                sel := s
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8061
            ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8062
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8063
    ] ifFalse:[
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8064
        methodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8065
            methodListView selection notNil ifTrue:[
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8066
                sel := methodListView selectionValue string
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8067
            ]
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8068
        ] ifFalse:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8069
            classMethodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8070
                classMethodListView selection notNil ifTrue:[
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8071
                    sel := classMethodListView selectionValue string.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8072
                ].
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8073
                sel notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8074
                    sel := self selectorFromClassMethodString:sel
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8075
                ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8076
            ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8077
        ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8078
        sel notNil ifTrue:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8079
            sel := sel withoutSpaces upTo:(Character space)
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8080
        ] ifFalse:[
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8081
            sel := ''
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8082
        ]
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8083
    ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8084
    ^ sel string
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
  8085
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8086
    "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
  8087
!
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
setAcceptAndExplainActionsForMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8090
    "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
  8091
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8092
    codeView acceptAction:[:theCode |
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8093
        |cat cls rslt|
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8094
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8095
        codeView cursor:Cursor execute.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8096
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8097
        (cat := currentMethodCategory) = '* all *' ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8098
            "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
  8099
             ... thanks to Arno for pointing this out"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8100
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8101
            cat := self askForMethodCategory.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8102
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8103
        (cat notNil and:[cat notEmpty]) ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8104
            fullProtocol ifTrue:[
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8105
                cls := acceptClass 
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8106
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8107
            cls isNil ifTrue:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8108
                cls := actualClass
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8109
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8110
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8111
            Object abortSignal catch:[
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8112
                lockUpdates := true.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8113
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8114
                rslt := actualClass compilerClass 
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8115
                    compile:theCode asString
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8116
                    forClass:cls
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8117
                    inCategory:cat 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8118
                    notifying:codeView.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8119
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8120
                codeView modified:false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8121
                currentMethod := actualClass compiledMethodAt:currentSelector.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8122
                self updateMethodListWithScroll:false keepSelection:(rslt == currentMethod).
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8123
                self normalLabel.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8124
            ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8125
            lockUpdates := false.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8126
        ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8127
        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
  8128
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8129
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8130
    codeView explainAction:[:theCode :theSelection |
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8131
        self showExplanation:(Explainer 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8132
                                explain:theSelection 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8133
                                in:theCode
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8134
                                forClass:actualClass)
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8135
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8136
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8137
    "Modified: 3.1.1997 / 12:17:33 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8138
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8139
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8140
setDoitActionForClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8141
    "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
  8142
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8143
    "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
  8144
     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
  8145
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8146
    codeView doItAction:[:theCode |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8147
        |compiler|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8148
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8149
        currentClass isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8150
            compiler := Compiler
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8151
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8152
            compiler := currentClass evaluatorClass
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8153
        ].
895
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  8154
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8155
        compiler 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8156
            evaluate:theCode 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8157
            in:nil 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8158
            receiver:currentClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8159
            notifying:codeView 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8160
            logged:false
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8161
            ifFail:nil 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8162
    ].
895
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  8163
cc65b9425f63 answer true on UndefinedObjects createMinimumProtocol query
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
  8164
    "Modified: 3.1.1997 / 15:46:44 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8165
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8166
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8167
setListOfNamespaces
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8168
    |l hasSmalltalk|
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8169
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8170
    namespaceList isNil ifTrue:[ ^ self ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8171
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8172
    l := self listOfAllNamespaces collect:[:ns | ns name].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8173
    l := l asOrderedCollection.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8174
    hasSmalltalk := true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8175
    l remove:'Smalltalk' ifAbsent:[hasSmalltalk := false].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8176
    l sort.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8177
    l addFirst:'-'.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8178
    hasSmalltalk ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8179
        l addFirst:'Smalltalk'
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8180
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8181
    l addFirst:'* all *'.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8182
    namespaceList list:l
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8183
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8184
    "Modified: 20.12.1996 / 19:18:29 / cg"
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8185
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  8186
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8187
setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8188
    codeView setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8189
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8190
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8191
showExplanation:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8192
    "show explanation from Parser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8193
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8194
    self information:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8195
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8196
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8197
stopIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8198
    "answer an icon to mark breakPointed methods"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8199
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8200
    |stopIcon|
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8201
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8202
    StopIcon notNil ifTrue:[^ StopIcon].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8203
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8204
    stopIcon := Depth1Image 
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8205
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8206
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8207
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8208
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8209
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8210
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8211
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8212
                                   2r00111110 2r01111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8213
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8214
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8215
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8216
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8217
                                   2r01111110 2r01111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8218
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8219
                                   2r00111110 2r01111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8220
                                   2r00011110 2r01111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8221
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8222
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8223
                                   2r00000000 2r00000000
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8224
                                ).
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8225
    stopIcon mask:(Depth1Image 
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8226
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8227
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8228
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8229
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8230
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8231
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8232
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8233
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8234
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8235
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8236
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8237
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8238
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8239
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8240
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8241
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8242
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8243
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8244
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8245
                                )).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8246
    stopIcon colorMap:(Array with:Color white with:Color red).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8247
    StopIcon := stopIcon.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8248
    ^ stopIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8249
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8250
    "Created: 22.10.1996 / 18:03:38 / cg"
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8251
    "Modified: 9.11.1996 / 19:47:51 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8252
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8253
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8254
stringToSearchFor
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8255
    "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
  8256
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8257
    |sel|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8258
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8259
    sel := codeView selection.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8260
    sel notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8261
        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
  8262
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8263
        sel isNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8264
            currentClass notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8265
                sel := currentClass name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8266
            ]
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
        sel notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8269
            sel := sel withoutSpaces
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8270
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8271
            sel := ''
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8272
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8273
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8274
    ^ sel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8275
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8276
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8277
traceIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8278
    "answer an icon to mark traced methods"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8279
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8280
    |traceIcon|
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8281
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8282
    TraceIcon notNil ifTrue:[^ TraceIcon].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8283
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8284
    traceIcon := Depth1Image
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8285
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8286
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8287
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8288
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8289
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8290
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8291
                                   2r00110000 2r00001100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8292
                                   2r00110000 2r00001100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8293
                                   2r00011000 2r00011000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8294
                                   2r00011000 2r00011000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8295
                                   2r00001100 2r00110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8296
                                   2r00001100 2r00110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8297
                                   2r00000110 2r01100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8298
                                   2r00000110 2r01100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8299
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8300
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8301
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8302
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8303
                                   2r00000000 2r00000000
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8304
                                ).
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8305
    traceIcon mask:(Depth1Image
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8306
                     width:16
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8307
                     height:16
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8308
                     fromArray:#(
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8309
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8310
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8311
                                   2r01111111 2r11111110
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8312
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8313
                                   2r00111111 2r11111100
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8314
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8315
                                   2r00011111 2r11111000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8316
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8317
                                   2r00001111 2r11110000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8318
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8319
                                   2r00000111 2r11100000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8320
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8321
                                   2r00000011 2r11000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8322
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8323
                                   2r00000001 2r10000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8324
                                   2r00000000 2r00000000
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8325
                                )).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8326
    traceIcon colorMap:(Array with:Color white with:Color red).
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8327
    TraceIcon := traceIcon.
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8328
    ^ traceIcon
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8329
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8330
    "Created: 22.10.1996 / 18:04:14 / cg"
856
45d8adb56f96 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
  8331
    "Modified: 9.11.1996 / 19:48:18 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8332
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8333
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8334
warnLabel:what
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8335
    "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
  8336
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8337
    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
  8338
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8339
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8340
withSearchCursorDo:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8341
    ^ self withCursor:(Cursor questionMark) do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8342
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8343
    "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
  8344
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8345
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8346
!BrowserView methodsFor:'unused'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8347
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8348
listOfAllMethodCategoriesInHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8349
    "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
  8350
     and all of its superclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8351
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8352
    |newList cat|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8353
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8354
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8355
    self classesInHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8356
        c methodDictionary do:[:aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8357
            cat := aMethod category.
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8358
            cat isNil ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8359
                cat := '* no category *'
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8360
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8361
            newList add:cat
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8362
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8363
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8364
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8365
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8366
    ^ newList asOrderedCollection sort
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8367
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8368
    "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
  8369
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8370
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8371
listOfAllSelectorsInCategory:aCategory inHierarchyOfClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8372
    "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
  8373
     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
  8374
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8375
    |newList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8376
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8377
    newList := Set new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8378
    self classesInHierarchy:aClass do:[:c |
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8379
        |searchCategory|
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8380
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8381
        (aCategory = '* all *') ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8382
            newList addAll:(c methodDictionary keys)
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8383
        ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8384
            (aCategory = '* no category *') ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8385
                searchCategory := nil
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8386
            ] ifFalse:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8387
                searchCategory := aCategory
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8388
            ].
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8389
            c methodDictionary keysAndValuesDo:[:selector :aMethod |
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8390
                (aMethod category = searchCategory) ifTrue:[
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8391
                    newList add:selector
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8392
                ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8393
            ]
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8394
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8395
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8396
    (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
  8397
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8398
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8399
    "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
  8400
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8401
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8402
!BrowserView methodsFor:'variable list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8403
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8404
allClassOrInstVarRefsTitle:title access:access mods:modifications
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8405
    "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
  8406
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8407
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8408
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8409
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8410
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8411
        box action:[:aVariableName |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8412
            |homeClass|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8413
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8414
            aVariableName isEmpty ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8415
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8416
                    homeClass := self findClassOfVariable:aVariableName accessWith:access.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8417
                    access == #classVarNames ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8418
                        SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8419
                            browseClassRefsTo:aVariableName 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8420
                            under:homeClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8421
                            modificationsOnly:modifications
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8422
                    ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8423
                        SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8424
                            browseInstRefsTo:aVariableName 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8425
                            under:homeClass 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8426
                            modificationsOnly:modifications
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8427
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8428
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8429
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8430
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8431
        box showAtPointer
199
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8434
    "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
  8435
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8436
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8437
allClassVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8438
    "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
  8439
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8440
    self allClassOrInstVarRefsTitle:'class variable to browse modifications of:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8441
                                  access:#classVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8442
                                  mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8443
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8444
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8445
allClassVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8446
    "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
  8447
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8448
    self allClassOrInstVarRefsTitle:'class variable to browse references to:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8449
                                  access:#classVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8450
                                  mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8451
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8452
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8453
allInstVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8454
    "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
  8455
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8456
    self allClassOrInstVarRefsTitle:'instance variable to browse modifications of:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8457
                                  access:#instVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8458
                                  mods:true
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8459
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8460
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8461
allInstVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8462
    "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
  8463
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8464
    self allClassOrInstVarRefsTitle:'instance variable to browse references to:' 
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8465
                                  access:#instVarNames
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8466
                                  mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8467
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8468
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8469
classVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8470
    "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
  8471
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8472
    self classVarRefsOrModsTitle:'class variable to browse modifications of:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8473
                                 mods:true
199
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8476
classVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8477
    "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
  8478
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8479
    self classVarRefsOrModsTitle:'class variable to browse references to:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8480
                                 mods:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8481
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8482
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8483
classVarRefsOrModsTitle:title mods:mods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8484
    "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
  8485
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8486
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8487
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8488
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8489
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8490
        box action:[:aString |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8491
            aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8492
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8493
                    SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8494
                           browseClassRefsTo:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8495
                           in:(Array with:currentClass)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8496
                           modificationsOnly:mods 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8497
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8498
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8499
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8500
        box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8501
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8502
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8503
    "Created: 23.11.1995 / 14:12:56 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8504
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8505
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8506
enterBoxForVariableSearch:title
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8507
    |box sel|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8508
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8509
    box := self enterBoxForCodeSelectionTitle:title okText:'browse'.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8510
    variableListView notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8511
        codeView hasSelection ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8512
            (sel := variableListView selectionValue) notNil ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8513
                (sel startsWith:'---') ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8514
                    box initialText:sel
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8515
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8516
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8517
        ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8518
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8519
    ^ box
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8520
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8521
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8522
instVarMods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8523
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8524
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8525
    self instVarRefsOrModsTitle:'instance variable to browse modifications of:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8526
                                mods:true 
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8527
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8528
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8529
instVarRefs
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8530
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8531
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8532
    self instVarRefsOrModsTitle:'instance variable to browse references to:'
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8533
                           mods:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8534
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8535
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8536
instVarRefsOrModsTitle:title mods:mods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8537
    "show an enterbox for instvar to search for"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8538
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8539
    self doClassMenu:[:currentClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8540
        |box|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8541
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8542
        box := self enterBoxForVariableSearch:title.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8543
        box action:[:aString |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8544
            aString notEmpty ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8545
                self withSearchCursorDo:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8546
                    SystemBrowser 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8547
                        browseInstRefsTo:aString
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8548
                        in:(Array with:currentClass)
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8549
                        modificationsOnly:mods 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8550
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8551
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8552
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8553
        box showAtPointer
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8554
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8555
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8556
    "Created: 23.11.1995 / 14:12:40 / cg"
93
claus
parents: 92
diff changeset
  8557
!
claus
parents: 92
diff changeset
  8558
claus
parents: 92
diff changeset
  8559
varTypeInfo
claus
parents: 92
diff changeset
  8560
    "show typical usage of a variable"
claus
parents: 92
diff changeset
  8561
claus
parents: 92
diff changeset
  8562
    |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
  8563
     searchClass s|
93
claus
parents: 92
diff changeset
  8564
claus
parents: 92
diff changeset
  8565
    name := variableListView selectionValue.
claus
parents: 92
diff changeset
  8566
    name isNil ifTrue:[^ self].
claus
parents: 92
diff changeset
  8567
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8568
    showInstance ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8569
        searchClass := currentClass whichClassDefinesClassVar:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8570
        value := searchClass classVarAt:(name asSymbol).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8571
        s := value displayString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8572
        s size > 60 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8573
            s := (s copyTo:60) , ' ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8574
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8575
        msg := name , ' is (currently):\\' , s.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8576
        s ~= value classNameWithArticle ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8577
            msg := msg , '\\(' , value class name , ')'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8578
        ]
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8579
    ] ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8580
        searchClass := actualClass whichClassDefinesInstVar:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8581
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8582
        idx := searchClass instVarOffsetOf:name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8583
        idx isNil ifTrue:[^ self].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8584
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8585
        classes := IdentitySet new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8586
        values := IdentitySet new.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8587
        instCount := 0.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8588
        subInstCount := 0.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8589
        searchClass allSubInstancesDo:[:i |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8590
            |val|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8591
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8592
            val := i instVarAt:idx.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8593
            val notNil ifTrue:[values add:val].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8594
            classes add:val class.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8595
            (i isMemberOf:searchClass) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8596
                instCount := instCount + 1.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8597
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8598
                subInstCount := subInstCount + 1
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8599
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8600
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8601
        (instCount == 0 and:[subInstCount == 0]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8602
            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
  8603
            ^ self
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8604
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8605
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8606
        instCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8607
            msg := 'in (currently: ' , instCount printString,') instances '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8608
            subInstCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8609
                msg := msg , 'and '
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8610
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8611
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8612
            msg := 'in '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8613
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8614
        subInstCount ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8615
            msg := msg , '(currently: ' , subInstCount printString, ') derived instances '
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8616
        ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8617
        msg := msg, 'of ' , searchClass name , ',\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8618
        msg := msg , name , ' '.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8619
        ((values size == 1) 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8620
        or:[classes size == 1 and:[classes first == UndefinedObject]]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8621
            values size == 1 ifTrue:[value := values first].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8622
            (value isNumber or:[value isString]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8623
                msg := msg , 'is always the same:\\      ' , 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8624
                             value class name , ' (' , value storeString , ')'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8625
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8626
                (value isNil or:[value == true or:[value == false]]) ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8627
                    msg := msg , 'is always:\\      ' , 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8628
                                 value printString.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8629
                ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8630
                    msg := msg , 'is always the same:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8631
                    msg := msg , '      ' , value class name.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8632
                    value isLiteral ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8633
                        msg := msg , ' (' , value storeString , ')'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8634
                    ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8635
                ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8636
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8637
        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8638
            classes size == 1 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8639
                msg := msg , 'is always:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8640
                msg := msg , '      ' , classes first name , '\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8641
            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8642
                msg := msg , 'is one of:\\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8643
                classes := classes asOrderedCollection.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8644
                classes size > 20 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8645
                    classes := classes copyFrom:1 to:20.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8646
                    cut := true
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8647
                ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8648
                    cut := false.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8649
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8650
                names := classes collect:[:cls |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8651
                    |nm|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8652
                    cls == UndefinedObject ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8653
                        'nil'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8654
                    ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8655
                        cls == True ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8656
                            'true'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8657
                        ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8658
                            cls == False ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8659
                                'false'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8660
                            ] ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8661
                                cls name
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8662
                            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8663
                        ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8664
                    ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8665
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8666
                names sort.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8667
                names do:[:nm |
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8668
                    msg := msg , '      ' , nm , '\'.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8669
                ].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8670
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8671
        ].
93
claus
parents: 92
diff changeset
  8672
    ].
claus
parents: 92
diff changeset
  8673
claus
parents: 92
diff changeset
  8674
    box := InfoBox title:msg withCRs.
claus
parents: 92
diff changeset
  8675
    box label:'variable type information'.
claus
parents: 92
diff changeset
  8676
    box showAtPointer
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8677
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8678
    "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
  8679
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8680
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8681
variableListMenu
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8682
    |labels selectors m|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8683
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8684
    currentClass isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8685
        variableListView flash.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8686
        ^ nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8687
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8688
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8689
    labels := #(
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8690
                    'instvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8691
                    'classvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8692
                    'all instvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8693
                    'all classvar refs ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8694
                    '-'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8695
                    'instvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8696
                    'classvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8697
                    'all instvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8698
                    'all classvar mods ...'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8699
               ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8700
    selectors := #(
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8701
                    instVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8702
                    classVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8703
                    allInstVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8704
                    allClassVarRefs
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8705
                    nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8706
                    instVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8707
                    classVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8708
                    allInstVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8709
                    allClassVarMods
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8710
                 ).
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8711
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
  8712
    ("showInstance and:[" variableListView hasSelection "]" ) ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8713
        labels := labels , #(
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8714
                                '-'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8715
                                'type information'
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8716
                           ).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8717
        selectors := selectors , #(
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8718
                                nil
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8719
                                varTypeInfo
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8720
                                ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8721
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8722
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8723
    m := PopUpMenu labels:(resources array:labels)
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8724
                selectors:selectors.
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8725
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8726
    currentClass isLoaded ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8727
        m disableAll
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8728
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8729
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8730
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  8731
    "Modified: 3.1.1997 / 11:57:27 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8732
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8733
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8734
variableSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8735
    "variable selection changed"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8736
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8737
    |name idx|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8738
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8739
    name := variableListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8740
    name isNil ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8741
        self unhilightMethodCategories.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8742
        self unhilightMethods.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8743
        self autoSearch:nil.
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8744
        ^ self
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8745
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8746
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8747
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8748
     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
  8749
     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
  8750
     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
  8751
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8752
    idx := variableListView list findLast:[:entry | entry = name].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8753
    idx ~~ lineNr ifTrue:[
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8754
        "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
  8755
        variableListView setSelection:idx
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8756
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8757
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8758
    "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
  8759
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8760
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8761
    self hilightMethodsInMethodCategoryList:true inMethodList:true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8762
    self autoSearch:name.
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8763
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8764
    "Modified: 25.5.1996 / 12:26:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  8765
! !
f2c56efa3599 Initial revision
claus
parents:
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
!BrowserView methodsFor:'variable stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8768
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8769
hilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8770
    "helper; given a list itme, highlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8771
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8772
    |e|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8773
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8774
    methodCategoryListView font bold ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8775
        "/ already bold; use different color then
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8776
        methodCategoryListView foregroundColor brightness > 0.5 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8777
            methodCategoryListView backgroundColor brightness < 0.25 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8778
                e := #color->Color blue
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8779
            ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8780
                e := #color->Color black
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8781
            ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8782
        ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8783
            methodCategoryListView backgroundColor brightness > 0.75 ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8784
                e := #color->Color red darkened
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8785
            ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8786
                e := #color->Color white.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8787
            ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8788
        ]
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8789
    ] ifFalse:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8790
        e := #bold.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8791
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8792
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8793
    entry isString ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8794
        ^ entry asText emphasizeAllWith:e.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8795
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8796
    ^ 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
  8797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8798
    "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
  8799
    "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
  8800
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8801
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8802
hilightMethodsInMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8803
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8804
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8805
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8806
    self hilightMethodsInMethodCategoryList:true inMethodList:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8807
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8808
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8809
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8810
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8811
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8812
hilightMethodsInMethodCategoryList:inCat inMethodList:inMethods 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8813
    "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
  8814
     variable, and highlight them"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8815
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8816
    |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
  8817
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8818
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8819
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8820
    inCat ifTrue:[self unhilightMethodCategories].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8821
    inMethods ifTrue:[self unhilightMethods].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8822
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8823
    actualClass isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8824
    (methodCategoryListView isNil 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8825
    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
  8826
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8827
    name := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8828
    name isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8829
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8830
    self withSearchCursorDo:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8831
        |classes filter any supers|
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8832
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8833
        classes := Array with:actualClass.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8834
        (currentClassHierarchy notNil and:[fullProtocol]) ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8835
            supers := actualClass allSuperclasses.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8836
            supers notNil ifTrue:[    
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8837
                classes := classes , supers.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8838
            ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8839
            redefinedSelectors := IdentitySet new.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8840
        ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8841
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8842
        filter := SystemBrowser filterToSearchRefsTo:name classVars:showInstance not modificationsOnly:false. 
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8843
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8844
        methodListView notNil ifTrue:[
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8845
            methodList := methodListView list.
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8846
        ].
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8847
        methodCategoryListView notNil ifTrue:[
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8848
            methodCategoryList := methodCategoryListView list.
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8849
        ].
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8850
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8851
        any := false.
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8852
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8853
        "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8854
         highlight the method that ref this variable
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8855
        "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8856
        classes do:[:someClass |
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8857
            (fullProtocol
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8858
            and:[classListView valueIsInSelection:(someClass name)]) ifFalse:[
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8859
                someClass methodDictionary keysAndValuesDo:[:selector :method |
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8860
                    (inCat
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8861
                    or:[methodList notNil
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8862
                        and:[methodList includes:selector]])
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8863
                    ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8864
                        (redefinedSelectors isNil
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8865
                        or:[(redefinedSelectors includes:selector) not])
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8866
                       ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8867
                           (filter value:someClass value:method value:selector) ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8868
                               |idx cat|
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8869
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8870
                               (inCat
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8871
                               and:[methodCategoryList notNil]) ifTrue:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8872
                                   cat := method category.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8873
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8874
                                    highlight the methodCategory
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8875
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8876
                                   idx := methodCategoryListView list indexOf:cat.
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8877
                                   idx ~~ 0 ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8878
                                        entry := methodCategoryListView at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8879
                                        entry := self hilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8880
                                        methodCategoryListView at:idx put:entry
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8881
"/                                       methodCategoryListView attributeAt:idx put:#bold.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8882
                                   ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8883
                               ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8884
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8885
                               (inMethods
751
3fb9e9b8018f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 750
diff changeset
  8886
                               and:[methodList notNil]) ifTrue:[
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8887
                                   "
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8888
                                    highlight the method
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8889
                                   "
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8890
                                   idx := methodListView list 
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8891
                                                findFirst:[:item | item string = selector
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8892
                                                                   or:[item string startsWith:(selector , ' ')]
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8893
                                                          ].
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8894
                                   idx ~~ 0 ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8895
                                        entry := methodListView at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8896
                                        entry := self hilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8897
                                        methodListView at:idx put:entry
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8898
"/                                        methodListView attributeAt:idx put:#bold.
372
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8899
                                   ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8900
                                   any := true
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8901
                               ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8902
                           ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8903
                           redefinedSelectors notNil ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8904
                               redefinedSelectors add:selector
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8905
                           ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8906
                        ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8907
                    ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8908
                ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8909
            ]
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8910
        ].
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8911
        any ifTrue:[
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8912
            self setSearchPattern:name
df84eed88504 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
  8913
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8914
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8915
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8916
    "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
  8917
    "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
  8918
    "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
  8919
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8920
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8921
hilightMethodsInMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8922
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8923
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8924
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8925
    self hilightMethodsInMethodCategoryList:false inMethodList:true 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8926
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8927
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8928
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8929
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8930
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8931
unhilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8932
    "helper; given a list itme, unhighlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8933
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8934
    entry isString ifTrue:[
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8935
        ^ entry string
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8936
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8937
    ^ entry copy string:(entry string)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8938
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8939
    "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
  8940
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8941
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8942
unhilightMethodCategories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8943
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8944
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8945
    |list entry sz "{ Class: SmallInteger }"|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8946
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8947
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8948
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8949
    methodCategoryListView notNil ifTrue:[
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8950
        list := methodCategoryListView list.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8951
        sz := list size.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8952
        1 to:sz do:[:idx |
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8953
            entry := list at:idx.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8954
            entry := self unhilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8955
            methodCategoryListView at:idx put:entry.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8956
"/            methodCategoryListView attributeAt:idx put:nil.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8957
        ]
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8958
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8959
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8960
    "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
  8961
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8962
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8963
unhilightMethods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8964
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8965
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8966
    |list entry sz "{Class: SmallInteger }" |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8967
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8968
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8969
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8970
    methodListView notNil ifTrue:[
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8971
        list := methodListView list.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8972
        sz := list size.
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8973
        1 to:sz do:[:idx |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8974
            entry := list at:idx.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8975
            entry := self unhilightEntryFor:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8976
            methodListView at:idx put:entry.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8977
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8978
"/            methodListView attributeAt:idx put:nil.
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8979
        ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8980
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  8981
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
  8982
    "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
  8983
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8984
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8985
updateVariableList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8986
    |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
  8987
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8988
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8989
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8990
    oldSelection := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8991
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8992
    l := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8993
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8994
     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
  8995
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8996
    showInstance ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8997
        nameAccessSelector := #instVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8998
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  8999
        nameAccessSelector := #classVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9000
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9001
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9002
"/    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
  9003
"/    class isNil ifTrue:[class := currentClassHierarchy].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  9004
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  9005
    class := currentClassHierarchy notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9006
        currentClassHierarchy
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  9007
    ] ifFalse:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9008
        currentClass
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9009
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9010
    class := currentClass.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9011
    fullProtocol ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9012
        class := currentClassHierarchy
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9013
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9014
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9015
    class isNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9016
        variableListView list:nil.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9017
        ^ self
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9018
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  9019
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9020
    class withAllSuperclasses do:[:aClass |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9021
        |ignore|
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9022
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9023
        ignore := fullProtocol 
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9024
                  and:[classListView valueIsInSelection:(aClass name asString)].
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9025
        ignore ifFalse:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9026
            subList := aClass perform:nameAccessSelector.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9027
            subList size ~~ 0 ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9028
                l := l , (subList asOrderedCollection reverse).
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9029
                l := l , (OrderedCollection with:'---- ' , aClass name , ' ---------').
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9030
            ]
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9031
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9032
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9033
    l reverse.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9034
    variableListView setAttributes:nil.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9035
    l ~= variableListView list ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9036
        variableListView list:l.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9037
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  9038
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9039
    l keysAndValuesDo:[:index :entry |
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9040
        (entry startsWith:'---') ifTrue:[
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9041
            variableListView attributeAt:index put:#disabled.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9042
            last := index
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9043
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9044
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9045
    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
  9046
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9047
    oldSelection notNil ifTrue:[
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9048
        variableListView setSelectElement:oldSelection.
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  9049
        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
  9050
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  9051
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  9052
    "Modified: 27.10.1996 / 15:48:02 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  9053
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  9054
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
  9055
!BrowserView class methodsFor:'documentation'!
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
  9056
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
  9057
version
908
927e36f25eac checkin from browser
Claus Gittinger <cg@exept.de>
parents: 907
diff changeset
  9058
    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.244 1997-01-05 02:22:50 cg Exp $'
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
  9059
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  9060
BrowserView initialize!