BrowserView.st
author Stefan Vogel <sv@exept.de>
Fri, 23 Jan 1998 19:05:21 +0100
changeset 1416 cbc8a3787732
parent 1407 f6e8c04acff0
child 1419 89b47621cf99
permissions -rw-r--r--
Wrapped method forward #privacy now.
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
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
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
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
    22
		namespaceList allNamespaces gotClassList classList selectorList
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    23
		showAllNamespaces classInstVarsInVarList'
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    24
	classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    25
		StopIcon TraceIcon TimeIcon CanvasIcon MenuIcon ImageIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    26
		ShowResourceIcons'
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    27
	poolDictionaries:''
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
    28
	category:'Interface-Browsers'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    29
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    30
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    31
!BrowserView class methodsFor:'documentation'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    32
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    33
copyright
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    34
"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    35
 COPYRIGHT (c) 1989 by Claus Gittinger
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    36
	      All Rights Reserved
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    37
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    38
 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
    39
 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
    40
 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
    41
 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
    42
 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
    43
 hereby transferred.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    44
"
165
df29ee4514c1 uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents: 161
diff changeset
    45
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    46
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    47
documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    48
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    49
    this class implements all kinds of class browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    50
    Typically, it is started with 'SystemBrowser open', but there are many other 
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    51
    startup messages, to launch special browsers.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    52
    See the categories 'startup' and 'special search startup' in the classes
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    53
    protocol.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    54
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    55
    Alse, see the extra document 'doc/misc/sbrowser.doc' or the HTML online doc
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    56
    for how to use the browser.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    57
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    58
    written winter 89 by claus
106
claus
parents: 105
diff changeset
    59
claus
parents: 105
diff changeset
    60
    Notice: SystemBrowser is currently being rewritten to be an instance
claus
parents: 105
diff changeset
    61
    of ApplicationModel - this transition is not yet complete and you see
claus
parents: 105
diff changeset
    62
    here intermediate versions of BrowserView/SystemBrowser. 
claus
parents: 105
diff changeset
    63
    All action is (currently) still done here in BrowserView, although the
claus
parents: 105
diff changeset
    64
    SystemBrowsers class methods are used to startup a browser.
claus
parents: 105
diff changeset
    65
    This will certainly change ...
509
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    66
8ccb7c3d6726 documentation
Claus Gittinger <cg@exept.de>
parents: 506
diff changeset
    67
    [author:]
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    68
	Claus Gittinger
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    69
"
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
    70
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    71
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    72
!BrowserView class methodsFor:'initialization'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    73
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    74
initialize
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    75
    "Browser configuration;
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    76
     (values can be changed from your private startup file)"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    77
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    78
    ShowResourceIcons := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
    79
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    80
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    81
     setting this to false, the removeClass function will remove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    82
     classes WITHOUT checking for instances. Otherwise,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    83
     it will check and let you confirm in case there are instances.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    84
     Checking for instances may be a bit time consuming, though.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    85
     The default is true - therefore, it will check
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    86
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    87
    CheckForInstancesWhenRemovingClasses := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    88
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    89
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    90
     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
    91
     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
    92
     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
    93
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    94
    RememberAspect := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    95
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    96
    "
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    97
     CheckForInstancesWhenRemovingClasses := true
f2c56efa3599 Initial revision
claus
parents:
diff changeset
    98
     CheckForInstancesWhenRemovingClasses := false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
    99
     RememberAspect := true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   100
     RememberAspect := false
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   101
     ShowResourceIcons := true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   102
     ShowResourceIcons := false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   103
    "
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   104
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   105
    "Created: / 23.11.1995 / 11:35:58 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   106
    "Modified: / 27.10.1997 / 17:34:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   107
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   108
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   109
!BrowserView class methodsFor:'cleanup'!
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   110
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   111
lowSpaceCleanup
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   112
    DefaultIcon := StopIcon := TraceIcon := TimeIcon := nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   113
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   114
    "Created: / 18.4.1996 / 16:46:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   115
    "Modified: / 25.10.1997 / 19:30:32 / cg"
486
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   116
! !
fb6c24e0123c added lowspace cleanup
Claus Gittinger <cg@exept.de>
parents: 484
diff changeset
   117
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   118
!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
   119
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   120
canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   121
    "answer an icon to mark canvas (windowSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   122
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   123
    |canvasIcon|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   124
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   125
    CanvasIcon notNil ifTrue:[^ CanvasIcon].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   126
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   127
    canvasIcon := Depth1Image
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   128
                     width:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   129
                     height:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   130
                     fromArray:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   131
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   132
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   133
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   134
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   135
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   136
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   137
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   138
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   139
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   140
                                ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   141
    canvasIcon mask:(ImageMask
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   142
                     width:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   143
                     height:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   144
                     fromArray:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   145
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   146
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   147
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   148
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   149
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   150
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   151
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   152
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   153
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   154
                                )).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   155
    canvasIcon maskedPixelsAre0:true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   156
    canvasIcon colorMap:(Array with:Color white with:Color black).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   157
    CanvasIcon := canvasIcon.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   158
    ^ canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   159
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   160
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   161
     CanvasIcon := nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   162
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   163
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   164
    "Modified: / 28.10.1997 / 12:47:18 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   165
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   166
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   167
defaultIcon
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   168
    "return the browsers default window icon"
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   169
1288
9f6e0e8c3ab8 fixed icon
Claus Gittinger <cg@exept.de>
parents: 1282
diff changeset
   170
    <resource: #style (#SYSTEMBROWSER_ICON #SYSTEMBROWSER_ICON_FILE)>
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   171
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   172
    |nm i|
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   173
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   174
    (i := DefaultIcon) isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   175
	i := self classResources at:'SYSTEMBROWSER_ICON' default:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   176
	i isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   177
	    nm := ClassResources at:'SYSTEMBROWSER_ICON_FILE' default:'SBrowser.xbm'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   178
	    i := Image fromFile:nm resolution:100.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   179
	    i isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   180
		i := Image fromFile:('bitmaps/' , nm) resolution:100.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   181
		i isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   182
		    i := StandardSystemView defaultIcon
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   183
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   184
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   185
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   186
	i notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   187
	    DefaultIcon := i := i on:Display
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   188
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   189
    ].
1149
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   190
    ^ i
33fcc586c309 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1139
diff changeset
   191
1083
dee24d07aa75 allow icon to be specified in resource file.
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   192
    "Modified: 19.3.1997 / 20:48:34 / ca"
1288
9f6e0e8c3ab8 fixed icon
Claus Gittinger <cg@exept.de>
parents: 1282
diff changeset
   193
    "Modified: 15.8.1997 / 15:29:16 / cg"
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   194
!
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   195
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   196
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   197
    "answer an icon to mark file-loading image  methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   198
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   199
    ^ self imageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   200
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   201
    "Created: / 29.10.1997 / 03:32:43 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   202
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
   203
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   204
imageIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   205
    "answer an icon to mark image (menuSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   206
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   207
    |imageIcon|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   208
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   209
    ImageIcon notNil ifTrue:[^ ImageIcon].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   210
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   211
    imageIcon := Depth2Image
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   212
                     width:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   213
                     height:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   214
                     fromArray:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   215
                                   4r0000 4r0000 4r0000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   216
                                   4r0111 4r1111 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   217
                                   4r0111 4r2221 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   218
                                   4r0112 4r2222 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   219
                                   4r0111 4r2221 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   220
                                   4r0111 4r1311 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   221
                                   4r0111 4r1311 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   222
                                   4r0111 4r1311 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   223
                                   4r0222 4r2222 4r1000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   224
                                   4r0000 4r0000 4r0000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   225
                                ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   226
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   227
    imageIcon colorMap:(Array 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   228
                                with:Color black
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   229
                                with:(Color rgbValue:16radd8e6)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   230
                                with:(Color rgbValue:16r00cd00)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   231
                                with:(Color rgbValue:16r853e26)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   232
                       ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   233
    ImageIcon := imageIcon.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   234
    ^ imageIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   235
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   236
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   237
     ImageIcon := nil.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   238
     self imageIcon inspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   239
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   240
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   241
    "Created: / 28.10.1997 / 13:42:54 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   242
    "Modified: / 28.10.1997 / 14:09:39 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   243
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   244
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   245
menuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   246
    "answer an icon to mark menu (menuSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   247
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   248
    |menuIcon|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   249
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   250
    MenuIcon notNil ifTrue:[^ MenuIcon].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   251
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   252
    menuIcon := Depth1Image
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   253
                     width:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   254
                     height:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   255
                     fromArray:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   256
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   257
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   258
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   259
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   260
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   261
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   262
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   263
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   264
                                   2r10000000 2r01000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   265
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   266
                                ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   267
    menuIcon mask:(ImageMask
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   268
                     width:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   269
                     height:10
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   270
                     fromArray:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   271
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   272
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   273
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   274
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   275
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   276
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   277
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   278
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   279
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   280
                                   2r11111111 2r11000000
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   281
                                )).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   282
    menuIcon maskedPixelsAre0:true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   283
    menuIcon colorMap:(Array with:Color white with:Color black).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   284
    MenuIcon := menuIcon.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   285
    ^ menuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   286
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   287
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   288
     MenuIcon := nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   289
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   290
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   291
    "Created: / 27.10.1997 / 00:38:06 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   292
    "Modified: / 27.10.1997 / 00:45:45 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   293
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   294
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   295
programMenuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   296
    "answer an icon to mark programmed-menu (menuSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   297
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   298
    ^ self menuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   299
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   300
    "Created: / 28.10.1997 / 13:40:49 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   301
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   302
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   303
stopIcon
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   304
    "answer an icon to mark breakPointed methods"
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   305
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   306
    |stopIcon|
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   307
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   308
    StopIcon notNil ifTrue:[^ StopIcon].
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   309
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   310
    stopIcon := Depth1Image 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   311
		     width:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   312
		     height:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   313
		     fromArray:#(
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   314
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   315
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   316
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   317
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   318
				   2r00111110 2r01111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   319
				   2r01111110 2r01111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   320
				   2r01111110 2r01111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   321
				   2r01111110 2r01111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   322
				   2r01111110 2r01111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   323
				   2r01111110 2r01111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   324
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   325
				   2r00111110 2r01111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   326
				   2r00011110 2r01111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   327
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   328
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   329
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   330
				).
1161
4130c98f3268 dont update codeView twice when changing classes.
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   331
    stopIcon mask:(ImageMask 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   332
		     width:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   333
		     height:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   334
		     fromArray:#(
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   335
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   336
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   337
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   338
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   339
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   340
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   341
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   342
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   343
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   344
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   345
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   346
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   347
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   348
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   349
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   350
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   351
				)).
1135
60b601b03082 give maskedPixelsAre0 hint.
Claus Gittinger <cg@exept.de>
parents: 1134
diff changeset
   352
    stopIcon maskedPixelsAre0:true.
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   353
    stopIcon colorMap:(Array with:Color white with:Color red).
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   354
    StopIcon := stopIcon.
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   355
    ^ stopIcon
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   356
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   357
    "Created: 7.4.1997 / 17:31:23 / cg"
1161
4130c98f3268 dont update codeView twice when changing classes.
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   358
    "Modified: 22.4.1997 / 14:18:23 / cg"
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   359
!
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   360
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   361
timeIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   362
    "answer an icon to mark timed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   363
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   364
    |timeIcon|
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   365
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   366
    TimeIcon notNil ifTrue:[^ TimeIcon].
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   367
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   368
    timeIcon := Depth1Image 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   369
		     width:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   370
		     height:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   371
		     fromArray:#(
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   372
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   373
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   374
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   375
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   376
				   2r00011110 2r01111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   377
				   2r00111110 2r01111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   378
				   2r00111110 2r01111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   379
				   2r00111110 2r00000100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   380
				   2r00111110 2r00000100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   381
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   382
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   383
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   384
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   385
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   386
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   387
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   388
				).
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   389
1161
4130c98f3268 dont update codeView twice when changing classes.
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   390
    timeIcon mask:(ImageMask 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   391
		     width:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   392
		     height:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   393
		     fromArray:#(
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   394
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   395
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   396
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   397
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   398
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   399
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   400
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   401
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   402
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   403
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   404
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   405
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   406
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   407
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   408
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   409
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   410
				)).
1135
60b601b03082 give maskedPixelsAre0 hint.
Claus Gittinger <cg@exept.de>
parents: 1134
diff changeset
   411
    timeIcon maskedPixelsAre0:true.
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   412
    timeIcon colorMap:(Array with:Color black with:Color white).
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   413
    TimeIcon := timeIcon.
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   414
    ^ timeIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   415
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   416
    "Created: 11.4.1997 / 17:01:55 / cg"
1161
4130c98f3268 dont update codeView twice when changing classes.
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   417
    "Modified: 22.4.1997 / 14:18:28 / cg"
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   418
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
   419
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   420
traceIcon
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   421
    "answer an icon to mark traced methods"
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   422
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   423
    |traceIcon|
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   424
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   425
    TraceIcon notNil ifTrue:[^ TraceIcon].
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   426
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   427
    traceIcon := Depth1Image
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   428
		     width:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   429
		     height:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   430
		     fromArray:#(
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   431
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   432
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   433
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   434
				   2r00110000 2r00001100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   435
				   2r00110000 2r00001100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   436
				   2r00011000 2r00011000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   437
				   2r00011000 2r00011000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   438
				   2r00001100 2r00110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   439
				   2r00001100 2r00110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   440
				   2r00000110 2r01100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   441
				   2r00000110 2r01100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   442
				   2r00000011 2r11000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   443
				   2r00000011 2r11000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   444
				   2r00000001 2r10000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   445
				   2r00000001 2r10000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   446
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   447
				).
1161
4130c98f3268 dont update codeView twice when changing classes.
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   448
    traceIcon mask:(ImageMask
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   449
		     width:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   450
		     height:16
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   451
		     fromArray:#(
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   452
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   453
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   454
				   2r01111111 2r11111110
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   455
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   456
				   2r00111111 2r11111100
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   457
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   458
				   2r00011111 2r11111000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   459
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   460
				   2r00001111 2r11110000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   461
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   462
				   2r00000111 2r11100000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   463
				   2r00000011 2r11000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   464
				   2r00000011 2r11000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   465
				   2r00000001 2r10000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   466
				   2r00000001 2r10000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   467
				   2r00000000 2r00000000
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   468
				)).
1135
60b601b03082 give maskedPixelsAre0 hint.
Claus Gittinger <cg@exept.de>
parents: 1134
diff changeset
   469
    traceIcon maskedPixelsAre0:true.
1126
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   470
    traceIcon colorMap:(Array with:Color white with:Color red).
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   471
    TraceIcon := traceIcon.
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   472
    ^ traceIcon
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   473
eb49503214f8 moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents: 1098
diff changeset
   474
    "Created: 7.4.1997 / 17:31:58 / cg"
1161
4130c98f3268 dont update codeView twice when changing classes.
Claus Gittinger <cg@exept.de>
parents: 1155
diff changeset
   475
    "Modified: 22.4.1997 / 14:18:33 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   476
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   477
132
claus
parents: 131
diff changeset
   478
!BrowserView methodsFor:'change & update'!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   479
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   480
delayedUpdate:something with:someArgument from:changedObject
273
0fc84937f240 check oldMethod in method-update notification
Claus Gittinger <cg@exept.de>
parents: 264
diff changeset
   481
    |list selector oldMethod|
93
claus
parents: 92
diff changeset
   482
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   483
    (changedObject == Smalltalk) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   484
	something == #methodInClassRemoved ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   485
	    "/ ignored; I am dependent of individual class update messages
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   486
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   487
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   488
	something == #methodInClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   489
	    "/ ignored; I am dependent of individual class update messages
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   490
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   491
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   492
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   493
	self updateNamespaceList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   494
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   495
	something == #newClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   496
	    (currentClass notNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   497
	    and:[someArgument name = currentClass name]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   498
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   499
		 the current class has changed
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   500
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   501
		(aspect == #definition
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   502
		and:[codeView modified not]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   503
		    self refetchClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   504
		    self classSelectionChanged.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   505
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   506
		    self updateClassListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   507
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   508
		self warnLabel:'the selected class has changed'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   509
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   510
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   511
	    ((someArgument category = currentClassCategory)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   512
	    or:[currentClassCategory notNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   513
		and:[currentClassCategory startsWith:'*']]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   514
		self updateClassListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   515
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   516
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   517
	    someArgument category ~= currentClassCategory ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   518
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   519
		 category new ?
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   520
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   521
		(classCategoryListView notNil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   522
		and:[(list := classCategoryListView list) notNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   523
		and:[(list includes:someArgument category) not]])
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   524
		ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   525
		    self updateClassCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   526
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   527
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   528
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   529
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   530
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   531
	something == #classRemove ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   532
	    someArgument == currentClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   533
		self warnLabel:'the selected class was removed'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   534
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   535
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   536
	    " fall into general update "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   537
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   538
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   539
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   540
	 any other (unknown) change 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   541
	 with the Smalltalk dictionary ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   542
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   543
	self updateClassCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   544
	self updateClassListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   545
	^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   546
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   547
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   548
    changedObject isBehavior ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   549
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   550
	"/ its a class, that has changed
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   551
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   552
	fullClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   553
	    "/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   554
	    "/ full-class browser ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   555
	    "/ (must check for both class and metaclass changes)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   556
	    "/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   557
	    (currentClass == changedObject
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   558
	    or:[currentClass class == changedObject]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   559
		self warnLabel:'class was changed - the code shown may be obsolete'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   560
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   561
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   562
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   563
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   564
	(currentClass notNil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   565
	and:[changedObject name = currentClass name]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   566
	    "/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   567
	    "/ its the current class that has changed
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   568
	    "/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   569
	    ((something == #methodDictionary)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   570
	    or:[something == #methodTrap
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   571
	    or:[something == #methodPrivacy]]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   572
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   573
		"/ new feature: changeArg may be an array consisting of
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   574
		"/ the selector and the oldMethod
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   575
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   576
		someArgument isArray ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   577
		    oldMethod := someArgument at:2.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   578
		    selector := someArgument at:1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   579
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   580
		    selector := someArgument
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   581
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   582
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   583
		(selector isSymbol) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   584
		    |changedMethod s1 s2 oldMethodSelection oldMethodCategorySelection|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   585
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   586
		    "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   587
		     the method with selector was changed or removed
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   588
		    "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   589
		    methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   590
			oldMethodSelection := methodListView selection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   591
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   592
		    (something ~~ #methodTrap
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   593
		    and:[something ~~ #methodPrivacy]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   594
			methodCategoryListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   595
			    oldMethodCategorySelection := methodCategoryListView selection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   596
			    self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   597
			    methodCategoryListView selection:oldMethodCategorySelection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   598
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   599
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   600
		    self updateMethodListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   601
		    methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   602
			methodListView setSelection:oldMethodSelection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   603
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   604
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   605
		    classMethodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   606
			oldMethodSelection := classMethodListView selection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   607
			self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   608
			classMethodListView selection:oldMethodSelection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   609
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   610
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   611
		    selector == currentSelector ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   612
			"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   613
			 special care here: the currently shown method has been
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   614
			 changed somehow in another browser (or via fileIn)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   615
			"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   616
			changedMethod := currentClass compiledMethodAt:currentSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   617
			changedMethod isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   618
			    self warnLabel:'the method shown was removed'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   619
			    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   620
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   621
			"compare the source codes"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   622
			currentMethod notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   623
			    s1 := changedMethod source asString asCollectionOfLines copy.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   624
			    [s1 last isEmpty] whileTrue:[s1 removeLast].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   625
			    s2 := codeView contents  asCollectionOfLines copy.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   626
			    [s2 last isEmpty] whileTrue:[s2 removeLast].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   627
			    s1 = s2 ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   628
				self warnLabel:'method has changed - the code shown may be obsolete'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   629
			    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   630
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   631
			^ self    
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   632
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   633
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   634
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   635
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   636
	    something == #comment ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   637
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   638
		 the class has changed its comment; we dont care, except if
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   639
		 currently showing the comment
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   640
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   641
		aspect == #comment ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   642
		    codeView modified ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   643
			self refetchClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   644
			self updateCodeView
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   645
		    ] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   646
			self warnLabel:'the comment has changed - reselect to update'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   647
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   648
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   649
		self refetchClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   650
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   651
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   652
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   653
	    something == #definition ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   654
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   655
		 the class has changed its definition.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   656
		 Warn, except if showing a method.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   657
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   658
		aspect notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   659
		    codeView modified ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   660
			self refetchClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   661
			self updateCodeView
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   662
		    ] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   663
			self warnLabel:'the classes definition has changed - reselect to update'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   664
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   665
		    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   666
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   667
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   668
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   669
	    "/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   670
	    "/ if I am not showing code update if unmodified,
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   671
	    "/ warn if modified
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   672
	    "/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   673
	    aspect notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   674
		codeView modified ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   675
		    self refetchClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   676
		    self updateCodeView
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   677
		] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   678
		    self warnLabel:'the classes has changed - reselect to update'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   679
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   680
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   681
	    ].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   682
        
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   683
	    "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   684
	     get the class again - in case of a changed class definition,
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   685
	     we are otherwise refering to the obsolete old class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   686
	    "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   687
	    self refetchClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   688
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   689
	    self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   690
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   691
	    "dont update codeView ...."
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   692
	    "self update"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   693
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   694
	    self warnLabel:'the class has changed'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   695
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   696
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   697
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   698
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   699
	 any other class has changed (but not its organization, since
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   700
	 that is caught in the above case).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   701
	 We are not interested in it - except, if showing fullProtocol
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   702
	 or hierarchy ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   703
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   704
	currentClassHierarchy notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   705
	    fullProtocol ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   706
		(currentClass isSubclassOf:changedObject) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   707
		    self warnLabel:'some superclass has changed - reselect to update'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   708
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   709
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   710
		((currentClass isSubclassOf:changedObject)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   711
		or:[changedObject isSubclassOf:currentClass]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   712
		    self warnLabel:'some superclass has changed - reselect to update'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   713
		]                
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   714
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   715
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   716
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   717
	^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   718
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   719
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   720
    (changedObject isMethod) ifTrue:[
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   721
    ]
236
d94505a6f697 release currentMethod when compiling or change notification arrives
Claus Gittinger <cg@exept.de>
parents: 229
diff changeset
   722
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   723
    "Created: 4.1.1997 / 13:54:00 / cg"
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
   724
    "Modified: 7.3.1997 / 19:29:28 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   725
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   726
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   727
refetchClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   728
    "after a class definition change in another browser,
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   729
     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
   730
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   731
"/    currentClass := Smalltalk at:(currentClass name asSymbol).
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   732
    self switchToClass:(Smalltalk at:(currentClass name asSymbol)).
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   733
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   734
"/    showInstance ifTrue:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   735
"/        actualClass := currentClass
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   736
"/    ] ifFalse:[
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   737
"/        actualClass := currentClass class
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   738
"/    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   739
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   740
    "Created: 8.2.1996 / 13:22:27 / cg"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   741
    "Modified: 8.2.1996 / 13:40:18 / cg"
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   742
!
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   743
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   744
update:something with:someArgument from:changedObject
909
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
   745
    |argList sensor|
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   746
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   747
    (changedObject == ObjectMemory) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   748
	(something == #earlyRestart 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   749
	or:[something == #restarted
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   750
	or:[something == #returnFromSnapshot]]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   751
	    "/ those are to be ignored.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   752
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   753
	]
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   754
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   755
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   756
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   757
    "/ avoid update/warn after my own changes
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   758
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   759
    lockUpdates == true ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   760
	^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   761
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   762
927
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   763
    "/
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   764
    "/ quick hack: delayed update fails, if I autoload
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   765
    "/ LabelAndIcon in the update, and another browser
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   766
    "/ gets a chance to do an update as well, trying to
3b32af3cf5a6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   767
    "/ access the (temporarily nil) LabelAndIcon.
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   768
    "/ To get that beast out, do it synchronous for now.
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   769
    "/ also do it immediately, if not yet realized (no sensor)
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   770
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   771
    (LabelAndIcon isLoaded not
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   772
    or:[(sensor := self sensor) isNil]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   773
	^ self delayedUpdate:something with:someArgument from:changedObject
909
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
   774
    ].
ccbc84af922c oops - dont delay update if occurring during startup;
Claus Gittinger <cg@exept.de>
parents: 908
diff changeset
   775
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   776
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   777
    "/ if such an update is already in the queue, ignore it.
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   778
    "/ 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
   779
    "/
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   780
    argList := Array with:something 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   781
		     with:someArgument 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   782
		     with:changedObject.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   783
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   784
    (sensor 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   785
	hasEvent:#delayedUpdate:with:from:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   786
	for:self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   787
	withArguments:argList) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   788
	^ self
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   789
    ].
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   790
    sensor
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   791
	pushUserEvent:#delayedUpdate:with:from:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   792
	for:self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   793
	withArguments:argList
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
   794
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
   795
    "Modified: 26.3.1997 / 18:29:51 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
   796
! !
f2c56efa3599 Initial revision
claus
parents:
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
!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
   799
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   800
classCategoryClone
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   801
    "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
   802
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   803
    SystemBrowser openInClass:actualClass selector:currentSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   804
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   805
    "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
   806
    "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
   807
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   808
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   809
classCategoryFileOut
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   810
    "create a file 'categoryName.st' consisting of all classes in current category
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   811
     into the current projects defaultDirectory."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   812
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   813
    self classCategoryFileOutAsk:false
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   814
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   815
    "Modified: 11.10.1997 / 16:47:46 / cg"
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   816
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   817
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   818
classCategoryFileOutAs
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   819
    "create a file consisting of all classes in the current category
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   820
     into a file as user-specified."
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   821
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   822
    self classCategoryFileOutAsk:true
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   823
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   824
    "Modified: 11.10.1997 / 16:38:56 / cg"
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   825
    "Created: 11.10.1997 / 16:44:35 / cg"
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   826
!
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   827
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   828
classCategoryFileOutAsk:doAsk
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   829
    "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
   830
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   831
    |aStream fileName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   832
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   833
    self checkClassCategorySelected ifFalse:[^ self].
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   834
    (currentClassCategory startsWith:'*') ifTrue:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   835
        self warn:(resources string:'try a real category').
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   836
        ^ self
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   837
    ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   838
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   839
    fileName := currentClassCategory asString , '.st'.
1316
3fefcc2e9b16 mostly filename changes
Claus Gittinger <cg@exept.de>
parents: 1313
diff changeset
   840
    fileName replaceAll:Character space with:$_.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   841
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   842
    self withBusyCursorDo:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   843
        |saveName fileBox dir|
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   844
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   845
        doAsk ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   846
            fileBox := FileSelectionBox
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   847
                            title:(resources string:'fileOut %1 as:' with:currentClassCategory)
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   848
                            okText:(resources string:'fileOut')
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   849
                            abortText:(resources string:'cancel')
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   850
                            action:[:fileName | saveName := fileName].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   851
            fileBox initialText:fileName.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   852
            dir := FileSelectionBox lastFileSelectionDirectory.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   853
            dir isNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   854
                "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   855
                 this test allows a smalltalk to be built without Projects/ChangeSets
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   856
                "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   857
                Project notNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   858
                    dir := Project currentProjectDirectory
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   859
                ]
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   860
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   861
            dir notNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   862
                fileBox directory:dir.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   863
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   864
            fileBox showAtPointer.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   865
            fileBox destroy.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   866
            saveName isNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   867
                ^ self
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   868
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   869
            saveName isEmpty ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   870
                self warn:'bad name given'.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   871
                ^ self
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   872
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   873
            FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   874
            fileName := saveName.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   875
        ] ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   876
            "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   877
             this test allows a smalltalk to be built without Projects/ChangeSets
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   878
            "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   879
            Project notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   880
                fileName := Project currentProjectDirectory asFilename constructString: fileName.
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   881
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   882
        ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   883
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   884
        "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   885
         if file exists, save original in a .sav file
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   886
        "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   887
        fileName asFilename exists ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   888
            self busyLabel:'saving existing %1' with:fileName.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   889
            fileName asFilename copyTo:(fileName , '.sav')
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   890
        ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   891
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   892
        aStream := FileStream newFileNamed:fileName.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   893
        aStream isNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   894
            self warn:'cannot create: %1' with:fileName
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   895
        ] ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   896
            self busyLabel:'writing: %1' with:fileName.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   897
            self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   898
                aClass isPrivate ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   899
                    (self listOfNamespaces includesIdentical:aClass nameSpace)
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   900
                    ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   901
                        self busyLabel:'writing: %1' with:fileName.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   902
                        aClass fileOutOn:aStream.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   903
                    ]
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   904
                ]
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   905
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   906
            aStream close.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
   907
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   908
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   909
    self normalLabel.
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   910
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   911
    "Created: / 11.10.1997 / 16:38:29 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   912
    "Modified: / 28.10.1997 / 14:35:50 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   913
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   914
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   915
classCategoryFileOutBinaryEach
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   916
    "fileOut each class in the current category as binary bytecode."
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   917
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   918
    |mode|
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   919
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   920
    (currentClassCategory startsWith:'*') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   921
	self warn:(resources string:'try a real category').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   922
	^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   923
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   924
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   925
    mode := Dialog choose:(resources string:'save including sources ?')
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   926
		   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   927
		   values:#(nil #discard #reference #keep)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   928
		   default:#keep.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   929
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   930
    mode isNil ifTrue:[^ self].
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   931
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   932
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   933
	self allClassesInCategory:currentClassCategory do:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   934
	    aClass isPrivate ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   935
		(self listOfNamespaces includesIdentical:aClass nameSpace)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   936
		ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   937
		    self busyLabel:'saving binary of: %1' with:aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   938
		    Class fileOutErrorSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   939
			self warn:'cannot create: %1' with:ex parameter.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   940
			ex return.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   941
		    ] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   942
			aClass binaryFileOutWithSourceMode:mode.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   943
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   944
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   945
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   946
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   947
	self normalLabel.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   948
    ]
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   949
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   950
    "Created: 25.1.1996 / 17:27:45 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   951
    "Modified: 18.8.1997 / 15:42:30 / cg"
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   952
!
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
   953
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   954
classCategoryFileOutEach
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   955
    (currentClassCategory startsWith:'*') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   956
	self warn:(resources string:'try a real category').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   957
	^ self
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   958
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
   959
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   960
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   961
	self allClassesInCategory:currentClassCategory do:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   962
	    aClass isPrivate ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   963
		(self listOfNamespaces includesIdentical:aClass nameSpace)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   964
		ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   965
		    self busyLabel:'saving: %1' with:aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   966
		    Class fileOutErrorSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   967
			self warn:'cannot fileOut: %1\(%2)' with:aClass name with:ex errorString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   968
			ex return.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   969
		    ] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   970
			aClass fileOut
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   971
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   972
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   973
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   974
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   975
	self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   976
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
   977
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   978
    "Modified: 18.8.1997 / 15:42:35 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   979
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   980
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   981
classCategoryFindClass
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   982
    "find a class - and switch by default"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   983
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
   984
    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
   985
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   986
    "Modified: 15.1.1997 / 22:55:20 / cg"
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
   987
!
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
   988
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
   989
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
   990
    "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
   991
     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
   992
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
   993
    |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
   994
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
   995
    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
   996
    open ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   997
	title := 'class to browse:'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   998
	okText := 'open'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   999
	okText2 := 'find here'.
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
  1000
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1001
	title := 'class to find:'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1002
	okText := 'find'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1003
	okText2 := 'open new'.
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
  1004
    ].
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
  1005
    box := self enterBoxForCodeSelectionTitle:title okText:okText.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1006
    box label:(resources string:'browse or search class').
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
  1007
    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
  1008
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
  1009
    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
  1010
       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
  1011
       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
  1012
       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
  1013
    ].
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
  1014
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1015
    box entryCompletionBlock:[:contents |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1016
	|s what m|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1017
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1018
	s := contents withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1019
	what := Smalltalk classnameCompletion:s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1020
	box contents:what first.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1021
	(what at:2) size ~~ 1 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1022
	    self beep
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1023
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1024
    ].
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
  1025
    box action:[:aString |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1026
			|brwsr|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1027
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1028
			open ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1029
			    brwsr := SystemBrowser open
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1030
			] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1031
			    brwsr := self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1032
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1033
			brwsr switchToClassNameMatching:aString
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1034
		].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1035
    box showAtPointer
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1036
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
  1037
    "Created: 1.6.1996 / 16:03:15 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1038
    "Modified: 15.1.1997 / 23:14:16 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1039
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1040
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1041
classCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1042
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1043
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1044
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1045
		listBoxForCodeSelectionTitle:'selector to find:' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1046
		okText:'find'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1047
    box label:(resources string:'find method').
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1048
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1049
    box entryCompletionBlock:[:contents |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1050
	|s what m|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1051
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1052
	s := contents withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1053
	box topView withWaitCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1054
	    what := Smalltalk selectorCompletion:s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1055
	    box list:(what at:2).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1056
	    box contents:what first.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1057
	    (what at:2) size ~~ 1 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1058
		self beep
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1059
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1060
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1061
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1062
    box action:[:aString | self switchToAnyMethod:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1063
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1064
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1065
    "Modified: 30.8.1995 / 22:49:49 / claus"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1066
    "Modified: 15.1.1997 / 23:19:08 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1067
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1068
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1069
classCategoryMenu
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1070
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  1071
    <resource: #keyboard ( #Find #Cmdn) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1072
    <resource: #programMenu >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  1073
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1074
    |specialMenu m labels selectors shorties|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1075
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1076
    currentClassCategory notNil ifTrue:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1077
        labels :=  #(
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1078
                        'fileOut each binary ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1079
                        '-'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1080
                        'repository history ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1081
                        'validate class revisions'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1082
                        '-'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1083
                        'checkin each ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1084
                    ).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1085
        selectors := #(
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1086
                        classCategoryFileOutBinaryEach
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1087
                        nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1088
                        classCategoryRepositoryHistory
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1089
                        classCategoryValidateClassRevisions
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1090
                        nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1091
                        classCategoryCheckinEach
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1092
                     ).
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1093
    ] ifFalse:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1094
        labels :=  #(
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1095
                        'repository history ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1096
                    ).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1097
        selectors := #(
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1098
                        classCategoryRepositoryHistory
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1099
                     ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1100
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1101
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1102
    specialMenu := PopUpMenu 
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1103
                        labels:(resources array:labels)
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1104
                        selectors:selectors
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1105
                        receiver:self.
338
1d4a76bf6e8f added binaryFileOutCategoryEach
Claus Gittinger <cg@exept.de>
parents: 337
diff changeset
  1106
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  1107
    Smalltalk sourceCodeManager isNil ifTrue:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1108
        specialMenu disableAll:#(classCategoryRepositoryHistory  
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1109
                                 classCategoryCheckinEach
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1110
                                 classCategoryValidateClassRevisions).
710
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  1111
    ].
fbf71e0089eb only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents: 706
diff changeset
  1112
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1113
    device ctrlDown ifTrue:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1114
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1115
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1116
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1117
    currentClassCategory isNil ifTrue:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1118
        labels := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1119
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1120
"/                    '-'
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1121
                    'clone'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1122
                    'open for class ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1123
                    'spawn full class'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1124
                    '-'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1125
                    'update'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1126
                    'find class ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1127
                    'find method ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1128
                    '-'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1129
                    'new class category ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1130
                    '='
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1131
                    'others'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1132
                   ).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1133
        selectors := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1134
"/                    namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1135
"/                    nil
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1136
                    classCategoryClone
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1137
                    classCategoryOpenInClass
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1138
                    classCategorySpawnFullClass
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1139
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1140
                    classCategoryUpdate
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1141
                    classCategoryFindClass
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1142
                    classCategoryFindMethod
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1143
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1144
                    classCategoryNewCategory
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1145
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1146
                    otherMenu
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1147
                   ).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1148
        shorties := #(
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1149
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1150
"/                    nil
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1151
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1152
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1153
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1154
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1155
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1156
                    Find
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1157
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1158
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1159
                    Cmdn
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1160
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1161
                    #'Ctrl'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1162
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1163
    ] ifFalse:[
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1164
        labels := #(
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1165
                    'fileOut'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1166
                    'fileOut as ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1167
                    'fileOut each'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1168
                    'printOut' 
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1169
                    'printOut protocol'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1170
                    '-'
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1171
"/                    'namespace ...'
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1172
"/                    '-'
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1173
                    'clone'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1174
                    'open for class ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1175
                    'SPAWN_CATEGORY'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1176
                    'spawn full class'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1177
                    '-'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1178
                    'update'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1179
                    'find class ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1180
                    'find method ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1181
                    '-'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1182
                    'new class category ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1183
                    'rename ...'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1184
                    'remove'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1185
                    '='
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1186
                    'others'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1187
                   ).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1188
        selectors := #(
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1189
                   classCategoryFileOut
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1190
                   classCategoryFileOutAs
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1191
                   classCategoryFileOutEach
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1192
                   classCategoryPrintOut
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1193
                   classCategoryPrintOutProtocol
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1194
                   nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1195
"/                   namespaceDialog    
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1196
"/                   nil
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1197
                   classCategoryClone
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1198
                    classCategoryOpenInClass
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1199
                   classCategorySpawn
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1200
                   classCategorySpawnFullClass
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1201
                   nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1202
                   classCategoryUpdate
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1203
                   classCategoryFindClass
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1204
                   classCategoryFindMethod
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1205
                   nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1206
                   classCategoryNewCategory
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1207
                   classCategoryRename
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1208
                   classCategoryRemove
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1209
                   nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1210
                   otherMenu
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1211
                   ).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1212
        shorties := #(
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1213
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1214
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1215
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1216
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1217
                    nil
1345
767926e950e1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
  1218
                    nil
809
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1219
"/                    nil
f333068dc7cf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 805
diff changeset
  1220
"/                    nil
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1221
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1222
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1223
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1224
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1225
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1226
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1227
                    Find
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1228
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1229
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1230
                    Cmdn
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1231
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1232
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1233
                    nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1234
                    #'Ctrl'
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1235
                   ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1236
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1237
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1238
    m := PopUpMenu 
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1239
                labels:(resources array:labels)
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1240
                selectors:selectors
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  1241
                accelerators:shorties.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  1242
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1243
    m subMenuAt:#otherMenu put:specialMenu.
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  1244
    ^ m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1245
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1246
    "Created: / 14.9.1995 / 10:50:17 / claus"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  1247
    "Modified: / 27.10.1997 / 20:45:52 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1248
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1249
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1250
classCategoryNewCategory
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1251
    |box|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1252
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1253
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1254
		enterBoxTitle:'name of new class category:' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1255
		okText:'create'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1256
		label:'create category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1257
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1258
    box action:[:aString |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1259
	|categories|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1260
	categories := classCategoryListView list.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1261
	(categories includes:aString) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1262
	    categories add:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1263
	    categories sort.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1264
	    classCategoryListView setContents:categories.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1265
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1266
	currentClassCategory := aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1267
	classCategoryListView setSelectElement:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1268
	self switchToClass:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1269
	actualClass := acceptClass := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1270
	self classCategorySelectionChanged
79
d78f92a07d5d *** empty log message ***
claus
parents: 74
diff changeset
  1271
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1272
    box showAtPointer
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1273
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
  1274
    "Modified: 19.8.1996 / 18:25:41 / stefan"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1275
    "Modified: 15.1.1997 / 23:06:46 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1276
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1277
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1278
classCategoryOpenInClass
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1279
    "find a class - and open a browser (by default)"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1280
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
  1281
    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
  1282
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1283
    "Modified: 15.1.1997 / 22:55:32 / cg"
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1284
!
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  1285
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1286
classCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1287
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1288
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1289
    self allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1290
	(self listOfNamespaces includesIdentical:aClass nameSpace)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1291
	ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1292
	    printStream := Printer new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1293
	    aClass printOutOn:printStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1294
	    printStream close
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1295
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1296
    ]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  1297
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1298
    "Modified: 16.1.1997 / 20:22:23 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1299
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1300
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1301
classCategoryPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1302
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1303
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1304
    Smalltalk allClassesInCategory:currentClassCategory inOrderDo:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1305
	(self listOfNamespaces includesIdentical:aClass nameSpace)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1306
	ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1307
	    printStream := Printer new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1308
	    aClass printOutProtocolOn:printStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1309
	    printStream close
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1310
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1311
    ]
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1312
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1313
    "Modified: 16.1.1997 / 20:22:12 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1314
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1315
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1316
classCategoryRemove
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1317
    "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
  1318
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1319
    |count overallCount 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
  1320
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1321
    self checkClassCategorySelected ifFalse:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1322
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1323
    classesToRemove := IdentitySet new.
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1324
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1325
    self allClassesInSelectedNamespacesDo:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1326
	aClass category = currentClassCategory ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1327
	    classesToRemove add:aClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1328
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1329
    ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1330
    subclassesRemoved := IdentitySet new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1331
    classesToRemove do:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1332
	aClass allSubclassesDo:[:aSubclass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1333
	    (classesToRemove includes:aSubclass) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1334
		(subclassesRemoved includes:aSubclass) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1335
		    subclassesRemoved add:aSubclass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1336
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1337
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1338
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1339
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1340
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1341
    count := overallCount := classesToRemove size.
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1342
    t := resources string:'remove "%1" ?' with:currentClassCategory.
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1343
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1344
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1345
       count == 1 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1346
	   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
  1347
       ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1348
	   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
  1349
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1350
       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
  1351
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1352
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1353
    count := subclassesRemoved size.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1354
    overallCount := overallCount + count.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1355
    count ~~ 0 ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1356
       count == 1 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1357
	   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
  1358
       ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1359
	   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
  1360
       ].
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1361
       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
  1362
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1363
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1364
    t := t withCRs.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1365
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1366
    box := YesNoBox 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1367
	       title:t
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1368
	       yesText:(resources at:'remove')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1369
	       noText:(resources at:'abort').
333
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1370
    box label:(resources at:'remove category').
245f0a972fc9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
  1371
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1372
    overallCount ~~ 0 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1373
	"/ should we disable the returnDefault here ?
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1374
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1375
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1376
    box confirm ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1377
	"after querying user - do really remove classes in list1 and list2"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1378
	|keep idx|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1379
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1380
	keep := false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1381
	(subclassesRemoved asOrderedCollection
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1382
	 , classesToRemove asOrderedCollection) do:[:aClassToRemove |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1383
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1384
	    (CheckForInstancesWhenRemovingClasses not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1385
	     or:[aClassToRemove hasInstances not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1386
	     or:[self confirm:(resources string:'%1 has instances - remove anyway ?' with:aClassToRemove name)]] 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1387
	    ) ifTrue:[   
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1388
		aClassToRemove removeFromSystem
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1389
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1390
		keep := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1391
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1392
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1393
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1394
	self updateClassCategoryList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1395
	(classCategoryListView list includes:currentClassCategory) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1396
	    currentClassCategory := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1397
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1398
	self classCategorySelectionChanged.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1399
        
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1400
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1401
	self switchToClass:nil.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1402
"/        keep ifFalse:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1403
"/            idx := classCategoryListView list indexOf:currentClassCategory.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1404
"/            currentClassCategory := nil.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1405
"/            idx ~= 0 ifTrue:[
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1406
"/                classCategoryListView removeIndex:idx.
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1407
"/            ].
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  1408
"/        ].
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1409
    ].
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  1410
    box destroy
694
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
  1411
af82075139a1 Fix #classCategoryNewCategory and #classCategoryRemove.
Stefan Vogel <sv@exept.de>
parents: 677
diff changeset
  1412
    "Modified: 19.8.1996 / 23:22:35 / stefan"
1280
54b004f16f9d use #removeFromSystem (to class) to remove a class.
Claus Gittinger <cg@exept.de>
parents: 1278
diff changeset
  1413
    "Modified: 12.8.1997 / 02:24:01 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1414
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1415
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1416
classCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1417
    "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
  1418
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1419
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1420
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1421
    self checkClassCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1422
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1423
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1424
		enterBoxTitle:(resources string:'rename category ''%1'' to:' with:currentClassCategory) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1425
		okText:'rename'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1426
		label:'rename category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1427
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1428
    box initialText:currentClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1429
    box action:[:aString | self renameCurrentClassCategoryTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1430
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1431
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1432
    "Modified: 15.1.1997 / 23:10:12 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1433
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1434
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1435
classCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1436
    "create a new SystemBrowser browsing current classCategory"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1437
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1438
    currentClassCategory notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1439
	self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1440
	    SystemBrowser browseClassCategory:currentClassCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1441
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1442
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1443
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1444
    "Modified: 18.8.1997 / 15:42:58 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1445
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1446
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1447
classCategorySpawnFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1448
    "create a new SystemBrowser browsing full class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1449
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1450
    |newBrowser|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1451
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1452
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1453
	newBrowser := SystemBrowser browseFullClasses
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1454
" "
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1455
	.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1456
	currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1457
	    newBrowser switchToClassNamed:(currentClass name)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1458
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1459
" "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1460
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1461
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1462
    "Modified: 18.8.1997 / 15:43:01 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1463
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1464
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1465
classCategoryUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1466
    "update class category list and dependants"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1467
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1468
    |oldClassName oldMethodCategory|
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
    classCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1471
	self setListOfNamespaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1472
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1473
	currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1474
	    oldClassName := currentClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1475
	    (oldClassName endsWith:'-old') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1476
		oldClassName := oldClassName copyWithoutLast:4 "copyTo:(oldClassName size - 4)"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1477
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1478
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1479
	oldMethodCategory := currentMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1480
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1481
	classCategoryListView setContents:(self listOfAllClassCategories).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1482
	currentClassCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1483
	    classCategoryListView setSelectElement:currentClassCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1484
	    self classCategorySelectionChanged.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1485
	    oldClassName notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1486
		classListView setSelectElement:oldClassName.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1487
		self switchToClass:(Smalltalk at:oldClassName asSymbol).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1488
		self classSelectionChanged.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1489
		oldMethodCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1490
		    methodCategoryListView setSelectElement:oldMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1491
		    currentMethodCategory := oldMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1492
		    self methodCategorySelectionChanged
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1493
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1494
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1495
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1496
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1497
	self updateNamespaceList
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1498
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1499
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  1500
    "Modified: 8.1.1997 / 10:57:57 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1501
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1502
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1503
!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
  1504
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1505
classCategoryCheckinEach
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1506
    (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
  1507
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1508
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1509
	|logMessage classes|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1510
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1511
	logMessage := self getLogMessageFor:'(any in classCategory ', currentClassCategory, ')'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1512
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1513
	logMessage notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1514
	    (currentClassCategory = '* all *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1515
	    or:[currentClassCategory = '* hierarchy *']) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1516
		classes := self allClasses
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1517
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1518
		classes := self allClassesInCategory:currentClassCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1519
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1520
	    "/ ignore private classes
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1521
	    classes := classes select:[:aClass | aClass owningClass isNil].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1522
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1523
	    lastSourceLogMessage := logMessage.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1524
	    classes do:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1525
		self busyLabel:'checking in %1' with:aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1526
		"/ ca does not want boxes to pop up all over ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1527
		InformationSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1528
		    Transcript showCR:ex errorString
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1529
		] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1530
		    self classCheckin:aClass withLog:logMessage
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1531
"/                    (aClass sourceCodeManager) 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1532
"/                        checkinClass:aClass 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  1533
"/                        logMessage:logMessage.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1534
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1535
		self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1536
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1537
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1538
	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
  1539
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1540
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1541
    "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
  1542
    "Modified: 15.6.1996 / 00:25:58 / stefan"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1543
    "Modified: 18.8.1997 / 15:42:21 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1544
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1545
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1546
classCategoryRepositoryHistory
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1547
    (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
  1548
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1549
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1550
	|timeGoal aStream box y component timeGoalListPop|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1551
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1552
	box := Dialog new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1553
	(box addTextLabel:(resources string:'repository change report')) adjust:#left.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1554
	box addVerticalSpace:20.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1555
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1556
	timeGoal := 'yesterday' asValue. 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1557
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1558
	y := box yPosition.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1559
	component := box addTextLabel:(resources string:'list changes since (mm/dd):').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1560
	component width:0.5; adjust:#right; borderWidth:0.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1561
	box yPosition:y.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1562
	timeGoalListPop := box addComboBoxOn:timeGoal tabable:true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1563
	timeGoalListPop width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1564
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1565
	timeGoalListPop list:#('yesterday'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1566
			       'a week ago'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1567
			       'a month ago'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1568
			       'a year ago'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1569
			       'all'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1570
			      ).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1571
	box addAbortButton; addOkButton.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1572
	box open.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1573
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1574
	box accepted ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1575
	    timeGoal := timeGoal value.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1576
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1577
"/        timeGoal := Dialog 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1578
"/                         request:'list changed repository containers since (mm/dd):
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1579
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1580
"/You can also specify the date as 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1581
"/''yesterday'', ''a week ago'' or ''a month ago''
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1582
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1583
"/'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1584
"/                         initialAnswer:'yesterday'  
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1585
"/                         onCancel:nil.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1586
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1587
"/        timeGoal notNil ifTrue:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1588
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  1589
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1590
	    self busyLabel:'extracting history ...' with:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1591
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1592
	    aStream := WriteStream on:(String new:200).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1593
	    Processor activeProcess withLowerPriorityDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1594
		SourceCodeManager notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1595
		    SourceCodeManager
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1596
			writeHistoryLogSince:timeGoal
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1597
			to:aStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1598
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1599
		    aStream nextPutLine:'no history available (no SourceCodeManagement installed)'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1600
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1601
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1602
	    codeView contents:(aStream contents).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1603
	    codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1604
	    codeView acceptAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1605
	    codeView explainAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1606
	    methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1607
		methodListView setSelection:nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1608
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1609
	    aspect := nil.      
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1610
	    self normalLabel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1611
	].
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1612
    ]
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1613
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1614
    "Created: 23.11.1995 / 11:41:38 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1615
    "Modified: 18.8.1997 / 15:42:46 / cg"
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1616
!
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1617
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1618
classCategoryValidateClassRevisions
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1619
    "for all classes, ask the sourceCodeManager for the most recent version
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  1620
     and compare this to the actual version. Send mismatch info to the Transcript.
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  1621
     Use this, to find classes, which need to be reloaded from the repository."
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1622
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1623
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1624
	|logMessage classes repVersion clsVersion binVersion
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1625
	 count unloadedCount badCount cat needCheckIn|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1626
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1627
	cat := currentClassCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1628
	(cat = '* hierarchy *') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1629
	    cat := '* all *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1630
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1631
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1632
	classes := self listOfAllClassesInCategory:cat names:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1633
	classes isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1634
	    Transcript showCR:'no classes to validate'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1635
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1636
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1637
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1638
	count := unloadedCount := badCount := needCheckIn := 0.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1639
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1640
	Transcript cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1641
	Transcript showCR:'-------------------------------------------------'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1642
	Transcript showCR:'checking class revisions vs. repository ...'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1643
	Transcript cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1644
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1645
	classes do:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1646
	    |clsName msg sourceCodeManager repSource currentSource aStream|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1647
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1648
	    count := count + 1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1649
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1650
	    "/ ignore autoloaded and private classes here
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  1651
                
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1652
	    clsName := aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1653
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1654
	    aClass isLoaded ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1655
		unloadedCount := unloadedCount + 1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1656
		(currentClassCategory ~= '* all *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1657
		and:[currentClassCategory ~= '* hierarchy *']) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1658
		    msg := '?? ''' , clsName , ''' is not loaded - skipped check'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1659
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1660
	    ] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1661
		((aClass isNamespace not or:[aClass == Smalltalk])
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1662
		and:[aClass topOwningClass isNil]) ifTrue:[
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  1663
                
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  1664
"/                    self busyLabel:'validating %1 ...' with:aClass name.
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  1665
                
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1666
		    sourceCodeManager := aClass sourceCodeManager.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1667
		    sourceCodeManager isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1668
			msg := '?? ''' , clsName , ''' has no sourceCodeManager - skipped check'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1669
		    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1670
			repVersion := sourceCodeManager newestRevisionOf:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1671
			repVersion isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1672
			    msg := '-- ' , clsName 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1673
				    , ' not in repository'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1674
			] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1675
			    clsVersion := aClass revision.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1676
			    binVersion := aClass binaryRevision.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1677
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1678
			    clsName := aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1679
			    msg := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1680
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1681
			    clsVersion ~= repVersion ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1682
				badCount := badCount + 1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1683
				msg := '** ' , clsName 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1684
					, ' is not up-to-date (this: '
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1685
					, clsVersion printString
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1686
					, ' repository: '
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1687
					, repVersion printString
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1688
					, ').'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1689
				msg := msg asText allBold.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1690
			    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1691
				clsVersion ~= binVersion ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1692
				    binVersion notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1693
					msg := clsName
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1694
					       , ' up-to-date (but should be stc-recompiled)'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1695
				    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1696
				] ifFalse:[
1096
3e3af3c70de1 handle no-sourceCodeManager case when validating classes.
Claus Gittinger <cg@exept.de>
parents: 1095
diff changeset
  1697
    "/                              msg := clsName , ' is up-to-date.'
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1698
				].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1699
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1700
				"/ compare the sources;
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1701
				"/ to find classes which need a checkin.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1702
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1703
				aStream := sourceCodeManager getMostRecentSourceStreamForClassNamed:aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1704
				repSource := aStream contents asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1705
				aStream close.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1706
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1707
				aStream := '' writeStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1708
				Method flushSourceStreamCache.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1709
				aClass fileOutOn:aStream withTimeStamp:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1710
				currentSource := aStream contents asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1711
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1712
				repSource ~= currentSource ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1713
				    msg := '-- ' , clsName , ' should be checked into the repository'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1714
				    needCheckIn := needCheckIn + 1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1715
				].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1716
			    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1717
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1718
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1719
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1720
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1721
	    msg notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1722
		Transcript showCR:msg
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1723
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1724
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1725
	Transcript cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1726
	Transcript showCR:'----------------------------------------------------------'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1727
	Transcript showCR:('%1 classes / %2 unloaded / %3 need checkout / %4 need checkin.'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1728
			   bindWith:count with:unloadedCount with:badCount with:needCheckIn).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1729
	Transcript showCR:'----------------------------------------------------------'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1730
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1731
	self normalLabel.
818
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1732
    ]
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1733
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1734
    "Modified: 15.6.1996 / 00:25:58 / stefan"
b6ab52f835f1 added validate-revisions menu item
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
  1735
    "Created: 29.10.1996 / 13:21:08 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1736
    "Modified: 18.8.1997 / 15:43: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
  1737
! !
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  1738
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1739
!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
  1740
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1741
checkClassCategorySelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1742
    currentClassCategory isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1743
	self warn:'select a class category first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1744
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1745
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1746
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1747
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1748
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1749
classCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1750
    "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
  1751
     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
  1752
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1753
    |newCategory oldClass oldName classIndex list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1754
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1755
    newCategory := classCategoryListView selectionValue.
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  1756
    (newCategory = '* all *'
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  1757
    or:[newCategory = '* hierarchy *']) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1758
	"switch to all or hierarchy:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1759
	 remember current class and reselect it
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1760
	 after showing the updated class list
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1761
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1762
	oldClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1763
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1764
    currentClassCategory := newCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1765
    oldClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1766
	self classCategorySelectionChanged
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1767
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1768
	oldName := oldClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1769
	self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1770
	    self updateClassList
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1771
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1772
	"stupid - search for class name in (indented) list"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1773
	list := classListView list.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1774
	list notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1775
	    classIndex := list findFirst:[:elem | elem endsWith:oldName].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1776
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1777
	    classIndex := 0
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1778
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1779
	classIndex ~~ 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1780
	    classListView setSelection:classIndex.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1781
	    self switchToClass:(Smalltalk at:(oldName asSymbol))
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1782
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1783
	    self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1784
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1785
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  1786
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1787
    "Modified: 18.8.1997 / 15:42:49 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1788
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1789
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1790
classCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1791
    "class category has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1792
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1793
    self withBusyCursorDo:[
1363
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1794
        self switchToClass:nil.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1795
        aspect := nil.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1796
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1797
        actualClass := acceptClass := nil.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1798
        currentMethodCategory := nil.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1799
        currentMethod := currentSelector := nil.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1800
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1801
        self updateClassList.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1802
        self updateMethodCategoryList.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1803
        self updateMethodList.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1804
        self updateCodeView.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1805
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1806
        codeView explainAction:nil.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1807
        codeView acceptAction:nil.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1808
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1809
        (currentClassCategory = '* removed *') ifTrue:[
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1810
            codeView contents:'these classes have been removed (i.e. they are no longer accessable as globals),
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1811
but there are still referenced instances of them around.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1812
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1813
They will vanish later (be garbage collected) when the instances are no longer referenced.
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1814
'
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1815
        ]
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1816
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1817
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  1818
1363
aca9cc3e7f09 note when selecting removed category
Claus Gittinger <cg@exept.de>
parents: 1362
diff changeset
  1819
    "Modified: / 31.10.1997 / 11:46:50 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1820
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1821
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1822
listOfAllClassCategories
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1823
    "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
  1824
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  1825
    |nameSpaceList newList cat allNameSpaces|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1826
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1827
    newList := Set new.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1828
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  1829
    currentNamespace = '* all *' ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1830
	nameSpaceList := Array with:Smalltalk.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1831
	allNameSpaces := true.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  1832
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1833
	nameSpaceList := self listOfNamespaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1834
	allNameSpaces := false.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  1835
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  1836
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  1837
    nameSpaceList do:[:aNamespace |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1838
	aNamespace allBehaviorsDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1839
	    aClass isMeta ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1840
		(aClass isNamespace not 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1841
		or:[aClass == Namespace 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1842
		or:[aClass == Smalltalk]]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1843
		    (allNameSpaces or:[aClass nameSpace == aNamespace]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1844
			cat := aClass category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1845
			cat isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1846
			    cat := '* no category *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1847
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1848
			cat ~= 'obsolete' ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1849
			    newList add:cat
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1850
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1851
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1852
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1853
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1854
	]
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1855
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1856
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1857
    newList notEmpty ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1858
	newList add:'* all *'; add:'* hierarchy *'.
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1859
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1860
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1861
    ^ newList asOrderedCollection sort.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  1862
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  1863
    "Modified: 5.1.1997 / 17:12:01 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1864
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1865
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1866
renameCurrentClassCategoryTo:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1867
    "helper - do the rename"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1868
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1869
    |any categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1870
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1871
    currentClassCategory notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1872
	any := false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1873
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1874
	self allClassesInSelectedNamespacesDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1875
	    aClass category = currentClassCategory ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1876
		aClass category:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1877
		any := true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1878
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1879
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1880
	any ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1881
	    categories := classCategoryListView list.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1882
	    categories remove:currentClassCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1883
	    categories add:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1884
	    categories sort.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1885
	    classCategoryListView setContents:categories.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1886
	    currentClassCategory := aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1887
	    classCategoryListView setSelectElement:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1888
	] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1889
	    currentClassCategory := aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1890
	    self updateClassCategoryList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1891
	    self updateClassListWithScroll:false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1892
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1893
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  1894
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  1895
    "Modified: 16.1.1997 / 20:20:38 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1896
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1897
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1898
switchToAnyMethod:aSelectorString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1899
    "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
  1900
     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
  1901
     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
  1902
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1903
    |classes sel box theClassName|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1904
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1905
    classes := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1906
    aSelectorString knownAsSymbol ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1907
	sel := aSelectorString asSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1908
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1909
	Smalltalk allClassesDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1910
	    (aClass includesSelector:sel) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1911
		classes add:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1912
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1913
	    (aClass class includesSelector:sel) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1914
		classes add:aClass class.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1915
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1916
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1917
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1918
    classes size == 0 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1919
	SystemBrowser showNoneFound.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1920
	^ self
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1921
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1922
    classes size > 1 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1923
	box := ListSelectionBox 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1924
		    title:(resources string:'#%1\\in which class ?' with:aSelectorString) withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1925
	box label:'find method'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1926
	box okText:(resources string:'show').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1927
	box list:(classes collect:[:aClass | aClass name]) asSortedCollection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1928
	box action:[:aString | theClassName := aString].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1929
	box entryCompletionBlock:[:contents |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1930
	    |s l what m|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1931
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1932
	    s := contents withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1933
	    l := classes select:[:cls | cls name startsWith:s].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1934
	    l size > 0 ifTrue:[    
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1935
		box list:(l collect:[:aClass | aClass name]) asSortedCollection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1936
		box contents:l first name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1937
		l size ~~ 1 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1938
		    self beep
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1939
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1940
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1941
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1942
	box showAtPointer.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1943
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1944
	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
  1945
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1946
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1947
    theClassName notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1948
	self switchToClassNamed:theClassName. 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1949
	self updateMethodCategoryList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1950
	self switchToMethodNamed:aSelectorString.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1951
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1952
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1953
    "Modified: 1.9.1995 / 01:39:58 / claus"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  1954
    "Modified: 15.1.1997 / 23:20:51 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1955
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1956
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  1957
updateClassCategoryList
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  1958
    self updateClassCategoryListWithScroll:true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  1959
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  1960
    "Modified: 8.1.1997 / 10:58:06 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1961
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1962
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1963
updateClassCategoryListWithScroll:scroll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1964
    |oldClassCategory oldClass oldMethodCategory oldMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1965
     oldSelector newCategoryList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1966
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1967
    classMethodListView notNil ifTrue:[ ^ self ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1968
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1969
    oldClassCategory := currentClassCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1970
    oldClass := currentClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1971
    oldMethodCategory := currentMethodCategory.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1972
    oldMethod := currentMethod.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1973
    oldMethod notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1974
	oldSelector := currentSelector
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1975
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1976
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1977
    classCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1978
	newCategoryList := self listOfAllClassCategories.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1979
	newCategoryList = classCategoryListView list ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1980
	    scroll ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1981
		classCategoryListView contents:newCategoryList
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1982
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1983
		classCategoryListView setContents:newCategoryList
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1984
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1985
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1986
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1987
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1988
    oldClassCategory notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1989
	classCategoryListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1990
	    classCategoryListView setSelectElement:oldClassCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1991
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1992
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1993
    classListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1994
	oldClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1995
	    classListView setSelectElement:(oldClass name)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1996
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  1997
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  1998
    oldMethodCategory notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  1999
	methodCategoryListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2000
	    methodCategoryListView setSelectElement:oldMethodCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2001
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2002
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  2003
    oldSelector notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2004
	methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2005
	    methodListView setSelectElement:oldSelector
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2006
	].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2007
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  2008
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  2009
    "Modified: 26.5.1996 / 15:04:25 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2010
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2011
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2012
!BrowserView methodsFor:'class list menu'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2013
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2014
classClassInstVars
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2015
    "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
  2016
     for a class-instvar-definition change"
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  2017
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  2018
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2019
	|s|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2020
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2021
	s := WriteStream on:(String new).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2022
	currentClass fileOutClassInstVarDefinitionOn:s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2023
	codeView contents:(s contents).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2024
	codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2025
	codeView acceptAction:[:theCode |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2026
	    codeView cursor:Cursor execute.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2027
	    Object abortSignal catch:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2028
		Class nameSpaceQuerySignal answer:Smalltalk
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2029
		do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2030
		    Compiler evaluate:theCode asString notifying:codeView compile:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2031
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2032
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2033
		codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2034
		self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2035
		self updateClassList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2036
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2037
	    codeView cursor:Cursor normal.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2038
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2039
	codeView explainAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2040
	methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2041
	    methodListView setSelection:nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2042
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2043
	aspect := #classInstVars.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2044
	self normalLabel
187
781f0c88e196 compare revision added
Claus Gittinger <cg@exept.de>
parents: 181
diff changeset
  2045
    ]
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  2046
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2047
    "Modified: 16.1.1997 / 01:47:37 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2048
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2049
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2050
classComment
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2051
    "show the classes comment in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2052
     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
  2053
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2054
    self classShowFrom:#comment 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2055
		   set:#comment: 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2056
		aspect:#comment 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2057
	       default:nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2058
!
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2059
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2060
classDefinition
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2061
    "show class definition in View and setup accept-action for
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2062
     a class-definition change.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2063
     Extract documentation either from a documentation method or
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2064
     from the comment - not a biggy, but beginners will like
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2065
     it when exploring the system."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2066
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2067
    self doClassMenu:[:currentClass |
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2068
        |m s aStream isComment|
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2069
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2070
        aStream := TextStream on:(String new:200).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2071
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2072
        "/
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2073
        "/ here, show it with a nameSpace pragma
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2074
        "/ and prefer short names.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2075
        "/
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2076
        currentClass 
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2077
            basicFileOutDefinitionOn:aStream 
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2078
            withNameSpace:true.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2079
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2080
        currentClass isLoaded ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2081
            "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2082
             add documentation as a comment, if there is any
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2083
            "
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2084
            m := currentClass class compiledMethodAt:#documentation.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2085
            m notNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2086
                s := m comment.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2087
                isComment := false.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2088
            ] ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2089
                "try comment"
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2090
                s := currentClass comment.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2091
                s isString ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2092
                    s isEmpty ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2093
                        s := nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2094
                    ] ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2095
                        (s includes:$") ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2096
                            s := s copy replaceAll:$" with:$'.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2097
                        ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2098
                        isComment := true
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2099
                    ]
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2100
                ] ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2101
                    "/ class redefines comment ?
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2102
                    s := nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2103
                ]
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2104
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2105
        ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2106
        aStream cr; cr; cr; cr; cr.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2107
        aStream emphasis:(#color -> (Color red:0 green:0 blue:25)).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2108
        s isNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2109
            aStream nextPut:$" ; cr; nextPutLine:' no comment or documentation method found'.
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2110
        ] ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2111
            aStream nextPut:$" ; cr; nextPutLine:' Documentation:'.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2112
            aStream cr; nextPutLine:s; cr.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2113
            aStream nextPutLine:' Notice: '.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2114
            aStream nextPutAll:'   the above text has been extracted from the classes '.
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2115
            aStream nextPutLine:(isComment ifTrue:['comment.'] ifFalse:['documentation method.']).
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2116
            aStream nextPutLine:'   Any change in it will be lost if you ''accept'' here.'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2117
            aStream nextPutAll:'   To change the '.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2118
            aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation']).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2119
            aStream nextPutAll:', switch to the '.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2120
            aStream nextPutAll:(isComment ifTrue:['comment'] ifFalse:['documentation method']).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2121
            aStream nextPutLine:' and ''accept'' any changes there.'.
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2122
        ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2123
        aStream nextPut:$".
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2124
        aStream emphasis:nil.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2125
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2126
        codeView contents:(aStream contents).
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2127
        codeView modified:false.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2128
        codeView acceptAction:[:theCode |
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2129
            |ns|
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2130
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2131
            currentClass notNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2132
                ns := currentClass nameSpace
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2133
            ] ifFalse:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2134
                ns := nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2135
            ].
953
5460c08843e5 provide the current classes nameSpace
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
  2136
        
1344
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2137
            codeView cursor:Cursor execute.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2138
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2139
            Class nameSpaceQuerySignal handle:[:ex |
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2140
                ns isNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2141
                    ex reject
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2142
                ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2143
                ex proceedWith:ns
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2144
            ] do:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2145
                Object abortSignal catch:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2146
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2147
                    Class nameSpaceQuerySignal answer:Smalltalk
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2148
                    do:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2149
                        (Compiler evaluate:theCode asString notifying:codeView compile:false)
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2150
                        isBehavior ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2151
                            codeView modified:false.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2152
                            self classCategoryUpdate.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2153
                            self updateClassListWithScroll:false.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2154
                        ]
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2155
                    ]
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2156
                ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2157
            ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2158
            codeView cursor:Cursor normal.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2159
        ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2160
        codeView explainAction:nil.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2161
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2162
        methodListView notNil ifTrue:[
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2163
            methodListView setSelection:nil
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2164
        ].
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2165
        aspect := #definition.
b85865124251 added fileOutAs in class category menu (for tz)
Claus Gittinger <cg@exept.de>
parents: 1342
diff changeset
  2166
        self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2167
    ]
371
f28c97e821c4 handle comments with d'quotes when showing classes definition
Claus Gittinger <cg@exept.de>
parents: 369
diff changeset
  2168
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2169
    "Modified: / 25.10.1997 / 12:46:05 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2170
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2171
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2172
classDocumentation
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2173
    "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
  2174
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2175
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2176
	Autoload autoloadFailedSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2177
	    self warn:'autoload failed.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  2178
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  2179
Check your source directory and/or 
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  2180
the abbreviation file for the classes (correct) shortened name.'.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2181
	    ex return.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2182
	] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2183
	    |text v|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2184
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2185
	    text := currentClass htmlDocumentation.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2186
	    text notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2187
		v := HTMLDocumentView
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2188
			openFullOnText:text 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2189
			inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2190
		v nameSpaceForExecution:(currentClass nameSpace).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2191
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2192
	]
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2193
    ]
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2194
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2195
    "Created: 18.5.1996 / 12:12:20 / cg"
1188
3805f78caf95 documentationViews currentDirectory ...
Claus Gittinger <cg@exept.de>
parents: 1186
diff changeset
  2196
    "Modified: 17.6.1997 / 13:32:40 / cg"
546
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2197
!
d41abf9483e2 added doc-view-open in class menu
Claus Gittinger <cg@exept.de>
parents: 543
diff changeset
  2198
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2199
classDocumentationAs
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2200
    "as for a fileName & save a classes documentation html doc into it"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2201
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2202
    |fileBox dir saveName|
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2203
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2204
    fileBox := FileSelectionBox
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2205
                    title:(resources string:'save HTML doc for %1 as:' with:currentClass name)
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2206
                    okText:(resources string:'save')
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2207
                    abortText:(resources string:'cancel')
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2208
                    action:[:fileName | saveName := fileName].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2209
    fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.html').
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2210
    dir := FileSelectionBox lastFileSelectionDirectory.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2211
    dir notNil ifTrue:[
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2212
        fileBox directory:dir.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2213
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2214
    fileBox showAtPointer.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2215
    fileBox destroy.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2216
    saveName isNil ifTrue:[
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2217
        ^ self
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2218
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2219
    saveName isEmpty ifTrue:[
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2220
        self warn:'bad name given'.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2221
        ^ self
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2222
    ].
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2223
    FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2224
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2225
    self classDocumentationToFile:saveName
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2226
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2227
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2228
classDocumentationToFile:aFilename
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2229
    "save a classes documentation html doc into a file"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2230
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2231
    self doClassMenu:[:currentClass |
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2232
        Autoload autoloadFailedSignal handle:[:ex |
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2233
            self warn:'autoload failed.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2234
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2235
Check your source directory and/or 
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2236
the abbreviation file for the classes (correct) shortened name.'.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2237
            ex return.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2238
        ] do:[
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2239
            |text v f|
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2240
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2241
            text := currentClass htmlDocumentation.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2242
            text notNil ifTrue:[
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2243
                f := aFilename asFilename writeStream.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2244
                f nextPutAll:text asString.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2245
                f close.
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2246
            ]
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2247
        ]
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2248
    ]
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2249
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2250
    "Created: 18.5.1996 / 12:12:20 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2251
    "Modified: 17.6.1997 / 13:32:40 / cg"
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2252
!
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2253
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2254
classFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2255
    "fileOut the current class.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2256
     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
  2257
     warn if any)"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2258
1139
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2259
    self classFileOutAsk:false
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2260
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2261
    "Modified: 16.4.1997 / 20:55:13 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2262
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2263
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2264
classFileOutAs
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2265
    "fileOut the current class, asking for a filename."
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2266
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2267
    self classFileOutAsk:true
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2268
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2269
    "Modified: 16.4.1997 / 20:55:31 / cg"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2270
!
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2271
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2272
classFileOutAsk:ask
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2273
    "fileOut the current class, possibly asking for a filename.
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2274
     Catch errors (sure, you like to know if it failed) and
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2275
     warn if any)"
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2276
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2277
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2278
	|msg fileBox saveName dir|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2279
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2280
	currentClass isPrivate ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2281
	    self warn:'You must fileOut the owning class: ' , currentClass owningClass name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2282
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2283
	    ask ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2284
		fileBox := FileSelectionBox
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2285
				title:(resources string:'fileOut %1 as:' with:currentClass name)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2286
				okText:(resources string:'fileOut')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2287
				abortText:(resources string:'cancel')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2288
				action:[:fileName | saveName := fileName].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2289
		fileBox initialText:((Smalltalk fileNameForClass:currentClass) , '.st').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2290
		dir := FileSelectionBox lastFileSelectionDirectory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2291
		dir notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2292
		    fileBox directory:dir.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2293
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2294
		fileBox showAtPointer.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2295
		fileBox destroy.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2296
		saveName isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2297
		    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2298
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2299
		saveName isEmpty ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2300
		    self warn:'bad name given'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2301
		    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2302
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2303
		FileSelectionBox lastFileSelectionDirectory:(saveName asFilename directoryName).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2304
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2305
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2306
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2307
	    self busyLabel:'saving %1' with:currentClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2308
	    Class fileOutErrorSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2309
		self warn:'cannot fileOut: %1\(%2)' with:currentClass name with:ex errorString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2310
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2311
		ex return.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2312
	    ] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2313
		saveName notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2314
		    currentClass fileOutAs:saveName.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2315
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2316
		    currentClass fileOut.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2317
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2318
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2319
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2320
	self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2321
    ]
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  2322
1139
746f9459e234 added 'fileOut as' menu item
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  2323
    "Created: 16.4.1997 / 20:55:01 / cg"
1313
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  2324
    "Modified: 9.9.1997 / 10:11:35 / cg"
199
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
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2327
classFileOutBinary
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2328
    "fileOut the current class as binary bytecode."
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2329
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2330
    |mode|
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2331
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  2332
    mode := Dialog choose:(resources string:'save including sources ?')
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2333
		   labels:(resources array:#('cancel' 'discard' 'by file reference' 'include source'))
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2334
		   values:#(nil #discard #reference #keep)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2335
		   default:#keep.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2336
337
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  2337
    mode isNil ifTrue:[^ self].   "/ cancelled
da49a43210e8 added cancel to fileOutBinary sourceMode-query
Claus Gittinger <cg@exept.de>
parents: 336
diff changeset
  2338
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2339
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2340
	|msg|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2341
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2342
	currentClass isPrivate ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2343
	    self warn:'You must fileOut the owning class: ' , currentClass owningClass name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2344
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2345
	    self busyLabel:'saving binary of %1' with:currentClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2346
	    Class fileOutErrorSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2347
		self warn:'cannot create: %1\(%2)' with:ex parameter with:ex errorString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2348
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2349
		ex return.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2350
	    ] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2351
		currentClass binaryFileOutWithSourceMode:mode.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2352
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2353
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2354
	self normalLabel.
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2355
    ]
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2356
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2357
    "Created: 24.1.1996 / 21:11:03 / cg"
762
754eee5d2bdb more stuff for private classes
Claus Gittinger <cg@exept.de>
parents: 759
diff changeset
  2358
    "Modified: 14.10.1996 / 20:12:46 / cg"
336
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2359
!
94bcf2e93ad7 added binaryFileOut
Claus Gittinger <cg@exept.de>
parents: 333
diff changeset
  2360
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2361
classHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2362
    "show current classes hierarchy in codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2363
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2364
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2365
	|aStream|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2366
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2367
	aStream := WriteStream on:(String new:200).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2368
	actualClass printHierarchyOn:aStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2369
	codeView contents:(aStream contents).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2370
	codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2371
	codeView acceptAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2372
	codeView explainAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2373
	methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2374
	    methodListView setSelection:nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2375
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2376
	aspect := #hierarchy. 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2377
	self normalLabel
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2378
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2379
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  2380
    "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
  2381
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2382
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2383
classInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2384
    "inspect the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2385
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2386
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2387
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2388
    currentClass inspect.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2389
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2390
393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2391
classInstancesInspect
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2392
    "inspect the current classes instances"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2393
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2394
    self checkClassSelected ifFalse:[^ self].
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2395
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2396
    currentClass allInstances inspect.
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2397
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2398
    "Created: 24.2.1996 / 16:12:14 / cg"
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2399
!
f77385d5fcb6 added insspectInstances
Claus Gittinger <cg@exept.de>
parents: 387
diff changeset
  2400
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2401
classLoad
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2402
    "load an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2403
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  2404
    |nm nameShown|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2405
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2406
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2407
    nm := currentClass name.
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  2408
    nameShown := self displayedClassNameOf:currentClass.
987
e24e45bd126a dont update while loading
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
  2409
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2410
    Autoload autoloadFailedSignal handle:[:ex |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2411
	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
  2412
1313
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  2413
Check your source directory for a file named ''%2.st'' 
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  2414
and/or the abbreviation file for its (correct) shortened name.') 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2415
		with:nm with:(Smalltalk fileNameForClass:currentClass).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2416
	ex return.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2417
    ] do:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2418
	self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2419
	    lockUpdates := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2420
	    [
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2421
		currentClass autoload.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2422
	    ] valueNowOrOnUnwindDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2423
		lockUpdates := false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2424
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2425
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2426
	    currentClass := actualClass := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2427
	    "/ reselect the current class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2428
	    showInstance ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2429
		nameShown := nameShown , ' class'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2430
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2431
	    self switchToClassNamed:nameShown
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2432
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2433
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2434
1313
a287a275aaef remember last 'fileout as...' directory.
Claus Gittinger <cg@exept.de>
parents: 1308
diff changeset
  2435
    "Modified: 9.9.1997 / 11:26:31 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2436
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2437
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2438
classMakePrivate
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2439
    "change a class from public to private;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2440
     ask for the owners class, check if a private class with the same name exists,
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2441
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2442
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2443
    |ownerName owner sel newClass|
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2444
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  2445
    ownerName := Dialog request:(resources string:'name of owner class:').
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2446
    ownerName size == 0 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2447
	"/ cancelled
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2448
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2449
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2450
    owner := Smalltalk classNamed:ownerName.
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2451
    owner isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2452
	self warn:(resources string:'no class named ''%1'' found - try again.' with:ownerName).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2453
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2454
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2455
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2456
    (owner privateClassesAt:currentClass name) notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2457
	self warn:(resources 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2458
			string:'a private class named ''%1'' already exists in ''%2''.\\Please remove/rename that one first,\or rename the public class ''%1'' here\and try again.'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2459
			with:currentClass name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2460
			with:ownerName)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2461
		    withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2462
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2463
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2464
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2465
    currentClass makePrivateIn:owner
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2466
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  2467
    "Modified: 3.7.1997 / 13:26:16 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2468
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2469
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2470
classMakePublic
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2471
    "change a class from private to public;
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2472
     check if a public class with the same name exists,
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2473
     before doing this."
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2474
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  2475
    (Smalltalk classNamed:(currentClass nameWithoutPrefix)) notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2476
	self warn:(resources
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2477
			string:'a public class named ''%1'' already exists.\\Please remove/rename that one first,\or rename the private class ''%1'' here\and try again.'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2478
			with:currentClass nameWithoutPrefix) withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2479
	^ self
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2480
    ].
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2481
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2482
    currentClass makePublic
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2483
1232
0fa4ace4c46e fixed check for existing class in make-public;
Claus Gittinger <cg@exept.de>
parents: 1230
diff changeset
  2484
    "Modified: 3.7.1997 / 13:26:21 / cg"
1195
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2485
!
4ace0b600739 added make-class-private/public
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
  2486
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2487
classMenu
926
a7c7814c9426 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
  2488
    "sent by classListView to ask for the menu"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2489
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2490
    <resource: #keyboard ( #Cmdl #Cmdn #Cmdd) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2491
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2492
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2493
    |specialMenu labels selectors shorties m newClassMenu spawnMenu idx|
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2494
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2495
    currentClass isNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2496
        labels :=  #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2497
                       'fileIn new from repository ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2498
                    ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2499
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2500
        selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2501
                       classLoadNewRevision
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2502
                      ).
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2503
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2504
        labels :=  #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2505
                       'fileOut binary'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2506
                       '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2507
                       'inspect class'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2508
                       'inspect instances'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2509
                       '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2510
                       'make private class ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2511
                       'make public class'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2512
                       '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2513
                       'primitive definitions'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2514
                       'primitive variables'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2515
                       'primitive functions'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2516
                       '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2517
                       'source container ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2518
                       'remove source container ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2519
                       '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2520
                       'revision log' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2521
                       'compare with repository ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2522
                       '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2523
                       'check into source repository'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2524
                       'fileIn from repository ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2525
                    ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2526
        selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2527
                       classFileOutBinary
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2528
                       nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2529
                       classInspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2530
                       classInstancesInspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2531
                       nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2532
                       classMakePrivate
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2533
                       classMakePublic
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2534
                       nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2535
                       classPrimitiveDefinitions
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2536
                       classPrimitiveVariables
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2537
                       classPrimitiveFunctions
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2538
                       nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2539
                       classModifyContainer
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2540
                       classRemoveContainer
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2541
                       nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2542
                       classRevisionInfo
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2543
                       classCompareWithRepository
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2544
                       nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2545
                       classCheckin
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2546
                       classLoadRevision
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2547
                      ).
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2548
    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2549
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2550
    specialMenu := PopUpMenu
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2551
                        labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2552
                        selectors:selectors
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2553
                        receiver:self.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2554
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2555
    currentClass notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2556
        currentClass sourceCodeManager isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2557
            specialMenu disableAll:#(classModifyContainer classRemoveContainer
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2558
                                     classRevisionInfo 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2559
                                     classLoadRevision classCheckin 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2560
                                     classCompareWithRepository).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2561
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2562
        currentClass isPrivate ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2563
            specialMenu disableAll:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2564
                                     classFileOutBinary
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2565
                                     classMakePrivate
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2566
                                     classModifyContainer 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2567
                                     classRemoveContainer
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2568
                                     classRevisionInfo 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2569
                                     classLoadRevision classCheckin
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2570
                                     classCompareWithRepository
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2571
                                     classPrimitiveDefinitions
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2572
                                     classPrimitiveVariables
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2573
                                     classPrimitiveFunctions).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2574
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2575
            specialMenu disableAll:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2576
                                     classFileOutBinary
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2577
                                     classMakePublic
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2578
                                    )
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2579
        ]
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  2580
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2581
        SourceCodeManager isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2582
            specialMenu disableAll:#(classLoadNewRevision)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2583
        ]
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2584
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2585
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  2586
    (currentClass notNil
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  2587
    and:[currentClass isLoaded not]) ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2588
        specialMenu disableAll:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2589
                                     classInstancesInspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2590
                                     classFileOutBinary
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2591
                                     classMakePrivate
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2592
                                     classMakePublic
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2593
                                     classModifyContainer 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2594
                                     classRemoveContainer
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2595
                                     classRevisionInfo 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2596
                                     classLoadRevision 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2597
                                     classCheckin
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2598
                                     classCompareWithRepository
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2599
                                     classPrimitiveDefinitions
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2600
                                     classPrimitiveVariables
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2601
                                     classPrimitiveFunctions).
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  2602
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  2603
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2604
    device ctrlDown ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2605
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2606
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2607
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2608
    currentClass isNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2609
        labels :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2610
                       'new class'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2611
                     ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2612
        selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2613
                       classNewClass
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2614
                     ).
246
9f1583be2b81 ask class for its SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
  2615
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2616
        currentClass isLoaded ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2617
            labels :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2618
                           'documentation'
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2619
                           'save documentation as ...'
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2620
                           '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2621
                           'class refs'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2622
                           '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2623
                           'new class'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2624
                           '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2625
                           'load'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2626
                         ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2627
            selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2628
                           classDocumentation
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2629
                           classDocumentationAs
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2630
                           nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2631
                           classRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2632
                           nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2633
                           classNewClass
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2634
                           nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2635
                           classLoad
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2636
                         ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2637
        ] ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2638
            fullProtocol ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2639
                labels :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2640
                               'hierarchy' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2641
                               'definition' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2642
                               'documentation'
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2643
                               'save documentation as ...'
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2644
                               'comment' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2645
                               'class instvars' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2646
                             ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2647
                selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2648
                               classHierarchy
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2649
                               classDefinition
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2650
                               classDocumentation
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2651
                               classDocumentationAs
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2652
                               classComment
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2653
                               classClassInstVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2654
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2655
            ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2656
                labels :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2657
                               'fileOut'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2658
                               'fileOut as ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2659
                               'printOut'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2660
                               'printOut protocol'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2661
                             " 'printOut full protocol' "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2662
                               '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2663
                               'spawn ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2664
                               '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2665
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2666
                selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2667
                               classFileOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2668
                               classFileOutAs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2669
                               classPrintOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2670
                               classPrintOutProtocol
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2671
                            "  classPrintOutFullProtocol "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2672
                               nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2673
                               spawnMenu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2674
                               nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2675
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2676
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2677
                spawnMenu := PopUpMenu 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2678
                            labels:(resources array:#('class' 'full protocol' 'hierarchy' 'subclasses'))
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2679
                            selectors:#(classSpawn classSpawnFullProtocol classSpawnHierarchy classSpawnSubclasses).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2680
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2681
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2682
                fullClass ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2683
                    labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2684
                               'hierarchy' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2685
                               'definition' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2686
                               'documentation'
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2687
                               'save documentation as ...'
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2688
                               'comment' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2689
                               'class instvars' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2690
               "/              'protocols' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2691
                               '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2692
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2693
                    selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2694
                               classHierarchy
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2695
                               classDefinition
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2696
                               classDocumentation
1407
f6e8c04acff0 added save-documentation as ... menu item
dq
parents: 1391
diff changeset
  2697
                               classDocumentationAs
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2698
                               classComment
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2699
                               classClassInstVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2700
               "/              classProtocols 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2701
                               nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2702
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2703
                ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2704
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2705
                labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2706
                               'class refs'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2707
                               '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2708
                               'new ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2709
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2710
                selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2711
                               classRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2712
                               nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2713
                               newClassMenu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2714
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2715
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2716
                newClassMenu := PopUpMenu 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2717
                            labels:(resources array:#('class' 'subclass' 'private class'))
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2718
                            selectors:#(classNewClass classNewSubclass classNewPrivateClass).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2719
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2720
                labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2721
                               'rename ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2722
                               'remove'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2723
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2724
                selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2725
                               classRename
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2726
                               classRemove
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2727
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2728
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2729
                currentClass wasAutoloaded ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2730
                    labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2731
                               'unload'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2732
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2733
                    selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2734
                               classUnload
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2735
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2736
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2737
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2738
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2739
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2740
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  2741
    shorties := (Array new:labels size) , #(nil #'Ctrl').
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2742
    (idx := selectors identityIndexOf:#classNewClass) ~~ 0 ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2743
        shorties at:idx put:#Cmdn
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2744
    ].
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2745
    (idx := selectors identityIndexOf:#classLoad) ~~ 0 ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2746
        shorties at:idx put:#Cmdl
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2747
    ].
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  2748
    (idx := selectors identityIndexOf:#classDocumentation) ~~ 0 ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2749
        shorties at:idx put:#Cmdd
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  2750
    ].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  2751
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2752
    labels := labels , #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2753
                          '='
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2754
                          'others'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2755
                        ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2756
    selectors := selectors , #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2757
                          nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2758
                          otherMenu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2759
                        ).
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2760
    m := PopUpMenu 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2761
            labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2762
            selectors:selectors
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2763
            accelerators:shorties.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2764
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2765
    newClassMenu notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2766
        m subMenuAt:#newClassMenu put:newClassMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2767
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2768
    spawnMenu notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2769
        m subMenuAt:#spawnMenu put:spawnMenu.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  2770
    ].
768
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  2771
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  2772
    (currentClass notNil
c74bce2106ae checkin from browser
Claus Gittinger <cg@exept.de>
parents: 767
diff changeset
  2773
    and:[currentClass isPrivate]) ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2774
        m disableAll:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2775
                       classFileOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2776
                      )
767
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  2777
    ].
f92a7f3dc2aa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 766
diff changeset
  2778
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  2779
    m subMenuAt:#otherMenu put:specialMenu.
180
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2780
    ^ m
b1dfe27837fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2781
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  2782
    "Modified: / 27.10.1997 / 20:45:56 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2783
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2784
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2785
classNewClass
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2786
    "create a class-definition prototype in codeview"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2787
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2788
    |theClass cls|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2789
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2790
    theClass := Object.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2791
    currentClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2792
	(cls := currentClass superclass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2793
	    theClass := cls 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2794
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2795
    ].
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2796
    self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2797
	classClassDefinitionTemplateFor:theClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2798
	in:currentClassCategory 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2799
	namespace:false 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2800
	private:false.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2801
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2802
    aspect := nil.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2803
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2804
    "Modified: 4.1.1997 / 14:52:16 / cg"
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2805
!
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2806
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2807
classNewPrivateClass
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2808
    "create a class-definition prototype in codeview"
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2809
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  2810
    self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2811
	classClassDefinitionTemplateFor:Object 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2812
	in:nil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2813
	namespace:false 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2814
	private:true.
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2815
    aspect := nil.
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2816
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2817
    "Created: 11.10.1996 / 16:01:20 / cg"
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2818
    "Modified: 4.1.1997 / 14:51:49 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2819
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2820
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2821
classNewSubclass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2822
    "create a subclass-definition prototype in codeview"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2823
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2824
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2825
	self classClassDefinitionTemplateFor:currentClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2826
					  in:(currentClass category)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2827
					  namespace:false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2828
					  private:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2829
	aspect := nil
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2830
    ]
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  2831
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  2832
    "Modified: 4.1.1997 / 14:51:44 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2833
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2834
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2835
classPrimitiveDefinitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2836
    "show the classes primitiveDefinition in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2837
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2838
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2839
    self classShowFrom:#primitiveDefinitionsString 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2840
		   set:#primitiveDefinitions: 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2841
		aspect:#primitiveDefinitions 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2842
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2843
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2844
/*
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2845
 * includes, defines, structure definitions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2846
 * and typedefs come here.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2847
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2848
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2849
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2850
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2851
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2852
classPrimitiveFunctions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2853
    "show the classes primitiveFunctions in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2854
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2855
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2856
    self classShowFrom:#primitiveFunctionsString 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2857
		   set:#primitiveFunctions: 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2858
		aspect:#primitiveFunctions 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2859
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2860
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2861
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2862
 * any local C (helper) functions
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2863
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2864
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2865
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2866
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2867
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2868
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2869
classPrimitiveVariables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2870
    "show the classes primitiveVariables in the codeView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2871
     Also, set accept action to change it."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2872
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2873
    self classShowFrom:#primitiveVariablesString 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2874
		   set:#primitiveVariables: 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2875
		aspect:#primitiveVariables 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2876
	       default:'%{
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2877
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2878
/* 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2879
 * any local C variables
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2880
 * come here (please, define as static)
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2881
 */
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2882
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2883
%}'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2884
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2885
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2886
classPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2887
    self classPrintOutWith:#printOutOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2888
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2889
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2890
classPrintOutFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2891
    self classPrintOutWith:#printOutFullProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2892
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2893
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2894
classPrintOutProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2895
    self classPrintOutWith:#printOutProtocolOn:
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2896
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2897
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2898
classPrintOutWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2899
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2900
	|printStream|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2901
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2902
	printStream := Printer new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2903
	currentClass perform:aSelector with:printStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2904
	printStream close
152
d03618e99b3c show warnbox when autoload fails (instead of running into the debugger)
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
  2905
    ]
105
claus
parents: 98
diff changeset
  2906
!
claus
parents: 98
diff changeset
  2907
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2908
classProtocols
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2909
     ^ self
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2910
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2911
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2912
classRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2913
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2914
	self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2915
	    SystemBrowser browseReferendsOf:currentClass name asSymbol
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2916
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2917
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2918
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2919
    "Created: 23.11.1995 / 14:11:43 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  2920
    "Modified: 18.8.1997 / 15:43:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2921
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  2922
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2923
classRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2924
    "user requested remove of current class and all subclasses -
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2925
     count subclasses and let user confirm removal."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2926
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2927
    |count t box|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2928
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2929
    currentClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2930
	count := currentClass allSubclasses size.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2931
	t := 'remove %1'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2932
	count ~~ 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2933
	   t := t , '\(with %2 subclass'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2934
	   count ~~ 1 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2935
		t := t , 'es'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2936
	   ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2937
	   t := (t , ')') 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2938
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2939
	t := t , ' ?'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2940
	t := (resources string:t with:currentClass name with:count) withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2941
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2942
	box := YesNoBox 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2943
		   title:t
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2944
		   yesText:(resources at:'remove')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2945
		   noText:(resources at:'abort').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2946
	box label:(resources string:'remove class').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2947
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2948
	box confirm ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2949
	    "after querying user - do really remove current class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2950
	     and all subclasses
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2951
	    "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2952
	    self doClassMenu:[:currentClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2953
		|didRemove|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2954
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2955
		didRemove := false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2956
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2957
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2958
		 query ?
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2959
		"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2960
		currentClass allSubclassesDo:[:aSubClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2961
		    (CheckForInstancesWhenRemovingClasses not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2962
		    or:[aSubClass hasInstances not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2963
		    or:[self confirm:(resources string:'''%1'' has instances - remove anyway ?' with:aSubClass name)]])
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2964
			ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2965
			    aSubClass removeFromSystem
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2966
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2967
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2968
		(CheckForInstancesWhenRemovingClasses not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2969
		or:[currentClass hasInstances not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2970
		or:[self confirm:(resources string:'''%1'' has instances - remove anyway ?' with:currentClass name)]])
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2971
		    ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2972
			didRemove := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2973
			currentClass removeFromSystem.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2974
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2975
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2976
		didRemove ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2977
		    self switchToClass:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2978
		    Smalltalk changed.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2979
		    self updateClassList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2980
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2981
		    "if it was the last in its category, update class category list"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2982
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2983
"/                    classListView numberOfLines == 0 ifTrue:[
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2984
"/                        self updateClassCategoryListWithScroll:false
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2985
"/                    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  2986
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2987
		    methodCategoryListView notNil ifTrue:[methodCategoryListView contents:nil].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2988
		    methodListView notNil ifTrue:[methodListView contents:nil].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2989
		    codeView contents:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2990
		    codeView modified:false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2991
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2992
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2993
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  2994
	box destroy.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2995
    ]
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  2996
1280
54b004f16f9d use #removeFromSystem (to class) to remove a class.
Claus Gittinger <cg@exept.de>
parents: 1278
diff changeset
  2997
    "Modified: 12.8.1997 / 02:23:19 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2998
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  2999
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3000
classRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3001
    "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
  3002
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3003
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3004
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3005
    self checkClassSelected ifFalse:[^ self].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3006
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3007
		enterBoxTitle:(resources string:'rename %1 to:' with:currentClass name) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3008
		okText:'rename'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3009
		label:'rename class'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3010
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3011
    box initialText:(currentClass name).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3012
    box action:[:aString | self renameCurrentClassTo:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3013
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3014
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3015
    "Modified: 15.1.1997 / 23:10:15 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3016
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3017
107
claus
parents: 106
diff changeset
  3018
classShowFrom:getSelector set:setSelector aspect:aspectSymbol default:default
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3019
    "common helper for comment, primitive-stuff etc.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3020
     show the string returned from the classes getSelector-method,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3021
     Set acceptaction to change it via setSelector."
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3022
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3023
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3024
	|text|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3025
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3026
	text := currentClass perform:getSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3027
	text isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3028
	    text := default
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3029
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3030
	codeView contents:text.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3031
	codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3032
	codeView acceptAction:[:theCode |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3033
	    Object abortSignal catch:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3034
		lockUpdates := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3035
		currentClass perform:setSelector with:theCode asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3036
		codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3037
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3038
	    lockUpdates := false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3039
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3040
	codeView explainAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3041
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3042
	methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3043
	    methodListView setSelection:nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3044
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3045
	aspect := aspectSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3046
	self normalLabel
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3047
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3048
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  3049
    "Modified: 25.5.1996 / 13:02:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3050
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3051
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3052
classSpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3053
    "create a new SystemBrowser browsing current class,
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3054
     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
  3055
     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
  3056
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3057
    self doClassMenuWithSelection:[:cls :sel |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3058
	|browser|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3059
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3060
	cls isMeta ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3061
	    self listOfNamespaces do:[:aNamespace |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3062
		aNamespace allBehaviorsDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3063
		    aClass class == cls ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3064
			browser := SystemBrowser browseClass:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3065
			browser instanceProtocol:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3066
			sel notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3067
			    browser switchToMethodNamed:sel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3068
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3069
			^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3070
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3071
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3072
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3073
	    self warn:'oops, no class for this metaclass'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3074
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3075
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3076
	browser := SystemBrowser browseClass:cls. 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3077
	cls hasMethods ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3078
	    browser instanceProtocol:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3079
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3080
	sel notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3081
	    browser switchToMethodNamed:sel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3082
	].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3083
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3084
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3085
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3086
     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
  3087
     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
  3088
    "
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3089
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  3090
    "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
  3091
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3092
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3093
classSpawnFullProtocol
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3094
    "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
  3095
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3096
    self doClassMenuWithSelection:[:cls :sel |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3097
	SystemBrowser browseFullClassProtocol:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3098
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3099
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3100
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3101
classSpawnHierarchy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3102
    "create a new HierarchyBrowser browsing current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3104
    self doClassMenuWithSelection:[:cls :sel |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3105
	SystemBrowser browseClassHierarchy:cls 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3106
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3107
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3108
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3109
classSpawnSubclasses
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3110
    "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
  3111
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3112
    self doClassMenuWithSelection:[:cls :sel |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3113
	|subs|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3114
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3115
	subs := OrderedCollection new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3116
	self classHierarchyOf:cls withAutoloaded:false do:[:aClass :lvl |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3117
	    subs add:(String new:lvl*2) , aClass name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3118
	].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  3119
"/        subs := cls allSubclasses.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3120
	(subs notNil and:[subs size ~~ 0]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3121
	    SystemBrowser browseClasses:subs 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3122
				  title:('subclasses of ' , cls name)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3123
				   sort:false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3124
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3125
    ]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  3126
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  3127
    "Modified: 4.1.1997 / 13:35:55 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3128
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3129
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3130
classUnload
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3131
    "unload an autoloaded class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3132
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3133
    |nm|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3134
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3135
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3136
    nm := currentClass name.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3137
    currentClass unload.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3138
    self switchToClassNamed:nm
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3139
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3140
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3141
classUses
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3142
    "a powerful tool, when trying to learn more about where
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3143
     a class is used. This one searches all uses of a class,
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3144
     and shows a list of uses - try it and like it"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3145
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  3146
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3147
	self withSearchCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3148
	    SystemBrowser browseUsesOf:currentClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3149
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3150
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3151
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3152
    "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
  3153
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3154
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3155
doClassMenuWithSelection:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3156
    "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
  3157
     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
  3158
     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
  3159
     current class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3160
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3161
    |string words clsName cls sel isMeta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3162
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3163
    string := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3164
    string notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3165
	self extractClassAndSelectorFromSelectionInto:[:c :s :m |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3166
	    clsName := c.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3167
	    sel := s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3168
	    isMeta := m.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3169
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3170
	clsName isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3171
	    string := string asString withoutSeparators.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3172
	    words := string asCollectionOfWords.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3173
	    words notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3174
		clsName := words first.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3175
		(clsName endsWith:' class') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3176
		    isMeta := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3177
		    clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3178
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3179
		    isMeta := false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3180
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3181
		sel := Parser selectorInExpression:string.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3182
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3183
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3184
	clsName notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3185
	    (cls := Smalltalk classNamed:clsName) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3186
		isMeta ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3187
		    cls := cls class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3188
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3189
		self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3190
		    aBlock value:cls value:sel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3191
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3192
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3193
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3194
		self warn:'no class named: %1 - spawning current' with:clsName
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3195
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3196
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3197
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3198
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3199
    classMethodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3200
	sel := classMethodListView selectionValue string.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3201
	sel notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3202
	    sel := self selectorFromClassMethodString:sel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3203
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3204
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3205
    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
  3206
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  3207
    "Modified: 17.6.1996 / 16:51:49 / stefan"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  3208
    "Modified: 18.8.1997 / 15:44:01 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3209
! !
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3210
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3211
!BrowserView methodsFor:'class list source administration'!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  3212
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3213
classCheckin
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3214
    "check a class into the source repository"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3215
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  3216
    currentClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3217
	self warn:'cannot checkin unloaded classes.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3218
	^ 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
  3219
    ].
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3220
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3221
	self classCheckin:currentClass withLog:nil
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3222
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3223
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3224
    "Created: 23.11.1995 / 11:41:38 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3225
    "Modified: 15.4.1996 / 17:07:07 / cg"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3226
!
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3227
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3228
classCheckin:aClass withLog:aLogMessage
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3229
    "check a class into the source repository"
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3230
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3231
    |logMessage info mgr|
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3232
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3233
    aClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3234
	self information:'cannot checkin unloaded classes (' , aClass name , ').'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3235
	^ self.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3236
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3237
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3238
    aLogMessage isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3239
	logMessage := self getLogMessageFor:aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3240
	logMessage isNil ifTrue:[^ self].
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3241
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3242
	logMessage := aLogMessage
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3243
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3244
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3245
    mgr := (aClass sourceCodeManager).
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3246
    info := mgr sourceInfoOfClass:aClass.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3247
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3248
    (info isNil 
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3249
    or:[(info at:#fileName ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3250
    or:[(info at:#module ifAbsent:nil) isNil
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3251
    or:[(info at:#directory ifAbsent:nil) isNil]]]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3252
	(self classCreateSourceContainerFor:aClass) ifFalse:[^ self]. 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3253
	^ self.
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3254
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3255
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3256
    lastSourceLogMessage := logMessage.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3257
    self busyLabel:'checking in %1' with:aClass name.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3258
    Processor activeProcess withLowerPriorityDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3259
	(mgr checkinClass:aClass logMessage:logMessage) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3260
	    self warn:'checkin failed'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3261
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3262
	aspect == #revisionInfo ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3263
	    self classListUpdate
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3264
	].
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3265
    ].
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3266
    self normalLabel.
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3267
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3268
    "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
  3269
    "Modified: 15.6.1996 / 00:22:49 / stefan"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  3270
    "Modified: 21.12.1996 / 19:01:06 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3271
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3272
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  3273
classCompareWithRepository
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3274
    "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
  3275
     with the some version found in the repository."
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3276
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  3277
    currentClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3278
	self warn:'cannot compare unloaded classes.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3279
	^ 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
  3280
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  3281
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3282
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3283
	|aStream comparedSource currentSource v rev revString thisRevString mgr
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3284
	 nm msg|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3285
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3286
	nm := currentClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3287
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3288
	rev := currentClass binaryRevision.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3289
	mgr := currentClass sourceCodeManager.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3290
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3291
	msg := resources string:'compare to revision: (empty for newest)'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3292
	rev notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3293
	    msg := msg , '\\' , (resources string:'(%1 is based upon rev %2)'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3294
					   with:nm with:rev)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3295
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3296
	rev := Dialog request:msg withCRs onCancel:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3297
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3298
	rev notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3299
	    rev withoutSpaces isEmpty ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3300
		msg := 'extracting newest %1'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3301
		aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3302
		revString := '(newest)'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3303
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3304
		msg := 'extracting previous %1'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3305
		aStream := mgr getSourceStreamFor:currentClass revision:rev.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3306
		revString := rev
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3307
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3308
	    self busyLabel:msg with:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3309
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3310
	    aStream isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3311
		self warn:'could not extract source from repository'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3312
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3313
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3314
	    comparedSource := aStream contents asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3315
	    aStream close.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3316
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3317
	    self busyLabel:'generating current source ...' with:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3318
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3319
	    aStream := '' writeStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3320
	    Method flushSourceStreamCache.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3321
	    currentClass fileOutOn:aStream withTimeStamp:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3322
	    currentSource := aStream contents asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3323
	    aStream close.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3324
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3325
	    self busyLabel:'comparing  ...' with:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3326
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3327
	    comparedSource = currentSource ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3328
		self information:'versions are identical'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3329
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3330
		thisRevString := currentClass revision.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3331
		thisRevString isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3332
		    thisRevString := 'no revision'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3333
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3334
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3335
		revString = '(newest)' ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3336
		    (rev := mgr newestRevisionOf:currentClass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3337
			revString := '(newest is' , rev , ')'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3338
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3339
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3340
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3341
		v := DiffTextView 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3342
		    openOn:currentSource label:'current: (based on: ' , thisRevString , ')'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3343
		    and:comparedSource label:'repository: ' , revString.      
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3344
		v label:'comparing ' , nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3345
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3346
	    self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3347
	]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3348
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3349
903
843c830fa921 show repositories version when comparing with newest
Claus Gittinger <cg@exept.de>
parents: 902
diff changeset
  3350
    "Created: 4.1.1997 / 15:48:20 / cg"
1046
e5f4d06007c6 resource strings
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  3351
    "Modified: 28.2.1997 / 11:44:15 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3352
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3353
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3354
classCreateSourceContainerFor:aClass
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3355
    "let user specify the source-repository values for aClass"
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3356
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
  3357
    ^ self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3358
	classDefineSourceContainerFor:aClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3359
	title:(resources string:'Repository information for %1' with:aClass name)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3360
	text:(resources string:'CREATE_REPOSITORY' with:aClass name)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3361
	createDirectories:true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3362
	createContainer:true.
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
  3363
479
ad4d7b705747 better checkin-each for new classes
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
  3364
    "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
  3365
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3366
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3367
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
  3368
    "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
  3369
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3370
    |box className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3371
     moduleHolder packageHolder fileNameHolder
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3372
     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
  3373
     module package fileName 
847
6666c82b9a82 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 846
diff changeset
  3374
     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
  3375
260
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  3376
    aClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3377
	self warn:'please load the class first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3378
	^ 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
  3379
    ].
9b5aa1495864 dont do sourcecode stuff on autoloaded classes; interface to create new modules/packages
Claus Gittinger <cg@exept.de>
parents: 257
diff changeset
  3380
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3381
    className := aClass name.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3382
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3383
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3384
    "/ defaults, if nothing at all is known
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3385
    "/
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
  3386
    (module := lastModule) isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3387
	module := (OperatingSystem getLoginName).
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
  3388
    ].
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
  3389
    (package := lastPackage) isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3390
	package := 'private'.
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
  3391
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3392
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3393
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3394
    "/ 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
  3395
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3396
    (Project notNil and:[(project := Project current) notNil]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3397
	package isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3398
	    (nm := project repositoryDirectory) isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3399
		nm := project name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3400
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3401
	    package := nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3402
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3403
	module isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3404
	    (nm := project repositoryModule) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3405
		module := nm
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3406
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3407
	].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3408
    ].
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3409
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3410
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3411
    "/ 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
  3412
    "/ if so, take that as a default.
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3413
    "/
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
  3414
    info := (mgr := aClass sourceCodeManager) sourceInfoOfClass:aClass.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3415
    info notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3416
	(info includesKey:#module) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3417
	    module := (info at:#module).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3418
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3419
	(info includesKey:#directory) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3420
	    package := (info at:#directory).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3421
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3422
	fileName := mgr containerFromSourceInfo:info.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3423
"/        (info includesKey:#fileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3424
"/            fileName := (info at:#fileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3425
"/        ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3426
"/            (info includesKey:#expectedFileName) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3427
"/                fileName := (info at:#expectedFileName).
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3428
"/            ] ifFalse:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3429
"/                (info includesKey:#classFileNameBase) ifTrue:[
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3430
"/                    fileName := (info at:#classFileNameBase) , '.st'.
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3431
"/                ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3432
"/            ]
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3433
"/        ]
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3434
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3435
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3436
    fileName isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3437
	fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3438
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3439
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3440
    fileNameHolder := fileName asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3441
    moduleHolder := module asValue.
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3442
    packageHolder := package asValue.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3443
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3444
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3445
    "/ 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
  3446
    "/
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3447
    (mgr checkForExistingContainerInModule:module 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3448
				   package:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3449
				 container:fileName) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3450
	"/ for now - this needs more work.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3451
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3452
"/        self information:(resources 
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3453
"/                            string:'%1 is already contained in the container:
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3454
"/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3455
"/    %2 / %3 / %4'
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3456
"/                            with:className
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3457
"/                            with:module
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3458
"/                            with:package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3459
"/                            with:fileName).
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3460
"/        ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3461
"/
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3462
	(Dialog confirm:(resources 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3463
			    string:'Notice: there already is a container for %1 in:
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3464
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3465
    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3466
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3467
To change it, press continue.'
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3468
			    with:className
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3469
			    with:module
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3470
			    with:package
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3471
			    with:fileName)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3472
		yesLabel:(resources string:'continue')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3473
		noLabel:(resources string:'cancel'))
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3474
	ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3475
	    ^ false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3476
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3477
	oldModule := module.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3478
	oldPackage := package.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3479
	oldFileName := fileName
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3480
    ].
257
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3481
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3482
    "/
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3483
    "/ open a dialog for this
ae35f9ab8f11 more on source-code container creation
Claus Gittinger <cg@exept.de>
parents: 253
diff changeset
  3484
    "/
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3485
    box := DialogBox new.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3486
    box label:title.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3487
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3488
    component := box addTextLabel:boxText withCRs.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3489
    component adjust:#left; borderWidth:0.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3490
    box addVerticalSpace.
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3491
    box addVerticalSpace.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3492
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3493
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3494
    component := box addTextLabel:(resources string:'Module:').
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3495
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3496
    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
  3497
    component := box addInputFieldOn:moduleHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3498
    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
  3499
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3500
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3501
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3502
    component := box addTextLabel:'Package:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3503
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3504
    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
  3505
    component := box addInputFieldOn:packageHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3506
    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
  3507
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3508
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3509
    y := box yPosition.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3510
    component := box addTextLabel:'Filename:'.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3511
    component width:0.4; adjust:#right.
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3512
    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
  3513
    component := box addInputFieldOn:fileNameHolder tabable:true.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3514
    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
  3515
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3516
    box addVerticalSpace.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3517
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3518
    (mgr checkForExistingContainerInModule:module 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3519
				   package:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3520
				 container:fileName) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3521
	component := box addTextLabel:'Notice: class seems to have no container yet.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3522
	component adjust:#left; borderWidth:0.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3523
	creatingNew := true.
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3524
    ] ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3525
	creatingNew := false.
339
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3526
    ].
43d8b6158ec6 checkin from browser
ah
parents: 338
diff changeset
  3527
218
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3528
    box addVerticalSpace.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3529
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3530
    box addAbortButton; addOkButton.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3531
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3532
    box showAtPointer.
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3533
22e66c597205 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
  3534
    box accepted ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3535
	module := moduleHolder value withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3536
	package := packageHolder value withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3537
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3538
	fileName := fileNameHolder value withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3539
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3540
	(fileName endsWith:',v') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3541
	    fileName := fileName copyWithoutLast:2
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3542
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3543
	(fileName endsWith:'.st') ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3544
	    fileName := fileName , '.st'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3545
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3546
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3547
	info := aClass revisionInfo.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3548
	info notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3549
	    (info includesKey:#repositoryPathName) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3550
		info := nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3551
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3552
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3553
	info isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3554
	    creatingNew ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3555
		(self confirm:(resources string:'The repository already contains a container named "%3" in "%1/%2" !!\\Checkin %4 anyway ? (DANGER - be careful)'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3556
			 withArgs:(Array with:module with:package with:fileName with:className)) withCRs)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3557
		    ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3558
			^ false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3559
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3560
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3561
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3562
	    (self confirm:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3563
		ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3564
		    ^ false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3565
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3566
	    aClass updateVersionMethodFor:(mgr initialRevisionStringFor:aClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3567
					       inModule:module 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3568
					       package:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3569
					       container:fileName).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3570
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3571
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3572
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3573
	"/ check for the module
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3574
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3575
	(mgr checkForExistingModule:module) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3576
	    (createDirs or:[creatingNew]) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3577
		self warn:(resources string:'a module named %1 does not exist in the source code management' with:module).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3578
		^ false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3579
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3580
	    (self confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3581
		^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3582
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3583
	    (mgr createModule:module) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3584
		self warn:(resources string:'cannot create new module: %1' with:module).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3585
		^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3586
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3587
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3588
	lastModule := module.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3589
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3590
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3591
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3592
	"/ check for the package
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3593
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3594
	(mgr checkForExistingModule:module package:package) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3595
	    (createDirs or:[creatingNew]) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3596
		self warn:(resources string:'a package named %1 does not exist module %2' with:module with:package).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3597
		^ false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3598
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3599
	    (self confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3600
		^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3601
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3602
	    (mgr createModule:module package:package) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3603
		self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3604
		^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3605
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3606
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3607
	lastPackage := package.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3608
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3609
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3610
	"/ check for the container itself
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3611
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3612
	(mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3613
	    creatingNew ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3614
		self warn:(resources string:'container for %1 already exists in %2/%3.' with:fileName with:module with:package) withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3615
	    ].
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3616
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3617
"/            (oldModule notNil
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3618
"/            and:[(oldModule ~= module)
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3619
"/                 or:[oldPackage ~= package
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3620
"/                 or:[oldFileName ~= fileName]]])
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3621
"/            ifFalse:[
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3622
"/                self warn:(resources string:'no change').
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3623
"/                ^ false.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3624
"/            ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3625
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3626
	    (self confirm:(resources string:'check %1 into the existing container
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3627
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3628
    %2 / %3 / %4  ?'
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3629
				with:className
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3630
				with:module 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3631
				with:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3632
				with:fileName) withCRs) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3633
	    ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3634
		^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3635
	    ].  
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3636
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3637
	    aClass updateVersionMethodFor:'$' , 'Header' , '$'. "/ concatenated to avoid RCS-expansion
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3638
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3639
	    oldFileName notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3640
		msg := ('forced checkin / source container change from ' , oldFileName).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3641
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3642
		msg := 'defined source container'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3643
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3644
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3645
	    (mgr
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3646
		checkinClass:aClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3647
		fileName:fileName 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3648
		directory:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3649
		module:module 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3650
		logMessage:msg)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3651
	    ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3652
		(self confirm:'no easy merge seems possible; force checkin (no merge) ?') ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3653
		    self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3654
		    ^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3655
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3656
		(mgr
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3657
		    checkinClass:aClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3658
		    fileName:fileName 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3659
		    directory:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3660
		    module:module 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3661
		    logMessage:msg
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3662
		    force:true)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3663
		ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3664
		    self warn:(resources string:'failed to check into existing container.').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3665
		    self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3666
		    ^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3667
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3668
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3669
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3670
	    self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3671
	    ^ true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3672
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3673
	    (createContainer or:[creatingNew]) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3674
		(self confirm:(resources string:'no container exists for %1 in %2/%3\\create ?' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3675
					  with:fileName with:module with:package) withCRs) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3676
		    ^ false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3677
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3678
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3679
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3680
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3681
	(mgr
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3682
		createContainerFor:aClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3683
		inModule:module
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3684
		package:package
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3685
		container:fileName) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3686
	    self warn:(resources string:'failed to create container.').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3687
	    self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3688
	    ^ false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3689
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3690
	self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3691
	^ true
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
  3692
    ].
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
  3693
    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
  3694
    ^ 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
  3695
1098
5901d464a960 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1097
diff changeset
  3696
    "Modified: 26.3.1997 / 18:15:55 / cg"
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3697
!
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3698
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3699
classLoadNewRevision
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3700
    "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
  3701
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  3702
    |box
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3703
     moduleHolder packageHolder fileNameHolder
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  3704
     module package fileName aStream
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  3705
     y component mgr|
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3706
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3707
    mgr := SourceCodeManager.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3708
    mgr isNil ifTrue:[^ false].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3709
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3710
    fileNameHolder := ValueHolder newString.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3711
    moduleHolder := (OperatingSystem getLoginName) asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3712
    packageHolder := 'private' asValue.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3713
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3714
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3715
    "/ 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
  3716
    "/
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3717
    box := DialogBox new.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3718
    box label:'container fileIn'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3719
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3720
    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
  3721
    component adjust:#left; borderWidth:0.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3722
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3723
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3724
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3725
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3726
    component := box addTextLabel:(resources string:'Module:').
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3727
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3728
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3729
    component := box addInputFieldOn:moduleHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3730
    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
  3731
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3732
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3733
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3734
    component := box addTextLabel:'Package:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3735
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3736
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3737
    component := box addInputFieldOn:packageHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3738
    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
  3739
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3740
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3741
    y := box yPosition.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3742
    component := box addTextLabel:'Filename:'.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3743
    component width:0.4; adjust:#right.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3744
    box yPosition:y.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3745
    component := box addInputFieldOn:fileNameHolder tabable:true.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3746
    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
  3747
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3748
    box addVerticalSpace.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3749
    box addAbortButton; addOkButton.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3750
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3751
    box showAtPointer.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3752
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3753
    box destroy.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3754
    box accepted ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3755
	^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3756
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3757
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3758
    module := moduleHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3759
    package := packageHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3760
    fileName := fileNameHolder value withoutSpaces.
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3761
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3762
    (fileName endsWith:',v') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3763
	fileName := fileName copyWithoutLast:2
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3764
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3765
    (fileName endsWith:'.st') ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3766
	fileName := fileName , '.st'
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3767
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3768
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3769
    (mgr checkForExistingContainerInModule:module 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3770
				   package:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3771
				 container:fileName) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3772
	self warn:'no such container'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3773
	^ false
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3774
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3775
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3776
    aStream := mgr 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3777
	    streamForClass:nil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3778
	    fileName:fileName 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3779
	    revision:#newest
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3780
	    directory:package
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3781
	    module:module
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3782
	    cache:false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3783
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3784
    aStream isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3785
	self warn:'could not fileIn from repository'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3786
	^ false.
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3787
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3788
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3789
    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
  3790
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3791
    Class withoutUpdatingChangesDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3792
	[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3793
	    aStream fileIn.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3794
	] valueNowOrOnUnwindDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3795
	    aStream close.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3796
	    self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3797
	    Smalltalk changed.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3798
	].
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3799
    ].
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3800
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3801
    ^ false
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3802
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3803
    "Created: 13.9.1996 / 09:27:09 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  3804
    "Modified: 16.1.1997 / 00:50:09 / cg"
730
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3805
!
bde80e7b2de0 allow loading of new classes from repository
Claus Gittinger <cg@exept.de>
parents: 725
diff changeset
  3806
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3807
classLoadRevision
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3808
    "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
  3809
     upgrade a class to the newest revision"
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3810
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  3811
    currentClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3812
	self warn:'cannot load specific releases of autoloaded classes.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3813
	^ self.
264
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  3814
    ].
621107e65e1e dont allow loading old revisions of autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
  3815
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3816
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3817
	|aStream comparedSource currentSource v rev revString what mgr keep className
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3818
	 newClass prevCategory ok|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3819
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3820
	rev := Dialog request:'load which revision: (empty for newest)' onCancel:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3821
	rev notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3822
	    className := currentClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3823
	    (className includesString:'_rev_') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3824
		self warn:'select the original class and try again.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3825
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3826
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3827
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3828
	    mgr := currentClass sourceCodeManager.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3829
	    ok := false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3830
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3831
	    rev withoutSpaces isEmpty ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3832
		what := className , '(newest)'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3833
		self busyLabel:'extracting %1' with:what.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3834
		aStream := mgr getMostRecentSourceStreamForClassNamed:className.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3835
		revString := 'newest'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3836
		keep := false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3837
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3838
		what := className , '(' , rev , ')'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3839
		self busyLabel:'extracting %1' with:what.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3840
		aStream := mgr getSourceStreamFor:currentClass revision:rev.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3841
		revString := rev.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3842
		keep := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3843
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3844
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3845
	    aStream isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3846
		self warn:'cannot find classes source.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3847
		^ self.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3848
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3849
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3850
	    self busyLabel:'loading %1' with:what .
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3851
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3852
	    [
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3853
		Class withoutUpdatingChangesDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3854
		    |saveIt prevSkip|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3855
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3856
		    saveIt := Dialog confirmWithCancel:'keep a save-copy of the existing class ?
1033
fe5a3c210282 when loading a revision from the repository,
ca
parents: 1029
diff changeset
  3857
fe5a3c210282 when loading a revision from the repository,
ca
parents: 1029
diff changeset
  3858
(you have to care for subclasses if doing so)' default:false.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3859
		    saveIt isNil ifTrue:[^ self].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3860
		    saveIt ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3861
			"/ rename the current class - for backup
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3862
			prevCategory := currentClass category.    
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3863
			currentClass category:'* obsolete *'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3864
			Smalltalk renameClass:currentClass to:className , '_saved'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3865
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3866
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3867
		    prevSkip := ClassCategoryReader skipUnchangedMethods.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3868
		    ClassCategoryReader skipUnchangedMethods:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3869
		    [
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3870
			aStream fileIn.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3871
		    ] valueNowOrOnUnwindDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3872
			ClassCategoryReader skipUnchangedMethods:prevSkip
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3873
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3874
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3875
		    "/ did that work ?
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3876
		    newClass := Smalltalk at:className ifAbsent:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3877
		    newClass isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3878
			saveIt ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3879
			    self warn:'fileIn failed - undoing changes ...'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3880
			    Smalltalk renameClass:currentClass to:className.                        
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3881
			    currentClass category:prevCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3882
			] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3883
			    self warn:'fileIn failed - cannot recover class'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3884
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3885
		    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3886
			"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3887
			"/ if we loaded an old version, rename that one and fix the name of the
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3888
			"/ current class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3889
			"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3890
			keep ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3891
			    saveIt ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3892
				Smalltalk renameClass:newClass to:(className , '_rev_' , rev).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3893
				newClass category:'* old versions *'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3894
				Smalltalk renameClass:currentClass to:className.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3895
				currentClass category:prevCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3896
			    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3897
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3898
			ok := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3899
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3900
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3901
	    ] valueNowOrOnUnwindDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3902
		aStream close.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3903
		self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3904
		Smalltalk changed.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3905
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3906
	    ok ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3907
		self switchToClassNamed:newClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3908
	    ]    
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3909
	]
213
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3910
    ]
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3911
4b8b25b6baa1 niver revision info; added loadRevision
Claus Gittinger <cg@exept.de>
parents: 204
diff changeset
  3912
    "Created: 14.11.1995 / 16:43:15 / cg"
1038
1368758e6934 dont skip unchanged methods when loading from
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  3913
    "Modified: 14.2.1997 / 18:30:14 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3914
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  3915
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3916
classModifyContainer
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3917
    "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
  3918
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3919
    currentClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3920
	self warn:'dont know anything about unloaded classes.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3921
	^ self.
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3922
    ].
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3923
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3924
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3925
	self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3926
	    classDefineSourceContainerFor:currentClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3927
	    title:(resources string:'Repository information for %1' with:currentClass name)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3928
	    text:'defining/changing the source code container'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3929
	    createDirectories:true createContainer:true. 
283
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3930
    ]
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3931
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3932
    "Created: 23.11.1995 / 11:41:38 / cg"
349
a927f39271d5 fixes for new containers
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
  3933
    "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
  3934
!
159098ddc555 allow definition/change of container (without actually creating)
Claus Gittinger <cg@exept.de>
parents: 273
diff changeset
  3935
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3936
classRemoveContainer
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3937
    "remove a container from the source repository"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3938
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3939
    currentClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3940
	self warn:'please load the class first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3941
	^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3942
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3943
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3944
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3945
	self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3946
	    classRemoveSourceContainerFor:currentClass
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3947
    ]
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3948
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3949
    "Created: 23.11.1995 / 11:41:38 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3950
    "Modified: 11.9.1996 / 12:55:42 / cg"
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3951
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3952
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3953
classRemoveSourceContainerFor:aClass
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3954
    "show container & let user confirm twice."
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3955
741
d0dc66cf7499 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 731
diff changeset
  3956
    |module package fileName info mgr|
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3957
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3958
    aClass isLoaded ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3959
	self warn:'please load the class first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3960
	^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3961
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3962
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3963
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3964
    "/ 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
  3965
    "/ if so, take that as a default.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3966
    "/
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3967
    mgr := aClass sourceCodeManager.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3968
    mgr isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3969
	self warn:'No sourceCodeManagement.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3970
	^ false
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3971
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3972
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3973
    info := mgr sourceInfoOfClass:aClass.
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3974
    info notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3975
	(info includesKey:#module) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3976
	    module := (info at:#module).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3977
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3978
	(info includesKey:#directory) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3979
	    package := (info at:#directory).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3980
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3981
	fileName := mgr containerFromSourceInfo:info.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3982
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3983
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3984
    module isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3985
	self warn:'classes module is unknown.\\It seems to not have a container.' withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3986
	^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3987
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3988
    package isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3989
	self warn:'classes package is unknown.\\It seems to not have a container.' withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3990
	^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3991
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3992
    fileName isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3993
	self warn:'classes container fileName is unknown.\\It seems to not have a container.' withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3994
	^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3995
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3996
        
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  3997
    (mgr checkForExistingContainerInModule:module 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3998
				   package:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  3999
				 container:fileName) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4000
	self warn:'Class has no source container.' withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4001
	^ false.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4002
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4003
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  4004
    (Dialog
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4005
	choose:(resources 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4006
		    string:'Please confirm removal of the container for %1:
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4007
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4008
container:    %2 / %3 / %4
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4009
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4010
Really remove ?' 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4011
		    with:aClass name 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4012
		    with:module 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4013
		    with:package 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4014
		    with:fileName) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4015
	labels:(Array 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4016
		    with:(resources string:'no') 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4017
		    with:(resources string:'remove'))
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4018
	values:#(false true)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4019
	default:false) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4020
	^ self.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4021
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4022
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4023
    (mgr removeContainerFor:aClass
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4024
		   inModule:module
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4025
		    package:package
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4026
		  container:fileName) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4027
	self warn:(resources string:'failed to remove container.').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4028
	self normalLabel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4029
	^ true.
725
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4030
    ].
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4031
    ^ false
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4032
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4033
    "Created: 11.9.1996 / 13:06:14 / cg"
731
6889fc8ebac5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 730
diff changeset
  4034
    "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
  4035
!
b2877d3000e7 added interface to remove a container;
Claus Gittinger <cg@exept.de>
parents: 723
diff changeset
  4036
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4037
classRevisionInfo
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4038
    "show current classes revision info in codeView"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4039
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4040
    self doClassMenu:[:currentClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4041
	|aStream info info2 s rv mgr fn msg|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4042
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4043
	aStream := WriteStream on:(String new:200).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4044
	currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4045
	    Processor activeProcess withLowerPriorityDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4046
		self busyLabel:'extracting revision info' with:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4047
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4048
		info := currentClass revisionInfo.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4049
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4050
		rv := currentClass binaryRevision.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4051
		rv notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4052
		    aStream nextPutLine:'**** Loaded classes binary information ****'; cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4053
		    aStream nextPutLine:'  Binary based upon : ' , rv.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4054
		    aStream cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4055
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4056
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4057
		info notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4058
		    (info includesKey:#revision) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4059
			aStream nextPutLine:'WARNING:'; cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4060
			aStream nextPutLine:'  The class seems not to be loaded from the repository.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4061
			aStream nextPutLine:'  Check carefully before checking anything in.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4062
			aStream nextPutLine:'  (i.e. compare with repository for renamed class(es), same-name but unrelated etc.)'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4063
			aStream cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4064
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4065
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4066
		    aStream nextPutLine:'**** Classes source information ****'; cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4067
		    s := info at:#repositoryPath ifAbsent:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4068
		    s notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4069
			aStream nextPutLine:'  Source repository : ' , s
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4070
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4071
		    aStream nextPutLine:'  Filename ........ : ' , (info at:#fileName ifAbsent:'?').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4072
		    aStream nextPutLine:'  Revision ........ : ' , (info at:#revision ifAbsent:'?').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4073
		    aStream nextPutLine:'  Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4074
		    aStream nextPutLine:'  Checkin user .... : ' , (info at:#user ifAbsent:'?').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4075
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4076
		    (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4077
			aStream nextPutLine:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4078
			aStream nextPutLine:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4079
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4080
		    aStream nextPutLine:'  Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4081
		    aStream cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4082
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4083
		    (mgr := currentClass sourceCodeManager) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4084
			aStream nextPutLine:'**** Repository information ****'; cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4085
			mgr writeRevisionLogOf:currentClass to:aStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4086
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4087
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4088
		    aStream nextPutLine:'No revision info found'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4089
		    currentClass isLoaded ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4090
			aStream cr; nextPutAll:'This is an autoloaded class - you may see more after its loaded.'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4091
		    ] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4092
			fn := currentClass classFilename.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4093
			currentClass wasAutoloaded ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4094
			    msg := 'This class was autoloaded.'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4095
			    fn notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4096
				msg := msg , ' (from ''' , fn , ''')'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4097
			    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4098
			] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4099
			    fn notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4100
				msg := 'This class was loaded from ''' , fn , '''.'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4101
			    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4102
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4103
			msg notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4104
			    aStream cr; nextPutAll:msg.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4105
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4106
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4107
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4108
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4109
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4110
	codeView contents:(aStream contents).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4111
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4112
	codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4113
	codeView acceptAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4114
	codeView explainAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4115
	methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4116
	    methodListView setSelection:nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4117
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4118
	aspect := #revisionInfo. 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4119
	self normalLabel
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4120
    ]
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4121
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  4122
    "Created: 14.11.1995 / 16:43:15 / cg"
859
98ee4f71459d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 858
diff changeset
  4123
    "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
  4124
!
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4125
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4126
getLogMessageFor:aString
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4127
    "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
  4128
     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
  4129
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4130
    |dialog textView|
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4131
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4132
    dialog := Dialog new.
1046
e5f4d06007c6 resource strings
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  4133
    (dialog addTextLabel:(resources string:'enter log message for: %1' with:aString)) adjust:#left.
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4134
    textView := dialog addTextBoxOn:nil 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4135
			class:EditTextView
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4136
			withNumberOfLines:10 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4137
			hScrollable:true 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4138
			vScrollable:true.
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4139
    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
  4140
    textView contents:lastSourceLogMessage.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4141
    dialog addAbortButton; addOkButton.
1043
01edbc67e510 ok button in log-message box is no return button
Claus Gittinger <cg@exept.de>
parents: 1042
diff changeset
  4142
    dialog okButton isReturnButton:false.
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4143
    dialog open.
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4144
    dialog accepted ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4145
	^ textView contents
626
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4146
    ].
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4147
    ^ nil
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4148
d81ad641d1d9 Use text box in dialog for revision log.
Stefan Vogel <sv@exept.de>
parents: 625
diff changeset
  4149
    "Created: 15.6.1996 / 00:20:46 / stefan"
1046
e5f4d06007c6 resource strings
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
  4150
    "Modified: 28.2.1997 / 11:47:33 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4151
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4152
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4153
!BrowserView methodsFor:'class stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4154
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4155
allClassesInCategory:aCategory
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4156
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4157
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4158
    currentNamespace = '* all *' ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4159
	^ Smalltalk allClassesInCategory:currentClassCategory
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4160
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4161
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4162
    classes := Set new.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4163
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4164
    (self listOfNamespaces) do:[:aNamespace |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4165
	aNamespace allBehaviorsDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4166
	    |actualNamespace nm|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4167
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4168
	    aClass isMeta ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4169
		(aCategory = '* all *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4170
		or:[aClass category = aCategory]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4171
		    (aClass isNamespace not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4172
		    or:[aClass == Smalltalk]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4173
			actualNamespace := aClass nameSpace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4174
			(actualNamespace isNamespace not "/ a private class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4175
			or:[actualNamespace == aNamespace]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4176
			    classes add:aClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4177
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4178
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4179
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4180
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4181
	]
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4182
    ].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4183
    ^ classes
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4184
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4185
    "Created: 23.12.1996 / 10:26:28 / cg"
887
ad1d6b0ed970 namespace fixes
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  4186
    "Modified: 23.12.1996 / 11:33:13 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4187
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4188
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4189
allClassesInCategory:aCategory do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4190
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4191
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4192
    classes := self allClassesInCategory:aCategory.
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4193
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4194
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4195
    "Modified: 23.12.1996 / 10:30:00 / cg"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4196
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4197
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4198
allClassesInCategory:aCategory inOrderDo:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4199
    "evaluate the argument, aBlock for all classes in aCategory;
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4200
     superclasses come first - then subclasses"
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4201
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4202
    |classes|
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4203
1079
513fda872db0 oops - need an OC for sorting
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  4204
    classes := (self allClassesInCategory:aCategory) asOrderedCollection.
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4205
    classes topologicalSort:[:a :b | b isSubclassOf:a].
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4206
    classes do:aBlock
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4207
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4208
    "Created: 23.12.1996 / 10:27:52 / cg"
1079
513fda872db0 oops - need an OC for sorting
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
  4209
    "Modified: 19.3.1997 / 12:48:28 / cg"
886
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4210
!
4e6918aaa19e namespace fixes
Claus Gittinger <cg@exept.de>
parents: 885
diff changeset
  4211
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4212
allClassesInSelectedNamespacesDo:aBlock
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4213
    |nameSpacesConsidered|
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4214
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4215
    nameSpacesConsidered := self listOfNamespaces asIdentitySet.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4216
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4217
    Smalltalk allBehaviorsDo:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4218
	(nameSpacesConsidered includes:aClass nameSpace)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4219
	ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4220
	    aBlock value:aClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4221
	]
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4222
    ]
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4223
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4224
    "Created: 16.1.1997 / 20:18:47 / cg"
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4225
    "Modified: 16.1.1997 / 20:20:24 / cg"
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4226
!
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  4227
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4228
checkClassSelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4229
    "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
  4230
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4231
    currentClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4232
	self warn:'select a class first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4233
	^ false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  4234
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4235
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4236
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4237
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4238
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
  4239
    "common helper for newClass and newSubclass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4240
     - 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
  4241
     Also, set acceptaction to install the class."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4242
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4243
    |theSuperClass|
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4244
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4245
    currentMethodCategory := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4246
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4247
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  4248
    classListView setSelection:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4249
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4250
    fullClass ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4251
	methodCategoryListView contents:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4252
	methodListView contents:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4253
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4254
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4255
    (aClass == Autoload
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  4256
    or:[aClass isNil or:[aClass isLoaded not]]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4257
	theSuperClass := Object
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4258
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4259
	theSuperClass := aClass
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4260
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4261
    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
  4262
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4263
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4264
    codeView acceptAction:[:theCode |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4265
	codeView cursor:Cursor execute.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4266
	Object abortSignal catch:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4267
	    |cls|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4268
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4269
	    Object errorSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4270
		codeView error:ex errorString
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4271
			 position:1 to:nil from:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4272
	    ] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4273
		Class nameSpaceQuerySignal answer:Smalltalk
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4274
		do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4275
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4276
		    cls := (Compiler evaluate:theCode asString notifying:codeView compile:false).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4277
		    cls isBehavior ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4278
			codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4279
			self classCategoryUpdate.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4280
			self updateClassListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4281
			cls isNamespace ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4282
			    self switchToClassNamed:(cls name).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4283
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4284
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4285
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4286
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4287
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4288
	codeView cursor:(Cursor normal).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4289
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4290
    codeView explainAction:nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4291
    self switchToClass:nil
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4292
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4293
    "Created: 23.12.1996 / 12:45:43 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  4294
    "Modified: 16.1.1997 / 01:46:39 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4295
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4296
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4297
classDoubleClick:lineNr
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4298
    currentClass notNil ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4299
        currentClass isVisualStartable ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4300
            currentClass open
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4301
        ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4302
    ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4303
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4304
    "Modified: / 28.10.1997 / 12:45:05 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4305
    "Created: / 29.10.1997 / 15:50:26 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4306
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  4307
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4308
classListUpdate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4309
    RememberAspect ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4310
	aspect == #hierarchy ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4311
	    ^ self classHierarchy
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4312
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4313
	aspect == #classInstVars ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4314
	    ^ self classClassInstVars
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4315
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4316
	aspect == #comment ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4317
	    ^ self classComment
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4318
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4319
	aspect == #primitiveDefinitions ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4320
	    ^ self classPrimitiveDefinitions
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4321
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4322
	aspect == #primitiveFunctions ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4323
	    ^ self classPrimitiveFunctions
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4324
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4325
	aspect == #primitiveVariables ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4326
	    ^ self classPrimitiveVariables
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4327
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4328
	aspect == #revisionInfo ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4329
	    ^ self classRevisionInfo
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4330
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4331
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4332
    self classDefinition
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4333
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4334
    "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
  4335
    "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
  4336
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4337
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4338
classSelection:lineNr
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4339
    "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
  4340
991
893a4dc659af added mechanism to reconnect a class (in case its removed from
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  4341
    |cls nm oldSelector sel classes key msg globlName|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4342
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4343
    (currentClassHierarchy notNil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4344
     and:[fullProtocol]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4345
	oldSelector := currentSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4346
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4347
	self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4348
	self updateMethodListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4349
	fullProtocol ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4350
	    self updateVariableList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4351
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4352
	oldSelector notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4353
	    self switchToMethod:oldSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4354
	    currentMethod notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4355
		self switchToMethodCategory:(currentMethod category).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4356
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4357
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4358
	^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4359
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4360
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4361
    (sel := classListView selectionValue) isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4362
	self classCategorySelectionChanged. 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4363
	aspect := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4364
	currentClass := actualClass := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4365
	self updateCodeView.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4366
	^ self
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4367
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4368
    nm := sel withoutSpaces.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  4369
    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
  4370
    cls notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4371
	self switchToClass:cls.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4372
	self classSelectionChanged
836
22cdfaaf87fc namespace fixes & another check
Claus Gittinger <cg@exept.de>
parents: 834
diff changeset
  4373
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4374
	(self confirm:('oops - no class named: ' , nm , ' found in selected namespace(s)\\Try to reconnect ?') withCRs)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4375
	ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4376
	    "/ search for all classes by that name ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4377
	    classes := IdentitySet new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4378
	    Class allSubInstancesDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4379
		aClass name = nm ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4380
		    classes add:aClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4381
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4382
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4383
	    classes notEmpty ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4384
		classes size == 1 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4385
		    cls := classes first.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4386
		    Smalltalk 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4387
			keysAndValuesDo:[:key :aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4388
				(Smalltalk at:key) == cls ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4389
				    globlName := key
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4390
				]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4391
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4392
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4393
		    msg := 'found ' , cls name , ' in category ''' , cls category , '''.\'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4394
		    globlName notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4395
			msg := msg , '(known as ' , globlName , ')\'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4396
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4397
		    (self confirm:(msg , '\rebind in Smalltalk as ''' , cls name , '''?') withCRs)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4398
		    ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4399
			Smalltalk at:cls name asSymbol put:cls
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4400
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4401
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4402
		    self warn:('found multiple classes with a name of ' , nm , '.\\Select and rename as required') withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4403
		     SystemBrowser browseClasses:classes asOrderedCollection
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4404
					   title:'choose and rename as required'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4405
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4406
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4407
		self warn:'oops - could not find that class'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4408
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4409
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4410
    ]
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
  4411
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  4412
    "Modified: 31.7.1997 / 22:56:45 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4413
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4414
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4415
classSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4416
    |oldMethodCategory oldMethod oldSelector|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4417
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4418
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4419
	"/ alien classes have no methodCategories; hide that list ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4420
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4421
	currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4422
	    currentClass supportsMethodCategories ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4423
		self hideMethodCategoryList
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4424
	    ] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4425
		self showMethodCategoryList
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4426
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4427
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4428
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4429
	aspect := #definition.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4430
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4431
	oldMethodCategory := currentMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4432
	oldMethod := currentMethod.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4433
	oldSelector := currentSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4434
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4435
	showInstance ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4436
	    actualClass := acceptClass := currentClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4437
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4438
	    actualClass := acceptClass := currentClass class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4439
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4440
	currentMethodCategory := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4441
	currentMethod := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4442
	currentSelector := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4443
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4444
	self updateMethodCategoryList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4445
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4446
	oldMethodCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4447
	    methodCategoryListView setSelectElement:oldMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4448
	    methodCategoryListView hasSelection ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4449
		currentMethodCategory := oldMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4450
		self methodCategorySelectionChanged
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4451
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4452
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4453
	self updateMethodList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4454
	"/ self updateCodeView.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4455
	self updateVariableList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4456
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4457
	fullClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4458
	    self updateCodeView.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4459
	    codeView acceptAction:[:theCode |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4460
		codeView cursor:Cursor execute.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4461
		Object abortSignal catch:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4462
		    self compileCode:theCode asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4463
		    codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4464
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4465
		codeView cursor:Cursor normal.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4466
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4467
	] ifFalse:[
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4468
"/            self classDefinition.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4469
	    self classListUpdate.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4470
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4471
	    codeView acceptAction:[:theCode |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4472
		|ns|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4473
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4474
		currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4475
		    ns := currentClass nameSpace
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4476
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4477
		    ns := nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4478
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4479
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4480
		codeView cursor:Cursor execute.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4481
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4482
		Class nameSpaceQuerySignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4483
		    ns isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4484
			ex reject
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4485
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4486
		    ex proceedWith:ns
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4487
		] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4488
		    Object abortSignal catch:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4489
			UndefinedObject createMinimumProtocolInNewSubclassQuery
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4490
			answer:true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4491
			do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4492
			    (Compiler 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4493
				evaluate:theCode asString 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4494
				notifying:codeView 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4495
				compile:false)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4496
			    isBehavior ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4497
				self classCategoryUpdate.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4498
				self updateClassListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4499
				codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4500
			    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4501
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4502
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4503
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4504
		codeView cursor:Cursor normal.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4505
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4506
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4507
	codeView explainAction:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4508
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4509
	(classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4510
	    (currentClassCategory = currentClass category) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4511
		currentClassCategory := currentClass category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4512
		(classCategoryListView list includes:currentClassCategory) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4513
		    classCategoryListView setSelectElement:currentClassCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4514
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4515
		    classCategoryListView setSelection:nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4516
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4517
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4518
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4519
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4520
	self setDoitActionForClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4521
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4522
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4523
    "Created: 23.11.1995 / 11:32:03 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4524
    "Modified: 18.8.1997 / 15:43:49 / cg"
199
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
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4527
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
  4528
    "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
  4529
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4530
    |cat aString name nameProto namePrefix i existingNames withNameSpaceDirective
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4531
     className ownerName s|
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4532
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4533
    s := TextStream on:''.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4534
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4535
    isNameSpace ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4536
	s nextPutAll:'Namespace name:''NewNameSpace'''.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4537
	s cr; cr.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4538
	s emphasis:(self commentEmphasis).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4539
	s nextPutAll:'"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  4540
 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
  4541
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  4542
 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
  4543
 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
  4544
"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4545
'.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4546
	^ s contents.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4547
    ].
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4548
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4549
    withNameSpaceDirective :=
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4550
	currentNamespace notNil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4551
	and:[currentNamespace ~= '* all *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4552
	and:[currentNamespace ~= Smalltalk]].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4553
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4554
    withNameSpaceDirective ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4555
	className := aSuperClass nameWithoutNameSpacePrefix.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4556
	s nextPutAll:('"{ Namespace: ''' , currentNamespace name , ''' }"').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4557
	s cr; cr.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4558
    ] ifFalse:[    
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4559
	className := aSuperClass name.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4560
    ].
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4561
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4562
    cat := categoryString.
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4563
    (cat isNil or:[cat startsWith:'*']) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4564
	cat := '* no category *'
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4565
    ].
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4566
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4567
    nameProto := 'NewClass'.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4568
    i := 1.
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4569
    isPrivate ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4570
	namePrefix := currentClass name , '::'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4571
	existingNames := currentClass privateClasses.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4572
	existingNames size > 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4573
	    existingNames := existingNames collect:[:cls | cls name].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4574
	]
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4575
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4576
	namePrefix := ''.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4577
	existingNames := Smalltalk keys
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4578
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4579
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4580
    name := 'NewClass' , i printString.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4581
    existingNames notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4582
	nameProto := namePrefix , name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4583
	[nameProto knownAsSymbol and:[existingNames includes:nameProto asSymbol]] whileTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4584
	    i := i + 1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4585
	    name := 'NewClass' , i printString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4586
	    nameProto := namePrefix , name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4587
	].
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4588
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4589
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4590
    s nextPutAll:className.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4591
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4592
    isPrivate ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4593
	withNameSpaceDirective ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4594
	    ownerName := currentClass nameWithoutNameSpacePrefix
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4595
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4596
	    ownerName := currentClass name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4597
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4598
	s nextPutAll:(' subclass:#' , name  , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4599
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4600
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4601
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4602
' , '    privateIn:' , ownerName)
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4603
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4604
	s nextPutAll:(' subclass:#' , name , '
752
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4605
' , '    instanceVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4606
' , '    classVariableNames: ''''
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4607
' , '    poolDictionaries: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4608
' , '    category: ''').
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4609
	cat notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4610
	    s nextPutAll: cat
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4611
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4612
	s nextPutAll: ''''
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4613
    ].
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4614
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4615
    s cr; cr.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4616
    s emphasis:(self commentEmphasis).
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4617
    s nextPutAll:'
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4618
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4619
 Replace ''' , className , ''', ''', name , ''' and
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4620
 the empty string arguments by true values.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4621
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4622
 Install (or change) the class by ''accepting'',
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4623
 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
  4624
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4625
 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
  4626
 add some documentation; preferably under the classes documentation
2bfe2b7e572a prepare for private classes
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
  4627
 protocol.
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4628
 (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
  4629
"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4630
'.
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4631
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  4632
    ^ s contents
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4633
889
1d4a318a6eff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 888
diff changeset
  4634
    "Created: 23.12.1996 / 12:46:31 / cg"
1302
ac29a32ae8b9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
  4635
    "Modified: 29.8.1997 / 01:10:54 / cg"
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4636
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  4637
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4638
doClassMenu:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4639
    "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
  4640
     while showing waitCursor"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4641
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4642
    self checkClassSelected ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4643
	self withBusyCursorDo:[aBlock value:currentClass]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4644
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4645
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  4646
    "Modified: 18.8.1997 / 15:43:58 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4647
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4648
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4649
listOfAllClassNamesInCategory:aCategory
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4650
    "return a list of the names of all classes in a given category"
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4651
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4652
    ^ self listOfAllClassesInCategory:aCategory names:true
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4653
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4654
    "Modified: 10.1.1997 / 14:00:33 / cg"
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4655
!
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4656
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4657
listOfAllClassesInCategory:aCategory names:namesFlag
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4658
    "return a list of (the names) of all classes in a given category
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4659
     from the currently selected set of nameSpaces."
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4660
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4661
    |nameSpaces listOfClassNames listOfClasses classesPresent namesPresent searchCategory 
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4662
     match anyCategory nm owner allNameSpaces|
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4663
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4664
    allNameSpaces := (currentNamespace = '* all *').
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4665
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4666
    "/ keep track of added names (care for obsolete classes)
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
  4667
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4668
    namesPresent := Set new.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4669
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  4670
    (aCategory = '* hierarchy *') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4671
	listOfClassNames := OrderedCollection new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4672
	listOfClasses := OrderedCollection new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4673
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4674
	self classHierarchyOf:Object withAutoloaded:true do:[:aClass :lvl|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4675
	    |indent|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4676
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4677
	    (aClass isNamespace not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4678
	    or:[aClass == Smalltalk]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4679
		nm := self displayedClassNameOf:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4680
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4681
		(namesPresent includes:nm) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4682
		    indent := String new:lvl*2.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4683
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4684
		    "/ show classes from other nameSpaces in italic
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4685
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4686
		    (allNameSpaces not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4687
		     and:[(self findClassNamedInNameSpace:nm) isNil]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4688
			nm := nm asText emphasizeAllWith:#italic.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4689
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4690
		    nm := indent , nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4691
		    namesPresent add:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4692
		    listOfClassNames add:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4693
		    listOfClasses add:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4694
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4695
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4696
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4697
	namesFlag ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4698
	    ^ listOfClasses
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4699
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4700
	^ listOfClassNames
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4701
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4702
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4703
    (aCategory = '* all *') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4704
	anyCategory := true
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  4705
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4706
	anyCategory := false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4707
	(aCategory = '* no category *') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4708
	    searchCategory := nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4709
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4710
	    searchCategory := aCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4711
	].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  4712
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  4713
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4714
    allNameSpaces ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4715
	nameSpaces := Array with:Smalltalk.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4716
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4717
	nameSpaces := self listOfNamespaces.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4718
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4719
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4720
    listOfClasses := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4721
    listOfClassNames := OrderedCollection new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4722
    classesPresent := IdentitySet new.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4723
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  4724
    nameSpaces do:[:aNamespace |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4725
	aNamespace allBehaviorsDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4726
	    |thisCategory actualNamespace nm owner|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4727
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4728
	    aClass isMeta ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4729
		(aClass isNamespace not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4730
		or:[aClass == Smalltalk]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4731
		    (classesPresent includes:aClass) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4732
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4733
			match := anyCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4734
			match ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4735
			    thisCategory := aClass category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4736
			    match := ((thisCategory = searchCategory) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4737
				     or:[thisCategory = aCategory]).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4738
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4739
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4740
			match ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4741
			    fullClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4742
				aClass owningClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4743
				    match := false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4744
				]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4745
			    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4746
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4747
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4748
			match ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4749
			    nm := self displayedClassNameOf:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4750
			    (namesPresent includes:nm) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4751
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4752
				allNameSpaces ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4753
				    (owner := aClass topOwningClass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4754
					actualNamespace := owner nameSpace
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4755
				    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4756
					actualNamespace := aClass nameSpace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4757
				    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4758
				    match := actualNamespace isNamespace not "/ a private class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4759
					     or:[actualNamespace == aNamespace].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4760
				].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4761
				match ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4762
				    namesPresent add:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4763
				    classesPresent add:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4764
				    listOfClasses add:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4765
				    listOfClassNames add:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4766
				]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4767
			    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4768
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4769
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4770
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4771
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4772
	]
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  4773
    ].
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4774
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
  4775
    fullClass ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4776
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4777
	"/ mhm - must search through private classes of those
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4778
	"/ in smalltalk (they are not visible in the nameSpace,
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4779
	"/ but should also be displayed)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4780
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4781
	Smalltalk allBehaviorsDo:[:aClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4782
	    |actualNamespace owner|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4783
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4784
	    aClass isMeta ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4785
		(classesPresent includes:aClass) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4786
		    (owner := aClass topOwningClass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4787
			(classesPresent includes:owner) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4788
			    nm := self displayedClassNameOf:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4789
			    (namesPresent includes:nm) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4790
				namesPresent add:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4791
				listOfClasses add:aClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4792
				listOfClassNames add:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4793
			    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4794
			]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4795
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4796
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4797
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4798
	].
898
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  4799
    ].
feb5df135b32 subclasses in nameSpaces, again
Claus Gittinger <cg@exept.de>
parents: 897
diff changeset
  4800
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4801
    (listOfClasses size == 0) ifTrue:[^ nil].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4802
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4803
    "/ sort by name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4804
    listOfClassNames sortWith:listOfClasses.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4805
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4806
    namesFlag ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4807
	^ listOfClasses
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4808
    ].
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4809
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4810
    "/ indent after sorting
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4811
    1 to:listOfClassNames size do:[:index |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4812
	|nm cls owner s|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4813
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4814
	cls := listOfClasses at:index.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4815
	owner := cls.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4816
	(owner := owner owningClass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4817
	    nm := listOfClassNames at:index.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4818
	    s := nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4819
	    [owner notNil] whileTrue:[    
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4820
		s := '  ' , s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4821
		owner := owner owningClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4822
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4823
	    listOfClassNames at:index put:s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4824
	].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4825
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4826
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4827
    ^ listOfClassNames
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  4828
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4829
    "Created: 10.1.1997 / 13:57:34 / cg"
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  4830
    "Modified: 22.3.1997 / 14:03:36 / cg"
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4831
!
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4832
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4833
listOfClassNameHierarchyOf:aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4834
    "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
  4835
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4836
    |startClass classes thisOne|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4837
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4838
    showInstance ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4839
	startClass := aClass
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4840
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4841
	startClass := aClass class.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4842
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4843
    classes := startClass allSuperclasses.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4844
    thisOne := Array with:startClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4845
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4846
    classes notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4847
	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
  4848
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4849
	classes := thisOne
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4850
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4851
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4852
    fullProtocol ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4853
	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
  4854
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  4855
    ^ classes collect:[:c | self displayedClassNameOf:c "c name"]
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  4856
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  4857
    "Created: 10.1.1997 / 14:01:06 / cg"
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  4858
    "Modified: 30.7.1997 / 17:47:24 / cg"
149
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
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4861
renameCurrentClassTo:aString
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4862
    "helper - do the class-rename"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4863
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4864
    self doClassMenu:[:currentClass |
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4865
        |oldSym cls|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4866
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4867
        "/ check if the target already exists - confirm if so.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4868
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4869
        (cls := Smalltalk classNamed:aString) notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4870
            (self confirm:(resources string:'WARN_RENAME' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4871
                                     with:aString 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4872
                                     with:cls category) withCRs)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4873
                ifFalse:[^ self]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4874
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4875
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4876
        oldSym := currentClass name asSymbol.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4877
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4878
        "/
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4879
        "/ renaming is actually more complicated as one might
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4880
        "/ think (care for classVariables, privateClasses etc.)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4881
        "/ Smalltalk knows all about that ...
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4882
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4883
        Smalltalk renameClass:currentClass to:aString.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4884
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4885
        self updateClassList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4886
        self updateMethodCategoryListWithScroll:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4887
        self updateMethodListWithScroll:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4888
        self withBusyCursorDo:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4889
            Transcript showCR:('searching for users of ' , oldSym); endEntry.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4890
            SystemBrowser browseReferendsOf:oldSym warnIfNone:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4891
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4892
    ]
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
  4893
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4894
    "Created: / 25.11.1995 / 13:02:53 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  4895
    "Modified: / 25.10.1997 / 19:37:55 / cg"
199
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4898
switchToClass:newClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4899
    "switch to some other class;
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4900
     keep instance protocol as it was ..."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4901
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4902
    |cls meta|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4903
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
  4904
"/    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
  4905
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
  4906
    self releaseClass.
199
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
    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
  4909
    cls isMeta ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4910
	meta := cls.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4911
	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
  4912
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4913
	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
  4914
    ].
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
  4915
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4916
    currentClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4917
    showInstance ifTrue:[
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4918
       actualClass := acceptClass := cls.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4919
    ] 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
  4920
       actualClass := acceptClass := meta.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4921
    ].
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
    currentClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4924
	cls addDependent:self.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4925
	meta addDependent:self.
199
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
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4928
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4929
    "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
  4930
    "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
  4931
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4932
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4933
switchToClassNameMatching:aMatchString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4934
    |classNames thisName box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4935
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4936
    classNames := Set new.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4937
    Smalltalk allBehaviorsDo:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4938
	thisName := aClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4939
	(aMatchString match:thisName) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4940
	    classNames add:thisName
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4941
	]
199
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
    (classNames size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4944
    (classNames size == 1) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4945
	^ self switchToClassNamed:(classNames first)
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4946
    ].
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4947
    classNames := classNames asArray sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4948
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4949
    box := self listBoxTitle:'select class to switch to:'
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4950
		      okText:'ok'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4951
			list:classNames.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4952
    box action:[:aString | self switchToClassNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4953
    box showAtPointer
607
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4954
96781ad00fdb ignore obsoletes (in classNamesMatching)
Claus Gittinger <cg@exept.de>
parents: 606
diff changeset
  4955
    "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
  4956
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  4957
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4958
switchToClassNamed:aString
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  4959
    |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
  4960
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4961
    meta := false.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4962
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4963
    str := aString.
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4964
    (aString endsWith:' class') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4965
	str := aString copyWithoutLast:6.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4966
	meta := true
885
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4967
    ].
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4968
73f73666c7aa preserve class/instance setting in load function.
Claus Gittinger <cg@exept.de>
parents: 884
diff changeset
  4969
    theClass := self findClassNamed:str.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4970
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4971
    classCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4972
	classCategoryListView list size == 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4973
	    classCategoryListView list:(self listOfAllClassCategories).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4974
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4975
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4976
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  4977
    theClass == currentClass ifTrue:[^ self].
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
    theClass isBehavior ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4980
	classCategoryListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4981
	    currentClassHierarchy isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4982
		((newCat := theClass category) ~= currentClassCategory) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4983
		    currentClassCategory := newCat.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4984
		    newCat isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4985
			element := '* no category *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4986
		    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4987
			element := newCat.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4988
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4989
		    classCategoryListView setSelectElement:element.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4990
		    "/ classCategoryListView makeSelectionVisible.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4991
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4992
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4993
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4994
	self updateClassList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  4995
	self switchToClass:theClass.
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  4996
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4997
"/        (currentNamespace = '* all *'
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4998
"/        or:[currentNamespace ~= theClass nameSpace]) ifTrue:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  4999
"/            str := theClass name
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5000
"/        ] ifFalse:[
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5001
"/            str := theClass nameWithoutPrefix
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5002
"/        ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5003
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5004
	l := classListView list.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5005
	l notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5006
	    idx := l findFirst:[:line | line withoutSpaces = str].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5007
	    classListView selection:idx.
839
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  5008
b3ddd53c2791 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 838
diff changeset
  5009
"/            classListView setSelectElement:str.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5010
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5011
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5012
	self instanceProtocol:meta not.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5013
	idx ~~ 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5014
	    self classSelectionChanged.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5015
	    classCategoryListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5016
		classCategoryListView setSelectElement:theClass category
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5017
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5018
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5019
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5020
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5021
    "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
  5022
    "Modified: 17.6.1996 / 16:54:55 / stefan"
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  5023
    "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
  5024
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5025
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5026
updateClassList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5027
    self updateClassListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5028
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5029
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5030
updateClassListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5031
    |classes oldClassName|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5032
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  5033
    gotClassList == true ifTrue:[^ self].
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  5034
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5035
    classListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5036
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5037
	 refetch in case we are not up to date
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5038
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5039
	(currentClass notNil and:[fullProtocol not]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5040
	    oldClassName := currentClass name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5041
	    currentClass := self findClassNamed:oldClassName.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5042
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5043
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5044
	currentClassCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5045
	    classes := self listOfAllClassNamesInCategory:currentClassCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5046
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5047
	    currentClassHierarchy notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5048
		classes := self listOfClassNameHierarchyOf:currentClassHierarchy
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5049
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5050
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5051
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5052
	classListView list = classes ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5053
	    scroll ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5054
		classListView contents:classes
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5055
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5056
		classListView setContents:classes
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5057
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5058
	    oldClassName notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5059
		classListView setContents:classes.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5060
		classListView setSelectElement:oldClassName
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5061
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5062
		variableListView notNil ifTrue:[variableListView contents:nil]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5063
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5064
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5065
	    scroll ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5066
		fullProtocol ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5067
		    classListView scrollToBottom
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5068
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5069
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5070
	].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5071
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  5072
933
6fb063972a63 in validate-versions: only validate from current nameSpace
Claus Gittinger <cg@exept.de>
parents: 931
diff changeset
  5073
    "Modified: 10.1.1997 / 14:01:20 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5074
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5075
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5076
!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
  5077
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
  5078
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
  5079
    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
  5080
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
  5081
    "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
  5082
    "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
  5083
!
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
  5084
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5085
classMethodFileOutAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5086
    "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
  5087
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5088
    |list classString selectorString cls mth outStream fileName append
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5089
     fileBox f|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5090
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5091
    append := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5092
    fileBox := FileSaveBox
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5093
                        title:(resources string:'save methods in:')
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5094
                        okText:(resources string:'save')
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5095
                        abortText:(resources string:'cancel')
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5096
                        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
  5097
    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
  5098
    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
  5099
    Project notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5100
        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
  5101
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5102
    fileBox showAtPointer.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5103
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5104
    fileName isNil ifTrue:[^ self].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5105
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5106
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5107
     if file exists, save original in a .sav file
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5108
    "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5109
    (f := fileName asFilename) exists ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5110
        f copyTo:(f withSuffix: 'sav')
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5111
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5112
    append ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5113
        outStream := FileStream appendingOldFileNamed:fileName
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5114
    ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5115
        outStream := FileStream newFileNamed:fileName.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5116
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5117
    outStream isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5118
        ^ self warn:'cannot create: %1' with:fileName
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5119
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5120
    self withBusyCursorDo:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5121
        list := classMethodListView list.
1375
f9488662030a fileOutAll in class-method list (icons)
Claus Gittinger <cg@exept.de>
parents: 1373
diff changeset
  5122
        list do:[:l |
f9488662030a fileOutAll in class-method list (icons)
Claus Gittinger <cg@exept.de>
parents: 1373
diff changeset
  5123
            |line|
f9488662030a fileOutAll in class-method list (icons)
Claus Gittinger <cg@exept.de>
parents: 1373
diff changeset
  5124
f9488662030a fileOutAll in class-method list (icons)
Claus Gittinger <cg@exept.de>
parents: 1373
diff changeset
  5125
            line := l asString.
f9488662030a fileOutAll in class-method list (icons)
Claus Gittinger <cg@exept.de>
parents: 1373
diff changeset
  5126
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5127
            self busyLabel:'writing: ' with:line.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5128
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5129
            classString := self classNameFromClassMethodString:line.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5130
            selectorString := self selectorFromClassMethodString:line.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5131
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5132
            cls := self findClassNamed:classString.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5133
            cls isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5134
                self warn:'oops class %1 is gone' with:classString
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5135
            ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5136
                mth := cls compiledMethodAt:(selectorString asSymbol).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5137
                Class fileOutErrorSignal handle:[:ex |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5138
                    |box answer|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5139
                    box := YesNoBox 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5140
                                title:('fileOut error: ' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5141
                                       , ex errorString 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5142
                                       , '\\continue anyway ?') withCRs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5143
                                yesText:'continue' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5144
                                noText:'abort'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5145
                    answer := box confirm.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5146
                    box destroy.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5147
                    answer ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5148
                        ex proceed
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5149
                    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5150
                    self normalLabel.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5151
                    ^ self
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5152
                ] do:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5153
                    cls fileOutMethod:mth on:outStream.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5154
                ]    
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5155
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5156
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5157
        outStream close.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5158
        self normalLabel.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5159
    ]
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
  5160
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5161
    "Modified: / 17.6.1996 / 16:51:11 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5162
    "Modified: / 28.10.1997 / 14:39:48 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5163
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5164
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5165
classMethodMenu
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  5166
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg ) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5167
    <resource: #programMenu >
587
74d27450aa79 added resource info
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
  5168
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5169
    |labels selectors shorties m specialMenu|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5170
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5171
    (currentMethod notNil
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5172
    and:[currentMethod isWrapped]) ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5173
        labels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5174
                            'inspect method'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5175
                            '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5176
                            'remove break/trace' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5177
                      ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5178
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5179
        selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5180
                            methodInspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5181
                            nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5182
                            methodRemoveBreakOrTrace
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5183
                         ).
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5184
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5185
        labels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5186
                            'inspect method'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5187
                            '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5188
                            'breakpoint' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5189
                            'breakpoint in ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5190
                            '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5191
                            'trace' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5192
                            'trace sender' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5193
                            'trace full walkback' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5194
                            '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5195
                            'start timing'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5196
                            'start counting'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5197
                            'start mem usage'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5198
                      ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5199
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5200
        selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5201
                            methodInspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5202
                            nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5203
                            methodBreakPoint
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5204
                            methodBreakPointInProcess
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5205
                            nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5206
                            methodTrace
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5207
                            methodTraceSender
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5208
                            methodTraceFull
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5209
                            nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5210
                            methodStartTiming
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5211
                            methodStartCounting
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5212
                            methodStartMemoryUsage
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5213
                         ).
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5214
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5215
    specialMenu := PopUpMenu
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5216
                        labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5217
                        selectors:selectors.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5218
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5219
    device ctrlDown ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5220
        currentMethod isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5221
            classMethodListView flash.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5222
            ^ nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5223
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5224
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5225
        ^ specialMenu
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5226
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5227
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5228
    labels := #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5229
                                'fileOut'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5230
                                'fileOut all'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5231
                                'printOut'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5232
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5233
                                'browse'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5234
                                'spawn'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5235
                                'spawn class'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5236
                                'spawn full protocol'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5237
                                'spawn hierarchy'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5238
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5239
                                'senders ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5240
                                'implementors ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5241
                                'globals ...'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5242
"/                              '-'
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5243
"/                              'breakpoint' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5244
"/                              'trace' 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5245
"/                              'trace sender' 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5246
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5247
                                'remove'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5248
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5249
                                'others'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5250
               ).
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5251
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5252
    shorties := #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5253
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5254
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5255
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5256
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5257
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5258
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5259
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5260
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5261
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5262
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5263
                                #Cmds
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5264
                                #Cmdi
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5265
                                #Cmdg
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5266
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5267
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5268
"/                              nil
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5269
"/                              nil
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5270
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5271
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5272
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5273
                                #'Ctrl'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5274
               ).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5275
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5276
    selectors := #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5277
                                methodFileOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5278
                                classMethodFileOutAll
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5279
                                methodPrintOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5280
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5281
                                classMethodBrowse
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5282
                                methodSpawn
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5283
                                classSpawn
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5284
                                classSpawnFullProtocol
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5285
                                classSpawnHierarchy
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5286
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5287
                                methodSenders
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5288
                                methodImplementors
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5289
                                methodGlobalReferends
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5290
"/                              nil
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5291
"/                              methodBreakPoint 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5292
"/                              methodTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5293
"/                              methodTraceSender
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5294
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5295
                                methodRemove
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5296
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5297
                                othersMenu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5298
                  ).
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5299
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5300
    m := PopUpMenu 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5301
        labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5302
        selectors:selectors
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5303
        accelerators:shorties.
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5304
    m subMenuAt:#othersMenu put:specialMenu.
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5305
    ^ m
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5306
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5307
    "Modified: / 27.10.1997 / 20:46:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5308
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5309
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5310
!BrowserView methodsFor:'class-method stuff'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5311
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5312
classFromClassMethodString:aString
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5313
    "helper for classMethod-list - extract class name from the string"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5314
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5315
    |classString|
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5316
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5317
    classString := self classNameFromClassMethodString:aString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5318
    ^ self findClassNamed:classString.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5319
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5320
    "Created: 3.3.1997 / 15:12:59 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5321
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5322
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5323
classMethodSelection:lineNr
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5324
    "user clicked on a class/method line - show code"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5325
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  5326
    |cls string classString selectorString meta sensor|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5327
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5328
    string := classMethodListView selectionValue string.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5329
    classString := self classNameFromClassMethodString:string.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5330
    selectorString := self selectorFromClassMethodString:string.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5331
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5332
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  5333
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5334
	selectorString = currentSelector ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5335
	    "/ if there is a trace/break, remove it.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5336
	    (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5337
		self methodRemoveBreakOrTrace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5338
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5339
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5340
	].
1074
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5341
    ].
346d64e1e3e3 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
  5342
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  5343
    ((classString ~= 'Metaclass') and:[classString endsWith:' class']) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5344
	classString := classString copyWithoutLast:6 "copyTo:(classString size - 5)".
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5345
	meta := true.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5346
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5347
	meta := false.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5348
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5349
    self switchToClass:(self findClassNamed:classString).
131
claus
parents: 130
diff changeset
  5350
    meta ifTrue:[cls := currentClass class] ifFalse:[cls := currentClass].
claus
parents: 130
diff changeset
  5351
    actualClass := acceptClass := cls.
129
claus
parents: 126
diff changeset
  5352
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5353
    currentClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5354
	self warn:'oops method is gone'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5355
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5356
	currentClassCategory := currentClass category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5357
	currentSelector := selectorString asSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5358
	currentMethod := actualClass compiledMethodAt:currentSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5359
	currentMethod isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5360
	    self warn:'oops method is gone'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5361
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5362
	    currentMethodCategory := currentMethod category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5363
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5364
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5365
	self methodSelectionChanged
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5366
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5367
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5368
    self setDoitActionForClass
131
claus
parents: 130
diff changeset
  5369
claus
parents: 130
diff changeset
  5370
    "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
  5371
    "Modified: 17.6.1996 / 16:51:28 / stefan"
1245
04b8bc5ef4f7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1237
diff changeset
  5372
    "Modified: 24.7.1997 / 15:02:17 / cg"
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5373
!
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5374
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5375
classNameFromClassMethodString:aString
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5376
    "helper for classMethod-list - extract class name from the string"
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5377
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5378
    |pos s|
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5379
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5380
    s := aString string withoutSpaces.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5381
    (s endsWith:' !!') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5382
	s := s copyWithoutLast:2
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5383
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5384
    (s endsWith:')') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5385
	s := aString copyTo:(aString lastIndexOf:$()-1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5386
	s := s withoutSpaces.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5387
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5388
    (s endsWith:' !!') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5389
	s := s copyWithoutLast:2
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5390
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5391
    pos := s lastIndexOf:(Character space).
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5392
    ^ s copyTo:(pos - 1)
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5393
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5394
    "Modified: 17.6.1996 / 17:06:59 / stefan"
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5395
    "Modified: 4.11.1996 / 23:56:52 / cg"
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  5396
    "Created: 3.3.1997 / 15:11:30 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5397
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5398
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5399
selectorFromClassMethodString:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5400
    "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
  5401
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5402
    |pos s|
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5403
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  5404
    s := aString withoutSpaces.
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  5405
    (s endsWith:' !!') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5406
	s := s copyWithoutLast:2
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  5407
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  5408
    (s endsWith:')') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5409
	s := aString copyTo:(aString lastIndexOf:$()-1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5410
	s := s withoutSpaces.
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5411
    ].
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  5412
    (s endsWith:' !!') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5413
	s := s copyWithoutLast:2
677
7e4ad7a82041 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  5414
    ].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5415
    pos := s lastIndexOf:(Character space).
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  5416
    ^ 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
  5417
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  5418
    "Modified: 17.6.1996 / 17:04:38 / stefan"
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  5419
    "Modified: 4.11.1996 / 23:57:00 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5420
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5421
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5422
!BrowserView methodsFor:'event handling'!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5423
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5424
handlesKeyPress:key inView:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5425
    "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
  5426
     a keyPress in some other view ?"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5427
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  5428
    <resource: #keyboard (#Find #Cmdn #Cmdl #Cmdi #Cmds #Cmdg #Cmdt #Cmda)>
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5429
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5430
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5431
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5432
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5433
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5434
    view == classCategoryListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5435
	(key == #Find) ifTrue:[^ true].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5436
	(untranslatedKey == #Cmdn) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5437
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5438
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5439
    view == classListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5440
	(untranslatedKey == #Cmdn) ifTrue:[^ true].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5441
	(untranslatedKey == #Cmdl) ifTrue:[^ true].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5442
	(untranslatedKey == #Cmdd) ifTrue:[^ true].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5443
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5444
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5445
    view == methodCategoryListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5446
	(untranslatedKey == #Cmdn) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5447
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5448
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5449
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5450
    or:[view == classMethodListView]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5451
	(untranslatedKey == #Cmdi) ifTrue:[^ true].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5452
	(untranslatedKey == #Cmds) ifTrue:[^ true].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5453
	(untranslatedKey == #Cmdg) ifTrue:[^ true].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5454
	(untranslatedKey == #Cmdt) ifTrue:[^ true].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5455
	(untranslatedKey == #Cmda) ifTrue:[^ true].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5456
    ].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5457
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5458
    ^ false
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5459
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5460
    "Created: 2.3.1996 / 14:33:30 / cg"
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  5461
    "Modified: 11.1.1997 / 21:42:43 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5462
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5463
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5464
keyPress:key x:x y:y view:view
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5465
    "this method is reached via delegation from the classCategoryListView"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5466
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  5467
    <resource: #keyboard (#Find #Cmdn #Cmdl #Cmdi #Cmds #Cmdg #Cmdt #Cmda)>
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5468
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5469
    |untranslatedKey|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5470
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5471
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5472
    "/ have to untranslate (since we get #Inspect / #Search
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5473
    "/
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5474
    untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5475
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5476
    view == classCategoryListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5477
	(key == #Find) ifTrue:[^ self classCategoryFindClass].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5478
	(untranslatedKey == #Cmdn) ifTrue:[^ self classCategoryNewCategory].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5479
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5480
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5481
    view == classListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5482
	(untranslatedKey == #Cmdn) ifTrue:[^ self classNewClass].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5483
	(untranslatedKey == #Cmdl) ifTrue:[^ self classLoad].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5484
	(untranslatedKey == #Cmdd) ifTrue:[^ self classDocumentation].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5485
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5486
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5487
    view == methodCategoryListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5488
	(untranslatedKey == #Cmdn) ifTrue:[^ self methodCategoryNewCategory].
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5489
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5490
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5491
    ((view == methodListView)
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  5492
    or:[view == classMethodListView]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5493
	(untranslatedKey == #Cmdi) ifTrue:[^ self methodImplementors].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5494
	(untranslatedKey == #Cmds) ifTrue:[^ self methodSenders].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5495
	(untranslatedKey == #Cmdg) ifTrue:[^ self methodGlobalReferends].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5496
	(untranslatedKey == #Cmdt) ifTrue:[^ self methodStringSearch].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5497
	(untranslatedKey == #Cmda) ifTrue:[^ self methodAproposSearch].
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5498
    ].
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5499
    view keyPress:key x:x y:y
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5500
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5501
    "Created: 2.3.1996 / 14:37:52 / cg"
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  5502
    "Modified: 11.1.1997 / 21:42:54 / cg"
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5503
! !
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5504
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5505
!BrowserView methodsFor:'help'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5506
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5507
helpTextFor:aComponent
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5508
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5509
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5510
    aComponent == classCategoryListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5511
	s := 'HELP_CCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5512
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5513
    aComponent == classListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5514
	fullProtocol ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5515
	    s := 'HELP_PCLASS_LIST'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5516
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5517
	    currentClassHierarchy notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5518
		s := 'HELP_HCLASS_LIST'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5519
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5520
		s := 'HELP_CLASS_LIST'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5521
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5522
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5523
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5524
    aComponent == methodCategoryListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5525
	s := 'HELP_MCAT_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5526
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5527
    aComponent == methodListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5528
	s := 'HELP_METHOD_LIST'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5529
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5530
    aComponent == variableListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5531
	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
  5532
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5533
    aComponent == codeView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5534
	fullClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5535
	    s := 'HELP_FULLCODE_VIEW'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5536
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5537
	    s := 'HELP_CODE_VIEW'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5538
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5539
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5540
    (aComponent == instanceToggle 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5541
    or:[aComponent == classToggle]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5542
	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
  5543
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5544
    aComponent == classMethodListView ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5545
	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
  5546
    ].
1211
588a4d148234 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
  5547
    (aComponent isComponentOf:namespaceList) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5548
	s := 'HELP_NS_BOX'
1210
2b37259f0068 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1208
diff changeset
  5549
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5550
    s notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5551
	^ resources string:s
105
claus
parents: 98
diff changeset
  5552
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5553
    ^ nil
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5554
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5555
    "Modified: 31.8.1995 / 19:11:39 / claus"
1211
588a4d148234 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1210
diff changeset
  5556
    "Modified: 28.6.1997 / 15:00:18 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5557
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5558
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5559
!BrowserView methodsFor:'initialize / release'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5560
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5561
autoSearch:aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5562
    "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
  5563
     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
  5564
     search for the searchstring in the codeView"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5565
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5566
    self setSearchPattern:aString.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5567
    autoSearch := aString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5568
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5569
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5570
destroy
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5571
    "relese dependant - destroy popups"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5572
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5573
    Smalltalk removeDependent:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5574
    currentClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5575
	self releaseClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5576
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5577
	"/ just in case someone keeps a ref to myself around ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5578
	"/ ... release refs to my class (not really needed)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5579
	"/
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5580
	currentClass := actualClass := acceptClass := nil
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5581
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5582
    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
  5583
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
  5584
    "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
  5585
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5586
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5587
initialize
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5588
    super initialize.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5589
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5590
    showInstance := true.
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  5591
    showAllNamespaces := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5592
    fullClass := false.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5593
    fullProtocol := false.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  5594
    gotClassList := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5595
    aspect := nil.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5596
    currentNamespace := '* all *'.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5597
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5598
    "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
  5599
    Smalltalk addDependent:self
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5600
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  5601
    "Modified: 31.7.1997 / 22:32:09 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5602
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5603
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  5604
postRealize
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5605
    |v checkBlock|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5606
1248
72832110f144 #realize -> #postRealize
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
  5607
    super postRealize.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5608
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5609
    checkBlock := [:lineNr | self checkSelectionChangeAllowed].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5610
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5611
    v := classCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5612
    v notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5613
        v action:[:lineNr | self classCategorySelection:lineNr].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5614
        v selectConditionBlock:checkBlock.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5615
        v ignoreReselect:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5616
        v list size == 0 ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5617
            v list:(self listOfAllClassCategories).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5618
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5619
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5620
         tell classCategoryListView to ask for the menu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5621
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5622
        v menuHolder:self; menuPerformer:self; menuMessage:#classCategoryMenu.
107
claus
parents: 106
diff changeset
  5623
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5624
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5625
    v := classListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5626
    v notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5627
        v action:[:lineNr | self classSelection:lineNr].
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5628
        v doubleClickAction:[:lineNr | self classDoubleClick:lineNr].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5629
        v selectConditionBlock:checkBlock.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5630
        v ignoreReselect:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5631
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5632
         tell classListView to ask for the menu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5633
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5634
        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
  5635
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5636
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5637
    v := methodCategoryListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5638
    v notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5639
        v action:[:lineNr | self methodCategorySelection:lineNr].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5640
        v selectConditionBlock:checkBlock.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5641
        v ignoreReselect:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5642
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5643
         tell methodCategoryListView to ask for the menu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5644
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5645
        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
  5646
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5647
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5648
    v := methodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5649
    v notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5650
        v action:[:lineNr | self methodSelection:lineNr].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5651
        v doubleClickAction:[:lineNr | self methodDoubleClick:lineNr].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5652
        v selectConditionBlock:checkBlock.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5653
        v ignoreReselect:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5654
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5655
         tell methodListView to ask for the menu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5656
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5657
        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
  5658
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5659
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5660
    v := classMethodListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5661
    v notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5662
        v action:[:lineNr | self classMethodSelection:lineNr].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5663
        v selectConditionBlock:checkBlock.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5664
        v ignoreReselect:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5665
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5666
         tell classMethodListView to ask for the menu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5667
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5668
        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
  5669
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5670
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5671
    v := variableListView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5672
    v notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5673
        v action:[:lineNr | self variableSelection:lineNr].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5674
        v ignoreReselect:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5675
        v toggleSelect:true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5676
        v menuHolder:self; menuPerformer:self; menuMessage:#variableListMenu.
117
claus
parents: 114
diff changeset
  5677
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5678
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5679
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  5680
     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
  5681
     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
  5682
    "
571
c946e6b3acd2 dont scroll to bottom in class-hierarchy browser
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
  5683
    fullProtocol ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5684
        classListView scrollToBottom.
123
claus
parents: 120
diff changeset
  5685
    ]
484
7680e95d51cb added openForClass item in cc-listView
Claus Gittinger <cg@exept.de>
parents: 481
diff changeset
  5686
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5687
    "Created: / 24.7.1997 / 18:14:59 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  5688
    "Modified: / 29.10.1997 / 15:50:26 / cg"
124
claus
parents: 123
diff changeset
  5689
!
claus
parents: 123
diff changeset
  5690
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5691
terminate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5692
    (self checkSelectionChangeAllowed) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5693
	super terminate
199
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
!
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
title:someString
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5698
    myLabel := someString.
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  5699
    self topView label:someString.
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  5700
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  5701
    "Modified: 18.8.1997 / 15:19:50 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5702
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5703
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5704
!BrowserView methodsFor:'initialize subviews'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5705
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5706
createClassListViewIn:frame
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5707
    "setup the classlist subview, with its toggles"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5708
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5709
    |v panel spc wScr wScrHalf|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5710
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5711
    self createTogglesIn:frame.
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
    panel := VariableVerticalPanel
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5714
		    origin:(0.0 @ 0.0) corner:(1.0 @ 1.0)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5715
		    in:frame.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  5716
    styleSheet is3D ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5717
	spc := ViewSpacing.
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  5718
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5719
	spc := 0
810
46e587b6e439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 809
diff changeset
  5720
    ].
811
fde69dbb949a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 810
diff changeset
  5721
    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
  5722
49710cf2dd47 now is the time - for a scroller to come in the classList ...
Claus Gittinger <cg@exept.de>
parents: 762
diff changeset
  5723
    v := HVScrollableView 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5724
		for:SelectionInListView 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5725
		miniScrollerH:true miniScrollerV:false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5726
		in:panel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5727
    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
  5728
    classListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5729
    classListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5730
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5731
    v := ScrollableView for:SelectionInListView in:panel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5732
    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
  5733
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5734
    variableListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5735
    variableListView delegate:self.
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5736
1080
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5737
    wScr := v scrollBar preferredExtent x.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5738
    wScrHalf := wScr // 2.
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5739
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5740
"/    (styleSheet at:'scrollBarPosition' default:#right) == #right ifTrue:[
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5741
"/        classToggle rightInset:(classToggle rightInset + wScr).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5742
"/        classToggle leftInset:(classToggle leftInset - wScrHalf).
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5743
"/        instanceToggle rightInset:(instanceToggle rightInset + wScrHalf)
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5744
"/    ].
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5745
91096431f72c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1079
diff changeset
  5746
    "Modified: 19.3.1997 / 17:38:07 / cg"
199
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
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5749
createCodeViewIn:aView
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5750
    "setup the code view"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5751
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5752
    ^ self createCodeViewIn:aView atY:0.25
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5753
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5754
    "Modified: 2.3.1996 / 16:08:46 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5755
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5756
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5757
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
  5758
    "setup the code view"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5759
    |v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5760
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5761
    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
  5762
    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
  5763
    codeView := v scrolledView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5764
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5765
    "Created: 2.3.1996 / 16:09:03 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5766
!
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5767
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5768
createMethodListViewIn:aView atX:relX
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5769
    "setup the method list view"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5770
    |v|
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5771
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5772
    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
  5773
    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
  5774
    methodListView := v scrolledView.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5775
    methodListView delegate:self.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5776
    ^ v
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5777
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5778
    "Created: 2.3.1996 / 16:07:10 / cg"
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5779
    "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
  5780
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5781
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5782
createTogglesIn:aFrame
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5783
    "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
  5784
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5785
    |h halfSpace classAction instanceAction|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5786
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5787
    classAction := [self instanceProtocol:false].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5788
    instanceAction := [self instanceProtocol:true].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5789
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5790
    halfSpace := ViewSpacing // 2.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5791
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5792
    instanceToggle := "Toggle" RadioButton label:(resources at:'instance') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  5793
    h := instanceToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5794
    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
  5795
    instanceToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5796
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5797
    instanceToggle turnOn.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5798
    instanceToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5799
    instanceToggle pressAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5800
    instanceToggle releaseAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5801
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5802
    classToggle := "Toggle" RadioButton label:(resources at:'class') in:aFrame.
171
bd57f15a26c1 2d style pixel computations - again
Claus Gittinger <cg@exept.de>
parents: 170
diff changeset
  5803
    h := classToggle heightIncludingBorder.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5804
    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
  5805
    classToggle topInset:h negated.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5806
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5807
    classToggle turnOff.
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5808
    classToggle controller beToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5809
    classToggle pressAction:classAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5810
    classToggle releaseAction:instanceAction.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5811
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5812
    styleSheet is3D ifTrue:[
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5813
        instanceToggle bottomInset:halfSpace.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5814
        classToggle bottomInset:halfSpace.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5815
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5816
        instanceToggle leftInset:halfSpace.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5817
        classToggle leftInset:halfSpace.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5818
        instanceToggle rightInset:ViewSpacing - halfSpace.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5819
        classToggle rightInset:ViewSpacing - halfSpace.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5820
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5821
        styleSheet name == #motif ifTrue:[
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5822
            instanceToggle showLamp:true.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5823
            classToggle showLamp:true.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5824
        ]
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5825
    ].
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5826
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5827
    "Modified: / 3.11.1997 / 14:44:56 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5828
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5829
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5830
focusSequence
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5831
    |s|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5832
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5833
    s := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5834
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5835
    classCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5836
	s add:classCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5837
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5838
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5839
    classListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5840
	s add:classListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5841
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5842
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5843
"/    variableListView notNil ifTrue:[
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5844
"/        s add:variableListView
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5845
"/    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5846
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5847
    instanceToggle notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5848
	s add:instanceToggle.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5849
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5850
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5851
    methodCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5852
	s add:methodCategoryListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5853
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5854
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5855
    methodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5856
	s add:methodListView
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5857
    ].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5858
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5859
    classMethodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  5860
	s add:classMethodListView
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5861
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  5862
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5863
    s add:codeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5864
    ^ s
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5865
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5866
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5867
setupForAll
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5868
    "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
  5869
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5870
    |vpanel hpanel frame v spc nsHolder hMax|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5871
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5872
    styleSheet is3D ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5873
        spc := ViewSpacing.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5874
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5875
        spc := 0
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5876
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5877
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5878
    vpanel := VariableVerticalPanel 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
  5879
    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
  5880
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5881
    v := HVScrollableView for:SelectionInListView
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5882
                          miniScrollerH:true miniScrollerV:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5883
                          in:hpanel.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5884
    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
  5885
    classCategoryListView := v scrolledView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5886
    classCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5887
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5888
    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
  5889
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5890
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5891
    namespaceList := ComboListView origin:(0.0@1.0) corner:(0.25@1.0) in:hpanel.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5892
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5893
    hMax := (instanceToggle height + instanceToggle borderWidth)
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5894
            max:(namespaceList preferredExtent y).
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5895
    hMax := hMax + spc.
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5896
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5897
    v bottomInset:hMax + spc.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5898
    nsHolder := currentNamespace asValue.
931
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5899
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5900
    namespaceList topInset:(hMax negated) + (spc // 2).
1201
5bcdee8b4644 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
  5901
    namespaceList leftInset:(ViewSpacing // 2).
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5902
    namespaceList bottomInset:(spc // 2).
931
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5903
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5904
"/    styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5905
"/        namespaceList leftInset:(classCategoryListView originRelativeTo:v) x.
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5906
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5907
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5908
"/    (v scrollBar originRelativeTo:v) > (classCategoryListView originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5909
"/    ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5910
"/        namespaceList rightInset:((v scrollBar originRelativeTo:v)
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5911
"/                                  -
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5912
"/                                  (classCategoryListView originRelativeTo:v))
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5913
"/    ] ifFalse:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5914
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5915
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5916
"/        ]
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5917
"/    ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5918
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5919
"/        styleSheet is3D ifTrue:[
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5920
"/            namespaceList rightInset:(ViewSpacing // 2).
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5921
"/        ].
b31937ead721 fixed nameSpace views geometry for 2D styles
Claus Gittinger <cg@exept.de>
parents: 927
diff changeset
  5922
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5923
    self setListOfNamespaces.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5924
    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
  5925
    namespaceList label menuHolder:self; menuMessage:#nameSpaceMenu.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5926
    nsHolder onChangeSend:#value
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5927
                       to:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5928
                                self changeNameSpaceTo:nsHolder value
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5929
                          ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  5930
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5931
    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
  5932
    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
  5933
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5934
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5935
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5936
    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
  5937
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5938
    self createCodeViewIn:vpanel
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5939
1369
f481dc05610f size of nameSpace view
Claus Gittinger <cg@exept.de>
parents: 1363
diff changeset
  5940
    "Modified: / 3.11.1997 / 15:14:00 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5941
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5942
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5943
setupForClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5944
    "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
  5945
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5946
    |vpanel hpanel frame v|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5947
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5948
    vpanel := VariableVerticalPanel 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
  5949
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5950
    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
  5951
    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
  5952
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5953
    self createTogglesIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5954
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5955
    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
  5956
    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
  5957
      extent:[frame width
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5958
              @
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5959
              (frame height 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5960
               - ViewSpacing
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5961
               - instanceToggle height
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5962
               - instanceToggle borderWidth
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5963
               + v borderWidth)].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5964
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  5965
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5966
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5967
    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
  5968
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5969
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5970
    self switchToClass:aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5971
    actualClass := acceptClass := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5972
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5973
    self updateMethodList.
151
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  5974
    self updateCodeView.
9ed80631f710 Show class definition when starting Class Browser.
Stefan Vogel <sv@exept.de>
parents: 149
diff changeset
  5975
    self classDefinition.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5976
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5977
    "Modified: / 25.10.1997 / 19:26:26 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5978
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  5979
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5980
setupForClass:aClass methodCategory:aMethodCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5981
    "setup subviews to browse a method category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5982
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5983
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5984
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5985
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5986
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5987
    v := self createMethodListViewIn:vpanel atX:0.0.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5988
    v corner:(1.0 @ 0.25).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5989
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5990
    self createCodeViewIn:vpanel.
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
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5993
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5994
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5995
    currentMethodCategory := aMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5996
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  5997
    self updateCodeView.
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  5998
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  5999
    "Modified: / 25.10.1997 / 19:26:35 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6000
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6001
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6002
setupForClass:aClass selector:selector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6003
    "setup subviews to browse a single method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6004
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6005
    |v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6006
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6007
    v := ScrollableView for:CodeView in:self.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6008
    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
  6009
    codeView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6010
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6011
    currentClassCategory := aClass category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6012
    self switchToClass:aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6013
    actualClass := acceptClass := aClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6014
    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
  6015
    currentMethod := actualClass compiledMethodAt:selector.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6016
    currentMethodCategory := currentMethod category.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6017
    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
  6018
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
  6019
    "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
  6020
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6021
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6022
setupForClassCategory:aClassCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6023
    "setup subviews to browse a class category"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6024
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6025
    |vpanel hpanel frame v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6026
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6027
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6028
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6029
    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
  6030
    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
  6031
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6032
    self createClassListViewIn:frame.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6033
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6034
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6035
    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
  6036
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6037
    methodCategoryListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6038
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6039
    self createMethodListViewIn:hpanel atX:0.66.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6040
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6041
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6042
    currentClassCategory := aClassCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6043
    self updateClassList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6044
    self updateMethodCategoryList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6045
    self updateMethodList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6046
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6047
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6048
    "Modified: / 25.10.1997 / 19:26:49 / cg"
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
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6051
setupForClassHierarchy:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6052
    "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
  6053
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6054
    |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
  6055
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6056
    vpanel := VariableVerticalPanel 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
  6057
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6058
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6059
     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
  6060
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6061
    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
  6062
    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
  6063
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6064
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6065
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6066
    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
  6067
    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
  6068
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6069
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6070
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6071
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6072
    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
  6073
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6074
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6075
    cls isMeta ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6076
        cls := cls soleInstance
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6077
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6078
    currentClassHierarchy := currentClass := actualClass := cls.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6079
    self updateClassList.
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  6080
    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
  6081
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6082
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6083
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6084
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6085
    aClass isMeta ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6086
        self instanceProtocol:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6087
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6088
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6089
    "Modified: / 25.10.1997 / 19:26:58 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6090
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6091
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6092
setupForClassList:aList
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6093
    "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
  6094
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6095
    self setupForClassList:aList sort:true
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6096
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6097
    "Modified: 28.5.1996 / 13:53:03 / cg"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6098
!
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6099
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6100
setupForClassList:aList sort:doSort
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6101
    "setup subviews to browse classes from a list"
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6102
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6103
    |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
  6104
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6105
    vpanel := VariableVerticalPanel 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
  6106
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6107
    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
  6108
    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
  6109
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6110
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6111
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6112
    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
  6113
    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
  6114
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6115
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6116
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6117
    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
  6118
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6119
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6120
    l := (aList collect:[:entry | 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6121
                entry isBehavior ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6122
                    entry name
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6123
                ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6124
                    entry
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6125
                ]]) asOrderedCollection.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6126
    doSort ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6127
        l sort.
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6128
    ].
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  6129
    classListView list:l.
905
f246868be4b1 dont update the classList, if it was given explicit
Claus Gittinger <cg@exept.de>
parents: 903
diff changeset
  6130
    gotClassList := true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6131
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6132
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6133
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6134
    self updateCodeView
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6135
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6136
    "Created: / 28.5.1996 / 13:52:47 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6137
    "Modified: / 25.10.1997 / 19:27:07 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6138
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6139
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6140
setupForFullClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6141
    "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
  6142
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6143
    |vpanel hpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6144
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6145
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6146
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6147
    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
  6148
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6149
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6150
    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
  6151
    classCategoryListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6152
    classCategoryListView contents:(self listOfAllClassCategories).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6153
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6154
    v := ScrollableView for:SelectionInListView in:hpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6155
    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
  6156
    classListView := v scrolledView.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6157
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6158
    self createCodeViewIn:vpanel.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6159
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6160
    fullClass := true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6161
    self updateCodeView
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6162
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6163
    "Modified: / 25.10.1997 / 19:27:18 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6164
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6165
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6166
setupForFullClassProtocol:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6167
    "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
  6168
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6169
    |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
  6170
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6171
    vpanel := VariableVerticalPanel 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
  6172
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6173
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6174
     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
  6175
    "
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6176
    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
  6177
    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
  6178
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6179
    self createClassListViewIn:frame.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6180
    classListView multipleSelectOk:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6181
    classListView toggleSelect:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6182
    classListView strikeOut:true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6183
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6184
    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
  6185
    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
  6186
    methodCategoryListView := v scrolledView.
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6187
    methodCategoryListView delegate:self.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6188
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6189
    self createMethodListViewIn:hpanel atX:0.66.
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  6190
    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
  6191
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6192
    cls := aClass.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6193
    cls isMeta ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6194
        cls := cls soleInstance
107
claus
parents: 106
diff changeset
  6195
    ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6196
    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
  6197
    fullProtocol := true.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6198
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6199
    self updateClassList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6200
    self updateMethodCategoryList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6201
    self updateMethodList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6202
    self updateCodeView.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6203
    self updateVariableList.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6204
    aClass isMeta ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6205
        self instanceProtocol:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6206
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6207
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6208
    "Modified: / 25.10.1997 / 19:27:27 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6209
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6210
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6211
setupForList:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6212
    "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
  6213
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6214
    |vpanel v|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6215
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6216
    vpanel := VariableVerticalPanel origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6217
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6218
    v := ScrollableView for:SelectionInListView in:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6219
    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
  6220
    classMethodListView := v scrolledView.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6221
    classMethodListView contents:aList.
474
9ba54a6241cb shortkeys also when browsing senders/implementors
Claus Gittinger <cg@exept.de>
parents: 466
diff changeset
  6222
    classMethodListView delegate:self.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6223
408
33b1b3dfdac4 show current revision (in compare); doubleClick-start in class/method browser
Claus Gittinger <cg@exept.de>
parents: 393
diff changeset
  6224
    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
  6225
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6226
    self createCodeViewIn:vpanel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6227
    aList size == 1 ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6228
        classMethodListView setSelection:1.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6229
        self classMethodSelection:1. 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6230
    ].
1060
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  6231
    self updateCodeView.
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  6232
    "/ kludge - get trap icons
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  6233
    self updateClassMethodListWithScroll:false keepSelection:true
a103c9534977 also show icons in initial class-method-list
Claus Gittinger <cg@exept.de>
parents: 1058
diff changeset
  6234
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6235
    "Modified: / 25.10.1997 / 19:27:40 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6236
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6237
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6238
!BrowserView methodsFor:'method category list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6239
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6240
createAccessMethodsFor:aCollectionOfInstVarNames
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6241
    "workhorse for creating access methods for instvars."
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6242
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6243
    aCollectionOfInstVarNames do:[:name |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6244
	|source|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6245
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6246
	"check, if method is not already present"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6247
	(currentClass includesSelector:(name asSymbol)) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6248
	    source := (name , '\    "return the value of the instance variable ''' , name , ''' (automatically generated)"\\    ^ ' , name) withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6249
	    Compiler compile:source forClass:currentClass inCategory:'accessing'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6250
	] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6251
	    Transcript showCR:'method ''', name , ''' already present'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6252
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6253
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6254
	(currentClass includesSelector:((name , ':') asSymbol)) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6255
	    source := (name , ':something\    "set the value of the instance variable ''' , name , ''' (automatically generated)"\\    ' , name , ' := something.') withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6256
	    Compiler compile:source forClass:currentClass inCategory:'accessing'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6257
	] ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6258
	    Transcript showCR:'method ''', name , ':'' already present'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6259
	].
990
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6260
    ]
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6261
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6262
    "Created: 24.1.1997 / 11:04:46 / cg"
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6263
!
e206a230a69e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  6264
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6265
methodCategoryCopyCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6266
    "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
  6267
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6268
    |title box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6269
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6270
    showInstance ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6271
	title := 'class to copy instance method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6272
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6273
	title := 'class to copy class method category from:'
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6274
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6275
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6276
    box := self listBoxTitle:title 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6277
		      okText:'ok' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6278
			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
  6279
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6280
    box label:(resources string:'copy methods').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6281
    box action:[:aString | self copyMethodsFromClass:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6282
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6283
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6284
    "Modified: 16.1.1997 / 00:01:20 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6285
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6286
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6287
methodCategoryCreateAccessMethods
559
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  6288
    "create access methods for instvars.
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  6289
     If no variable is selected, for all instvars;
432abfae606f commentary
Claus Gittinger <cg@exept.de>
parents: 557
diff changeset
  6290
     otherwise for that selected instvar."
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6291
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6292
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6293
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6294
    showInstance ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6295
	self warn:'select instance - and try again'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6296
	^ self.
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6297
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6298
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6299
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6300
	|nm names|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6301
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6302
	(variableListView notNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6303
	and:[(nm := variableListView selectionValue) notNil]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6304
	    names := Array with:nm
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6305
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6306
	    names := currentClass instVarNames 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6307
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6308
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6309
	lockUpdates := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6310
	[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6311
	    self createAccessMethodsFor:names.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6312
	] valueOnUnwindDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6313
	    lockUpdates := false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6314
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6315
	self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6316
	self updateMethodListWithScroll:false
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6317
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6318
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6319
    "Modified: 18.8.1997 / 15:44:10 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6320
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6321
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6322
methodCategoryCreateDocumentationMethods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6323
    "create empty documentation methods"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6324
1194
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  6325
    |cls histStream fn txt|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6326
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6327
    self checkClassSelected ifFalse:[^ self].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6328
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6329
    cls := currentClass class.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6330
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6331
    self withBusyCursorDo:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6332
        |nm names source|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6333
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6334
        "/ add version method containing RCS template
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6335
        "/ but only if not already present and its not a private class.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6336
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6337
        cls isPrivate ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6338
            (cls includesSelector:#version) ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6339
                Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6340
'version
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  6341
    ^ ''$' , 'Header$''
1208
5a2aa83494c3 dont create a #version method in private classes.
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
  6342
' 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6343
                      forClass:cls 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6344
                      inCategory:'documentation'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6345
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6346
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6347
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6348
        "/ add copyright method containing your/your companies
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6349
        "/ copyright template but only if not already present.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6350
        "/ this is only added, if specified in the 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6351
        "/ COPYRIGHT_TEMPLATE_FILE resources.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6352
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6353
        (cls includesSelector:#copyright) ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6354
            fn := resources at:#'COPYRIGHT_TEMPLATE_FILE' default:nil.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6355
            fn notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6356
                fn := fn asFilename.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6357
                fn exists ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6358
                    txt := fn contents asString
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6359
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6360
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6361
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6362
            txt notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6363
                txt := txt bindWith:(Date today year).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6364
                Compiler compile:
1194
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  6365
'copyright
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  6366
"
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  6367
' , txt , '
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  6368
"
7fbf9a4f4914 add copyright, if COPYRIGHT_TEMPLATE_FILE resource
Claus Gittinger <cg@exept.de>
parents: 1191
diff changeset
  6369
'                   forClass:cls 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6370
                  inCategory:'documentation'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6371
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6372
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6373
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6374
        "/ add documentation method containing doc template
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6375
        "/ but only if not already present.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6376
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6377
        (cls includesSelector:#documentation) ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6378
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6379
'documentation
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6380
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6381
    documentation to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6382
"
120
claus
parents: 118
diff changeset
  6383
'                   forClass:cls 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6384
                  inCategory:'documentation'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6385
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6386
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6387
        "/ add examples method containing examples template
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6388
        "/ but only if not already present.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6389
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6390
        (cls includesSelector:#examples) ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6391
            Compiler compile:
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6392
'examples
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6393
"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6394
    examples to be added.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6395
"
120
claus
parents: 118
diff changeset
  6396
'                   forClass:cls 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6397
                  inCategory:'documentation'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6398
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6399
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6400
        "/ add history method containing created-entry
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6401
        "/ but only if not already present.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6402
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6403
        (cls includesSelector:#history) ifFalse:[ 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6404
            HistoryManager notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6405
                HistoryManager createInitialHistoryMethodIn:cls
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6406
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6407
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6408
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6409
        self instanceProtocol:false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6410
        self switchToMethodNamed:#documentation 
1208
5a2aa83494c3 dont create a #version method in private classes.
Claus Gittinger <cg@exept.de>
parents: 1202
diff changeset
  6411
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6412
"/        self updateMethodCategoryListWithScroll:false.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6413
"/        self updateMethodListWithScroll:false
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6414
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6415
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6416
    "Modified: / 24.10.1997 / 02:42:38 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6417
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6418
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6419
methodCategoryFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6420
    "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
  6421
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6422
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6423
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6424
    self whenMethodCategorySelected:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6425
	self busyLabel:'saving: %1' with:currentClass name , '-' , currentMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6426
	Class fileOutErrorSignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6427
	    self warn:'cannot create: %1' with:ex parameter.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6428
	    ex return.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6429
	] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6430
	    actualClass fileOutCategory:currentMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6431
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6432
	self normalLabel.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6433
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6434
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6435
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6436
methodCategoryFileOutAll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6437
    "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
  6438
     the current class"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6439
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6440
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6441
    self whenMethodCategorySelected:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6442
        |fileName outStream|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6443
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6444
        fileName := (currentMethodCategory , '.st') asFilename.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6445
        fileName makeLegalFilename.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6446
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6447
         this test allows a smalltalk to be built without Projects/ChangeSets
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6448
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6449
        Project notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6450
            fileName := Project currentProjectDirectory asFilename construct: fileName name.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6451
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6452
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6453
         if file exists, save original in a .sav file
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6454
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6455
        fileName exists ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6456
            fileName copyTo:(fileName withSuffix: 'sav')
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6457
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6458
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6459
        fileName := fileName pathName.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6460
        outStream := FileStream newFileNamed:fileName.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6461
        outStream isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6462
            ^ self warn:'cannot create: %1' with:fileName
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6463
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6464
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6465
        self busyLabel:'saving: ' with:currentMethodCategory.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6466
        Class fileOutErrorSignal handle:[:ex |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6467
            self warn:'cannot create: %1' with:ex parameter.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6468
            ex return
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6469
        ] do:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6470
            Smalltalk allBehaviorsDo:[:class |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6471
                |hasMethodsInThisCategory|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6472
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6473
                hasMethodsInThisCategory := false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6474
                class methodDictionary do:[:method |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6475
                    method category = currentMethodCategory ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6476
                        hasMethodsInThisCategory := true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6477
                    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6478
                ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6479
                hasMethodsInThisCategory ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6480
                    class fileOutCategory:currentMethodCategory on:outStream.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6481
                    outStream cr
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6482
                ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6483
                hasMethodsInThisCategory := false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6484
                class class methodDictionary do:[:method |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6485
                    method category = currentMethodCategory ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6486
                        hasMethodsInThisCategory := true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6487
                    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6488
                ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6489
                hasMethodsInThisCategory ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6490
                    class class fileOutCategory:currentMethodCategory on:outStream.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6491
                    outStream cr
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6492
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6493
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6494
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6495
        outStream close.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6496
        self normalLabel.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6497
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6498
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6499
    "Modified: / 7.6.1996 / 09:03:56 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6500
    "Modified: / 28.10.1997 / 14:37:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6501
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6502
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6503
methodCategoryFindAnyMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6504
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6505
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6506
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6507
    box label:(resources string:'find method').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6508
    box action:[:aString | self switchToAnyMethodNamed:aString].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6509
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6510
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6511
    "Modified: 15.1.1997 / 23:59:53 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6512
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6513
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6514
methodCategoryFindMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6515
    |box|
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
    box := self enterBoxForSearchSelectorTitle:'method selector to search for:'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6518
    box label:(resources string:'find method').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6519
    box action:[:aString | self switchToMethodNamed:aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6520
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6521
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6522
    "Modified: 15.1.1997 / 23:59:27 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6523
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6524
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6525
methodCategoryMenu
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  6526
    <resource: #keyboard (#Cmdn)>
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6527
    <resource: #programMenu >
946
68f742bdbcd0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
  6528
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6529
    |labels selectors shorties i m varSel s|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6530
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6531
    currentClass isNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6532
        methodCategoryListView flash.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6533
        ^ nil
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6534
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6535
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6536
    labels := #().
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6537
    selectors := #().
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6538
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6539
    currentMethodCategory notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6540
        labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6541
                    'fileOut' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6542
                    'fileOut all' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6543
                    'printOut'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6544
                    '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6545
                    'SPAWN_METHODCATEGORY'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6546
                    'spawn category'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6547
                    '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6548
                  ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6549
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6550
        selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6551
                    methodCategoryFileOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6552
                    methodCategoryFileOutAll
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6553
                    methodCategoryPrintOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6554
                    nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6555
                    methodCategorySpawn
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6556
                    methodCategorySpawnCategory
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6557
                    nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6558
                   ).
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6559
    ].            
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6560
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6561
    labels := labels , #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6562
                'find method here ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6563
                'find method ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6564
                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6565
                'new category ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6566
                'copy category ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6567
               ).
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6568
    selectors := selectors , #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6569
                methodCategoryFindMethod
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6570
                methodCategoryFindAnyMethod
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6571
                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6572
                methodCategoryNewCategory
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6573
                methodCategoryCopyCategory
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6574
               ).
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6575
1237
eb435327405d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1236
diff changeset
  6576
    showInstance ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6577
        labels := labels , #( 'create access methods' ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6578
        selectors := selectors , #( #methodCategoryCreateDocumentationMethods ).
1237
eb435327405d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1236
diff changeset
  6579
    ] ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6580
        (variableListView notNil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6581
        and:[(varSel := variableListView selectionValue) notNil]) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6582
            s := 'create access methods (for ''%1'')' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6583
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6584
            s := 'create access methods (for all)' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6585
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6586
        s := resources string:s with:varSel.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6587
        labels := labels , (Array with:s).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6588
        selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6589
                    methodCategoryCreateAccessMethods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6590
                   ).
1237
eb435327405d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1236
diff changeset
  6591
    ].
1230
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6592
ebc7e14ceff1 show variable in 'create access method' menu item
Claus Gittinger <cg@exept.de>
parents: 1211
diff changeset
  6593
    currentMethodCategory notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6594
        labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6595
                    '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6596
                    'rename ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6597
                    'remove'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6598
                   ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6599
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6600
        selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6601
                    nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6602
                    methodCategoryRename
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6603
                    methodCategoryRemove
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6604
                   ).
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6605
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6606
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6607
    showInstance ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6608
        labels := labels copy.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6609
        selectors := selectors copy.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6610
        i := labels indexOf:'create access methods'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6611
        labels at:i put:'create documentation stubs'. 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6612
        selectors at:i put:#methodCategoryCreateDocumentationMethods
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6613
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6614
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6615
    shorties := Array new:(selectors size).
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6616
    (selectors includes:#methodCategoryNewCategory) ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6617
        shorties at:(selectors indexOf:#methodCategoryNewCategory) put:#Cmdn
813
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6618
    ].
a62df3d52e01 Alt-n (for new-xxx);
Claus Gittinger <cg@exept.de>
parents: 812
diff changeset
  6619
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6620
    m := PopUpMenu 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6621
        labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6622
        selectors:selectors
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6623
        accelerators:shorties.
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6624
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6625
    currentClass isLoaded ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6626
        m disableAll:#(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6627
                        methodCategoryNewCategory
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6628
                        methodCategoryCopyCategory
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6629
                        methodCategoryCreateAccessMethods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6630
                      )
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6631
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6632
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6633
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
  6634
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  6635
    "Modified: / 27.10.1997 / 20:46:04 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6636
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6637
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6638
methodCategoryNewCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6639
    "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
  6640
     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
  6641
     useless typing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6642
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6643
    |someCategories existingCategories box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6644
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6645
    actualClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6646
	someCategories := actualClass allCategories
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6647
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6648
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6649
	 mhmh - offer some typical categories ...
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6650
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6651
	showInstance ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6652
	    someCategories := #('accessing' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6653
				'initialization'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6654
				'private' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6655
				'printing & storing'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6656
				'queries'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6657
				'testing'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6658
			       )
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6659
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6660
	    someCategories := #(
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6661
				'documentation'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6662
				'initialization'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6663
				'instance creation'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6664
			       ).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6665
	].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6666
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6667
    someCategories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6668
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6669
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6670
     remove existing categories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6671
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6672
    existingCategories := methodCategoryListView list.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6673
    existingCategories notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6674
	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
  6675
    ].
838
9e981e2b8158 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 836
diff changeset
  6676
    someCategories := someCategories asSet asOrderedCollection sort.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6677
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6678
    box := self listBoxTitle:'name of new method category:'
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6679
		      okText:'create'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6680
			list:someCategories.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6681
    box label:(resources string:'create 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
  6682
    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
  6683
    box action:[:aString | self newMethodCategory:aString. lastCategory := aString].
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6684
    box showAtPointer
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6685
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6686
    "Modified: 15.1.1997 / 23:57:26 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6687
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6688
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6689
methodCategoryPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6690
    |printStream|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6691
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6692
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6693
    self whenMethodCategorySelected:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6694
	printStream := Printer new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6695
	actualClass printOutCategory:currentMethodCategory on:printStream.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6696
	printStream close
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6697
    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6698
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6699
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6700
methodCategoryRemove
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6701
    "show number of methods to remove and query user"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6702
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  6703
    |t box sels count answer|
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6704
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6705
    currentMethodCategory notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6706
	sels := OrderedCollection new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6707
	actualClass methodDictionary keysAndValuesDo:[:selector :aMethod |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6708
	    (aMethod category = currentMethodCategory) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6709
		sels add:selector
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6710
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6711
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6712
	count := sels size.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6713
	(count ~~ 0) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6714
	    (count == 1) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6715
		t := 'remove %1\(with 1 method) ?'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6716
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6717
		t := 'remove %1\(with %2 methods) ?'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6718
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6719
	    t := resources string:t with:currentMethodCategory with:count printString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6720
	    t := t withCRs.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6721
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6722
	    box := YesNoBox 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6723
		       title:t
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6724
		       yesText:(resources at:'remove')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6725
		       noText:(resources at:'abort').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6726
	    answer := box confirm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6727
	    box destroy.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6728
	    answer ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6729
		^ self.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6730
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6731
	    sels do:[:selector|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6732
		actualClass removeSelector:selector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6733
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6734
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6735
	currentMethodCategory := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6736
	currentMethod := currentSelector := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6737
	self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6738
	self updateMethodList
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6739
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6740
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6741
    "Modified: 7.6.1996 / 09:13:15 / stefan"
916
fcc0c3c945d4 destroy box after use
Claus Gittinger <cg@exept.de>
parents: 910
diff changeset
  6742
    "Modified: 7.1.1997 / 23:03:20 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6743
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6744
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6745
methodCategoryRename
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6746
    "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
  6747
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6748
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6749
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6750
    self checkMethodCategorySelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6751
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6752
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6753
		enterBoxTitle:(resources string:'rename method category %1 to:' with:currentMethodCategory)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6754
		okText:(resources at:'rename')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6755
		label:'rename category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6756
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6757
    box initialText:currentMethodCategory.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6758
    box action:[:aString | 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6759
	actualClass renameCategory:currentMethodCategory to:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6760
	currentMethodCategory := aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6761
	currentMethod := currentSelector := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6762
	self updateMethodCategoryList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6763
	self updateMethodListWithScroll:false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6764
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6765
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6766
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6767
    "Modified: 15.1.1997 / 23:10:44 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6768
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6769
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6770
methodCategorySpawn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6771
    "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
  6772
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6773
    currentMethodCategory notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6774
	self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6775
	    SystemBrowser browseClass:actualClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6776
		    methodCategory:currentMethodCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6777
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6778
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6779
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6780
    "Modified: 18.8.1997 / 15:44:18 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6781
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6782
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6783
methodCategorySpawnCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6784
    "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
  6785
     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
  6786
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6787
    self askAndBrowseMethodCategory:'category to browse methods:'
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6788
			     action:[:aString | 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6789
					SystemBrowser browseMethodCategory:aString
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6790
				    ]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6791
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
  6792
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6793
!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
  6794
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6795
checkMethodCategorySelected
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6796
    currentMethodCategory isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6797
	self warn:'select a method category first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6798
	^ false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6799
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6800
    ^ true
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6801
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6802
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6803
copyMethodsFromClass:aClassName
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6804
    |class box list|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6805
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6806
    currentClass notNil ifTrue:[
1384
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6807
        class := Smalltalk classNamed:aClassName.
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6808
        class isBehavior ifFalse:[
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6809
            self warn:'no class named %1' with:aClassName.
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6810
            ^ self
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6811
        ].
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6812
        class isLoaded ifFalse:[
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6813
            (self confirm:(class name , ' is an autoloaded class.\I can only copy categories if it is loaded first.\\Load the class now?') withCRs)
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6814
            ifTrue:[
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6815
                class autoload
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6816
            ]
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6817
        ].        
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6818
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6819
        showInstance ifFalse:[
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6820
            class := class class             
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6821
        ].
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6822
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6823
        "show enterbox for category to copy from"
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6824
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6825
        list := class categories asOrderedCollection sort.
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6826
        list addFirst:'*'.
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6827
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6828
        box := self 
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6829
                enterBoxTitle:'name of category to copy from (matchpattern allowed, * for all):'
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6830
                okText:'copy'
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6831
                label:(resources string:'copy methods from %1' with:aClassName)
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6832
                list:list.
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6833
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6834
        box open.
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6835
        box accepted ifTrue:[
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6836
            self 
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6837
                copyMethodsFromClass:class 
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6838
                category:(box aspectFor:#fieldValue) value
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6839
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6840
    ]
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  6841
1384
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6842
    "Modified: / 16.1.1997 / 20:15:51 / cg"
32b40f0c25ba Try to load class before copying a method category.
Stefan Vogel <sv@exept.de>
parents: 1382
diff changeset
  6843
    "Modified: / 19.12.1997 / 12:27:42 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6844
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6845
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6846
copyMethodsFromClass:class category:category
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6847
    currentClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6848
	Object abortSignal catch:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6849
	    class methodDictionary do:[:aMethod |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6850
		|source|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6851
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6852
		(category match:aMethod category) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6853
		    source := aMethod source.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6854
		    codeView contents:source.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6855
		    codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6856
		    actualClass compilerClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6857
			 compile:source 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6858
			 forClass:actualClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6859
			 inCategory:aMethod category
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6860
			 notifying:codeView.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6861
		    self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6862
		    self updateMethodListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6863
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6864
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6865
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6866
    ]
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6867
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6868
    "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
  6869
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6870
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6871
listOfAllMethodCategoriesInClass:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6872
    "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
  6873
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6874
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6875
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6876
    newList := Set new.
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6877
    aClass methodDictionary do:[:aMethod |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6878
	|cat|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6879
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6880
	cat := aMethod category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6881
	cat isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6882
	    cat := '* no category *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6883
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6884
	newList add:cat
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6885
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6886
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6887
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6888
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6889
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6890
    "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
  6891
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6892
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6893
listOfAllMethodCategoriesInFullProtocolHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6894
    "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
  6895
     and all of its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6896
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6897
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6898
    |newList|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6899
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6900
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6901
    self classesInFullProtocolHierarchy:aClass do:[:c |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6902
	|cat|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6903
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6904
	c methodDictionary do:[:aMethod |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6905
	    cat := aMethod category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6906
	    cat isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6907
		cat := '* no category *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6908
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6909
	    newList add:cat
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6910
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6911
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6912
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6913
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6914
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6915
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  6916
    "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
  6917
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6918
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6919
methodCategorySelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6920
    "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
  6921
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6922
    self switchToMethodCategory:(methodCategoryListView selectionValue string).
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6923
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
  6924
    "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
  6925
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6926
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6927
methodCategorySelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6928
    "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
  6929
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6930
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6931
	currentMethod := currentSelector := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6932
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6933
	self updateMethodList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6934
	self updateCodeView.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6935
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6936
	currentMethodCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6937
	    methodCategoryListView setSelectElement:currentMethodCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6938
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6939
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6940
	aspect isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6941
	    self setAcceptAndExplainActionsForMethod.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6942
	].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6943
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6944
"/ this is now done in
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6945
"/ #updateMethodList
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6946
"/
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6947
"/        (variableListView notNil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6948
"/        and:[variableListView hasSelection]) ifTrue:[
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6949
"/            self hilightMethodsInMethodCategoryList:false inMethodList:true.
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  6950
"/        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6951
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6952
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6953
    "Created: 23.11.1995 / 14:17:38 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  6954
    "Modified: 18.8.1997 / 15:44:16 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6955
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6956
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6957
newMethodCategory:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6958
    |categories|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6959
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6960
    currentClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6961
	^ 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
  6962
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6963
    categories := methodCategoryListView list.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6964
    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
  6965
    (categories includes:aString) ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6966
	categories add:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6967
	categories sort.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6968
	methodCategoryListView contents:categories
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6969
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6970
    currentMethodCategory := aString.
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6971
    aspect := nil.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  6972
    self methodCategorySelectionChanged
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6973
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  6974
    "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
  6975
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  6976
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6977
switchToMethodCategory:aCategory
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6978
    |oldSelector|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6979
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6980
    oldSelector := currentSelector.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6981
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6982
    aspect := nil.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6983
    (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
  6984
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6985
    currentMethodCategory := aCategory.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6986
    self methodCategorySelectionChanged.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6987
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6988
    "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
  6989
    methodListView list size == 1 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6990
	methodListView setSelection:1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6991
	self methodSelection:1
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6992
    ] ifFalse:[
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6993
      oldSelector notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6994
	  methodListView setSelectElement:oldSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6995
	  methodListView hasSelection ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6996
	      self methodSelection:methodListView selection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  6997
	  ]
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6998
      ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  6999
    ]
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7000
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7001
    "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
  7002
    "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
  7003
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7004
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7005
updateMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7006
    self updateMethodCategoryListWithScroll:true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7007
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7008
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7009
updateMethodCategoryListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7010
    |categories|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7011
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7012
    methodCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7013
	fullProtocol ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7014
	    currentClassHierarchy notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7015
		categories := self listOfAllMethodCategoriesInFullProtocolHierarchy:actualClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7016
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7017
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7018
	    currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7019
		categories := self listOfAllMethodCategoriesInClass:actualClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7020
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7021
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7022
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7023
	methodCategoryListView list = categories ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7024
	    scroll ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7025
		methodCategoryListView contents:categories
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7026
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7027
		methodCategoryListView setContents:categories
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7028
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7029
	    currentMethodCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7030
		methodCategoryListView setSelectElement:currentMethodCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7031
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7032
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7033
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
  7034
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  7035
    "Modified: 30.7.1997 / 15:53:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7036
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7037
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7038
whenMethodCategorySelected:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7039
    self checkMethodCategorySelected ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7040
	self withBusyCursorDo:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7041
    ]
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  7042
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  7043
    "Modified: 18.8.1997 / 15:44:38 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7044
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7045
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7046
!BrowserView methodsFor:'method list menu'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7047
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7048
commonTraceHelperWith:aSelector
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  7049
    "install a break/trace or countPoint for the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  7050
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7051
    "/ not for unbound methods (i.e. obsolete)
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7052
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7053
    currentMethod isNil ifTrue:[^ self].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7054
    currentMethod who isNil ifTrue:[
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7055
        self warn:'method is no longer valid'.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7056
        ^ self
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7057
    ].
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7058
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7059
    currentMethod perform:aSelector.
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7060
    currentMethod := currentClass compiledMethodAt:currentSelector.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7061
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  7062
    Class withoutUpdatingChangesDo:[
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7063
        currentClass changed:#methodTrap with:currentSelector.
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  7064
    ]
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  7065
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7066
    "Modified: / 12.1.1998 / 19:19:37 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7067
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7068
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7069
commonTraceHelperWith:aSelector with:argument
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7070
    "install a break/trace or countPoint for the current method"
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7071
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7072
    "/ not for unbound methods (i.e. obsolete)
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7073
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7074
    currentMethod isNil ifTrue:[^ self].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7075
    currentMethod who isNil ifTrue:[
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7076
        self warn:'method is no longer valid'.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7077
        ^ self
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7078
    ].
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7079
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7080
    currentMethod perform:aSelector with:argument.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7081
    currentMethod := currentClass compiledMethodAt:currentSelector.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7082
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  7083
    Class withoutUpdatingChangesDo:[
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7084
        currentClass changed:#methodTrap with:currentSelector.
925
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  7085
    ]
6d82de68d7c6 new changed notifications for tracing/trapping
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
  7086
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7087
    "Modified: / 12.1.1998 / 19:19:40 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7088
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7089
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7090
methodAproposSearch
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7091
    "launch an enterBox for a keyword search"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7092
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7093
    self askForSearchTitle:'keyword to search for (in selector & comment):' 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7094
		  openWith:#aproposSearch:in:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7095
		isSelector:true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7096
		searchArea:#class
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7097
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  7098
    "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
  7099
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7100
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7101
methodBreakPoint
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7102
    "set a breakpoint on the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7103
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7104
    self commonTraceHelperWith:#setBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7105
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7106
    "Modified: / 12.1.1998 / 19:14:30 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7107
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7108
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7109
methodBreakPointInProcess
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7110
    "set a breakpoint on the current method, which only triggers if
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7111
     executed by some particular process."
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7112
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  7113
    |processes processNames box windowGroups|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  7114
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  7115
    windowGroups := WindowGroup allInstances.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7116
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7117
    processes := ProcessorScheduler knownProcesses asOrderedCollection.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7118
    processes := processes select:[:aProcess |
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7119
                        aProcess notNil 
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7120
                        and:[aProcess id notNil]
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7121
                 ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7122
    processes := processes sort:[:a :b | a id < b id].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7123
    processNames := processes collect:[:aProcess |
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7124
                        |pName theGroup top topLabel winLabel|
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7125
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7126
                        pName := aProcess nameOrId.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7127
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7128
                        "/ if its a windowGroup process,
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7129
                        "/ fetch its first topViews name and add.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7130
                        "/ (allows selecting among multiple browsers ...)
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7131
                        winLabel := ''.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7132
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7133
                        theGroup := windowGroups select:[:g | g process == aProcess].
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7134
                        theGroup size == 1 ifTrue:[
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7135
                            theGroup := theGroup first.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7136
                            top := theGroup topViews.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7137
                            top size > 0 ifTrue:[
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7138
                                top := top first.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7139
                                topLabel := top label.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7140
                                topLabel ~= pName ifTrue:[
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7141
                                     winLabel := '  "' , topLabel , '")'.
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7142
                                ]
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7143
                            ].                        
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7144
                        ].
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7145
                        aProcess id printString , ' [' , pName , ']' , winLabel
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7146
                    ].
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7147
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7148
    "/ let user specify which one ...
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7149
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7150
    box := ListSelectionBox new.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7151
    box noEnterField.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7152
    box list:processNames.
1233
c5aac7105c4e more messages improved
Claus Gittinger <cg@exept.de>
parents: 1232
diff changeset
  7153
    box label:(resources string:'process selection').
c5aac7105c4e more messages improved
Claus Gittinger <cg@exept.de>
parents: 1232
diff changeset
  7154
    box title:(resources 
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7155
                string:'stop if method is executed by process:\\(current process is %1)'
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7156
                with:(Processor activeProcess id)
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7157
                with:(Processor activeProcess nameOrId)) withCRs.
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7158
    box action:[:selection |
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7159
        self commonTraceHelperWith:#breakPointInProcess: 
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7160
                              with:(processes at:box selectionIndex)
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7161
    ].
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7162
    box showAtPointer.
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7163
    box destroy
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7164
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  7165
    "Created: / 14.10.1996 / 15:40:53 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7166
    "Modified: / 12.1.1998 / 19:14:37 / cg"
756
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7167
!
357db0b88e1b selective breakpoints
Claus Gittinger <cg@exept.de>
parents: 753
diff changeset
  7168
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7169
methodChangeCategory
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7170
    "move the current method into another category -
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7171
     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
  7172
     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
  7173
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7174
    |box txt|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7175
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7176
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7177
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7178
    actualClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7179
	box := self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7180
		enterBoxTitle:'' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7181
		okText:'change'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7182
		label:'change category'.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7183
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7184
	|someCategories|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7185
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7186
	someCategories := actualClass categories sort.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7187
	box := self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7188
		listBoxTitle:'' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7189
		okText:'change' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7190
		list:someCategories.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7191
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7192
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7193
    box title:(resources string:'change category from ''%1'' to:' with:currentMethod category).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7194
    lastMethodCategory isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7195
	txt := currentMethod category.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7196
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7197
	txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7198
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7199
    box initialText:txt.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7200
    box action:[:aString |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7201
		    |method|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7202
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7203
		    lastMethodCategory := aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7204
		    method := currentMethod.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7205
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7206
		    method category:aString asSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7207
		    actualClass changed:#organization with:currentSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7208
		    method changed:#category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7209
		    actualClass addChangeRecordForMethodCategory:method category:aString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7210
		    self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7211
		    self updateMethodListWithScroll:false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7212
	       ].
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7213
    box label:(resources string:'change category').
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7214
    box showAtPointer
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7215
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7216
    "Created: 29.10.1995 / 19:59:22 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  7217
    "Modified: 16.1.1997 / 00:16:29 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7218
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7219
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7220
methodCompareWithPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7221
    "compare with previous version"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7222
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7223
    |prev v|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7224
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7225
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7226
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7227
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7228
    prev isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7229
	self warn:'oops - previous version is gone'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7230
	^ self
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7231
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7232
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7233
    v := DiffTextView 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7234
	openOn:codeView contents
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7235
	label:(resources string:'code here')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7236
	and:prev source
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7237
	label:'previous version'.      
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7238
    v label:'comparing ' , currentMethod whoString.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7239
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7240
    "Modified: 7.11.1996 / 18:53:55 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7241
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7242
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7243
methodDecompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7244
    "decompile the current methods bytecodes.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7245
     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
  7246
     avaliable with the system."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7247
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7248
    |s|
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7249
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7250
    self checkMethodSelected ifFalse:[^ self].
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7251
    self checkSelectionChangeAllowed ifFalse:[^ self].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7252
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7253
    s := '' writeStream.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7254
    (currentMethod decompileTo:s) ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7255
	self warn:'No decompiler available'.
481
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7256
    ].
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7257
    codeView contents:s contents.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7258
    codeView modified:false.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7259
    codeView acceptAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7260
    codeView explainAction:nil.
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7261
7a550399e2aa moved decompilation into codeObject (alien code); decompile into codeView
Claus Gittinger <cg@exept.de>
parents: 480
diff changeset
  7262
    "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
  7263
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7264
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7265
methodFileOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7266
    "file out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7267
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7268
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7269
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7270
    self busyLabel:'saving:' with:currentSelector.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7271
    Class fileOutErrorSignal handle:[:ex |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7272
	self warn:'cannot create: %1' with:ex parameter.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7273
	ex return
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7274
    ] do:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7275
	actualClass fileOutMethod:currentMethod.
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
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7278
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7279
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7280
methodGlobalReferends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7281
    "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
  7282
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7283
    self askForSearchTitle:'global variable to search users of:' 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7284
		  openWith:#browseReferendsOf:in:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7285
		isSelector:false
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7286
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7287
"/    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
  7288
"/                         action:[:aString | 
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7289
"/                                    SystemBrowser browseReferendsOf:aString asSymbol
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7290
"/                                ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7291
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7292
    "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
  7293
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7294
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7295
methodImplementors
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7296
    "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
  7297
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7298
    self askForSearchTitle:'selector to browse implementors of:' 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7299
		  openWith:#browseImplementorsOf:in:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7300
		isSelector:true
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7301
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7302
    "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
  7303
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7304
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7305
methodInspect
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7306
    "inspect  the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7307
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7308
    self checkMethodSelected ifFalse:[^ self].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7309
    currentMethod inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7310
"/    (actualClass compiledMethodAt:currentSelector) inspect.
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7311
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  7312
    "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
  7313
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7314
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7315
methodInvoke
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7316
    "invoke the current method"
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7317
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7318
    |w cls sel|
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7319
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7320
    self checkMethodSelected ifFalse:[^ self].
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7321
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7322
    w := currentMethod who.
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7323
    w notNil ifTrue:[
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7324
        cls := w methodClass.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7325
        cls notNil ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7326
            cls ~~ actualClass ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7327
                ^ self warn:'oops - obsolete class; please reselect class ...'
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7328
            ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7329
            cls isMeta ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7330
                cls := cls soleInstance
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7331
            ] ifFalse:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7332
                cls := nil
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7333
            ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7334
            cls notNil ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7335
                sel := w methodSelector.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7336
                sel notNil ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7337
                    currentClass perform:sel.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7338
                    ^ self
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7339
                ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7340
            ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7341
        ].
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7342
    ]. 
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7343
    self warn:'cannot invoke method (no class)'
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7344
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7345
    "Modified: / 29.4.1997 / 11:24:30 / dq"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  7346
    "Modified: / 29.10.1997 / 15:50:28 / cg"
1169
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7347
!
3d0ca3b8270a added #invokeMethod
Claus Gittinger <cg@exept.de>
parents: 1164
diff changeset
  7348
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7349
methodLocalSuperSends
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7350
    "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
  7351
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7352
    self checkClassSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7353
    self withSearchCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7354
	SystemBrowser browseSuperCallsUnder:currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7355
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7356
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7357
    "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
  7358
    "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
  7359
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7360
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
  7361
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
  7362
    "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
  7363
     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
  7364
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
  7365
    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
  7366
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
  7367
    "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
  7368
!
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
  7369
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7370
methodMakePrivate
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7371
    "make the current method private.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7372
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7373
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7374
    self methodPrivacy:#private 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7375
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7376
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7377
methodMakeProtected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7378
    "make the current method protected.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7379
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7380
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7381
    self methodPrivacy:#protected 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7382
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7383
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7384
methodMakePublic
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7385
    "make the current method public.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7386
     EXPERIMENTAL"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7387
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7388
    self methodPrivacy:#public 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7389
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7390
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7391
methodMenu
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7392
    "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
  7393
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7394
    <resource: #keyboard ( #Cmds #Cmdi #Cmdg #Cmdt #Cmda) >
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7395
    <resource: #programMenu >
432
a6c771534efa oops - dont use $ Header in createDocuStubs - rcs expands it
Claus Gittinger <cg@exept.de>
parents: 431
diff changeset
  7396
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7397
    |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
  7398
     newLabels newSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7399
     mthdLabels mthdSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7400
     brkLabels brkSelectors
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7401
     fileLabels fileSelectors
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7402
     searchLabels searchSelectors searchShorties
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7403
     sepLocalLabels sepLocalSelectors
1362
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7404
     sepMthdLabels sepMthdSelectors
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7405
     localSearchLabels localSearchSelectors|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7406
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7407
    currentMethod notNil ifTrue:[
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7408
        currentMethod isCountingMemoryUsage ifTrue:[
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7409
            brkLabels := #(
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7410
                                '-'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7411
                                'stop mem usage' 
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7412
                          ).
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7413
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7414
            brkSelectors := #(
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7415
                                nil
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7416
                                methodStopMemoryUsage
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7417
                             )
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7418
        ] ifFalse:[
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7419
            currentMethod isCounting ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7420
                brkLabels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7421
                                    '-'
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7422
                                    'stop counting' 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7423
                              ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7424
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7425
                brkSelectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7426
                                    nil
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7427
                                    methodStopCounting
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7428
                                 )
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7429
            ] ifFalse:[
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7430
                currentMethod isTimed ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7431
                    brkLabels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7432
                                        '-'
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7433
                                        'stop timing' 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7434
                                  ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7435
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7436
                    brkSelectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7437
                                        nil
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7438
                                        methodStopTiming
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7439
                                     )
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7440
                ] ifFalse:[
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7441
                    currentMethod isTraced ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7442
                        brkLabels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7443
                                            '-'
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7444
                                            'remove trace' 
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7445
                                      ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7446
                        brkSelectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7447
                                            nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7448
                                            methodRemoveBreakOrTrace
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7449
                                         )
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7450
                    ] ifFalse:[
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7451
                        currentMethod isBreakpointed ifTrue:[
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7452
                            brkLabels := #(
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7453
                                                '-'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7454
                                                'remove breakpoint' 
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7455
                                          ).
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7456
                            brkSelectors := #(
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7457
                                                nil
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7458
                                                methodRemoveBreakOrTrace
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7459
                                             )
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7460
                        ] ifFalse:[
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7461
                            brkLabels := #(
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7462
                                                '-'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7463
                                                'breakpoint' 
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7464
                                                'breakpoint in ...' 
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7465
                                                '-'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7466
                                                'trace' 
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7467
                                                'trace sender' 
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7468
                                                'trace full walkback' 
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7469
                                                '-'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7470
                                                'start timing'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7471
                                                'start counting'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7472
                                                'start mem usage'
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7473
                                          ).
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7474
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7475
                            brkSelectors := #(
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7476
                                                nil
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7477
                                                methodBreakPoint
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7478
                                                methodBreakPointInProcess
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7479
                                                nil
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7480
                                                methodTrace
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7481
                                                methodTraceSender
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7482
                                                methodTraceFull
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7483
                                                nil
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7484
                                                methodStartTiming
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7485
                                                methodStartCounting
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7486
                                                methodStartMemoryUsage
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7487
                                             )
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7488
                        ]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7489
                    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7490
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7491
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7492
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7493
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7494
        Method methodPrivacySupported ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7495
            labels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7496
                            'inspect method'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7497
                            'compile to machine code'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7498
                            'decompile'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7499
                            '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7500
                            'make public'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7501
                            'make private'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7502
                            'make protected'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7503
                            'make ignored'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7504
                       ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7505
            selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7506
                            methodInspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7507
                            methodSTCCompile
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7508
                            methodDecompile
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7509
                            nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7510
                            methodMakePublic
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7511
                            methodMakePrivate
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7512
                            methodMakeProtected
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7513
                            methodMakeIgnored
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7514
                          )
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7515
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7516
            labels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7517
                            'inspect method'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7518
                            'compile to machine code'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7519
                            'decompile'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7520
                       ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7521
            selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7522
                            methodInspect
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7523
                            methodSTCCompile
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7524
                            methodDecompile
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7525
                          )
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7526
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7527
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7528
        actualClass isMeta ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7529
            labels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7530
                          'invoke method'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7531
                          '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7532
                      )
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7533
                      , labels.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7534
            selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7535
                          methodInvoke
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7536
                          nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7537
                         )
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7538
                      , selectors.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7539
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7540
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7541
        labels := labels , brkLabels.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7542
        selectors := selectors , brkSelectors.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7543
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7544
        specialMenu := PopUpMenu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7545
                            labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7546
                            selectors:selectors.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7547
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7548
        currentMethod isPublic ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7549
            specialMenu disable:#methodMakePublic
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7550
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7551
        currentMethod isPrivate ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7552
            specialMenu disable:#methodMakePrivate
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7553
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7554
        currentMethod isProtected ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7555
            specialMenu disable:#methodMakeProtected
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7556
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7557
        currentMethod isIgnored ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7558
            specialMenu disable:#methodMakeIgnored
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7559
        ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7560
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7561
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7562
    device ctrlDown ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7563
        currentMethod isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7564
            methodListView flash.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7565
            ^ nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7566
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7567
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7568
        ^ specialMenu
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7569
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7570
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7571
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7572
    sepLocalLabels := sepLocalSelectors := #().
1362
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7573
    sepMthdLabels := sepMthdSelectors := #().
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7574
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7575
    searchLabels := #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7576
                                'senders ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7577
                                'implementors ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7578
                                'globals ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7579
                                'string search ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7580
                                'apropos ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7581
                    ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7582
    searchSelectors := #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7583
                                methodSenders
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7584
                                methodImplementors
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7585
                                methodGlobalReferends
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7586
                                methodStringSearch
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7587
                                methodAproposSearch
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7588
                        ).
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7589
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7590
    searchShorties := #(
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7591
                                Cmds
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7592
                                Cmdi
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7593
                                Cmdg
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7594
                                Cmdt
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7595
                                Cmda
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7596
                       ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7597
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7598
"/    currentClass notNil ifTrue:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7599
"/        localSearchLabels := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7600
"/                                '-'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7601
"/                                'local senders ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7602
"/                                'local implementors ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7603
"/                                'local super sends ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7604
"/                                'local string search ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7605
"/                                'local apropos ...'
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7606
"/                            ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7607
"/        localSearchSelectors := #(
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7608
"/                                nil
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7609
"/                                methodLocalSenders
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7610
"/                                methodLocalImplementors
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7611
"/                                methodLocalSuperSends
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7612
"/                                methodLocalStringSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7613
"/                                methodLocalAproposSearch
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7614
"/                              ).
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7615
"/    ] ifFalse:[
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7616
"/        localSearchLabels := localSearchSelectors := #()
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7617
"/    ].
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7618
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7619
    currentMethodCategory notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7620
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7621
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7622
        (currentClass notNil 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7623
        and:[showInstance not
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7624
        and:[currentClass isSubclassOf:ApplicationModel]]) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7625
            newLabels :=           #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7626
                                    'new method' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7627
                                    'new window spec' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7628
                                    'new menu spec' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7629
                                    ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7630
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7631
            newSelectors :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7632
                                    methodNewMethod
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7633
                                    methodNewWindowSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7634
                                    methodNewMenuSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7635
                                 ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7636
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7637
            newLabels :=           #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7638
                                    'new method' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7639
                                    ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7640
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7641
            newSelectors :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7642
                                    methodNewMethod
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7643
                                 ).
1362
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7644
        ].
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7645
        sepMthdLabels := #('-'). sepMthdSelectors := #(nil).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7646
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7647
        newLabels := newSelectors := #()
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7648
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7649
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7650
    currentMethod notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7651
        fileLabels :=           #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7652
                                'fileOut'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7653
                                'printOut'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7654
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7655
                                'SPAWN_METHOD'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7656
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7657
                                ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7658
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7659
        fileSelectors :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7660
                                methodFileOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7661
                                methodPrintOut
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7662
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7663
                                methodSpawn
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7664
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7665
                             ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7666
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7667
        sepLocalLabels := #('-'). sepLocalSelectors := #(nil).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7668
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7669
        mthdLabels :=           #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7670
                                'change category ...' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7671
                                'move ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7672
                                'remove'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7673
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7674
                                'compare with previous'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7675
                                'back to previous'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7676
                                ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7677
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7678
        mthdSelectors :=    #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7679
                                methodChangeCategory
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7680
                                methodMove
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7681
                                methodRemove
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7682
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7683
                                methodCompareWithPreviousVersion
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7684
                                methodPreviousVersion
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7685
                             ).
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7686
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7687
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7688
        fileLabels := fileSelectors := #().
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7689
        mthdLabels := mthdSelectors := #().
1362
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7690
        sepMthdLabels := sepMthdSelectors := #().
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7691
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7692
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7693
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7694
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7695
    labels :=
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7696
                fileLabels ,
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7697
                searchLabels ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7698
"/                localSearchLabels ,
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7699
                sepLocalLabels ,
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7700
                newLabels ,
1362
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7701
                sepMthdLabels ,
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7702
                mthdLabels.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7703
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7704
    selectors :=
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7705
                fileSelectors ,
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7706
                searchSelectors ,
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  7707
"/                localSearchSelectors ,
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7708
                sepLocalSelectors ,
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7709
                newSelectors ,
1362
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7710
                sepMthdSelectors ,
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7711
                mthdSelectors .
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7712
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7713
    shorties := (Array new:(fileSelectors size))
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7714
                , searchShorties
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7715
                , (Array new:(localSearchSelectors size
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7716
                              + sepLocalSelectors size
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7717
                              + newSelectors size
1362
df021eafd510 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1360
diff changeset
  7718
                              + sepMthdSelectors size
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7719
                              + mthdSelectors size)).
422
23db16b448fd added shortKey info to menus
Claus Gittinger <cg@exept.de>
parents: 408
diff changeset
  7720
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7721
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7722
    specialMenu notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7723
        labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7724
                        '='
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7725
                        'others'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7726
                  ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7727
        selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7728
                        nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7729
                        #otherMenu
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7730
                  ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7731
        shorties := shorties , #( nil #'Ctrl')
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7732
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7733
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7734
    m := PopUpMenu
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7735
         labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7736
         selectors:selectors
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7737
         accelerators:shorties.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7738
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7739
    specialMenu notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7740
        m subMenuAt:#otherMenu put:specialMenu.
320
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7741
    ].
5a9b407ce09d specialmenus reachable via others entry
Claus Gittinger <cg@exept.de>
parents: 312
diff changeset
  7742
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7743
    currentMethod notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7744
        currentMethod isPrivate ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7745
            m disable:#methodMakePrivate
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7746
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7747
        currentMethod isProtected ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7748
            m disable:#methodMakeProtected
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7749
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7750
        currentMethod isPublic ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7751
            m disable:#methodMakePublic
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7752
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7753
        currentMethod isIgnored ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7754
            m disable:#methodMakeIgnored
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7755
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7756
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7757
        (currentMethod code notNil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7758
        or:[Compiler canCreateMachineCode not]) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7759
            m disable:#methodSTCCompile
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7760
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7761
        currentMethod byteCode isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7762
            m disable:#methodDecompile
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7763
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7764
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7765
        currentMethod previousVersion isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7766
            m disable:#methodPreviousVersion.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7767
            m disable:#methodCompareWithPreviousVersion
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7768
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7769
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7770
    ^ m
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7771
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7772
    "Created: / 23.11.1995 / 12:02:29 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7773
    "Modified: / 18.12.1995 / 16:20:07 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7774
    "Modified: / 29.4.1997 / 11:20:59 / dq"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  7775
    "Modified: / 12.1.1998 / 19:13:11 / cg"
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7776
!
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7777
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7778
methodMove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7779
    "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
  7780
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7781
    |newClass newClassName sup initial movedMethod list holders|
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7782
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7783
    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
  7784
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7785
    lastMethodMoveClass ~= currentClass name ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7786
	initial := lastMethodMoveClass.
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7787
    ].
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7788
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7789
    initial isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7790
	(sup := currentClass superclass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7791
	    initial := sup name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7792
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7793
	    initial := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7794
	].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7795
    ].
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7796
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7797
"/ preps to use windowSpecs ...
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7798
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7799
"/    list := (currentClass allSuperclasses collect:[:cls | cls name]).
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7800
"/    list := list , (currentClass allSubclasses collect:[:cls | cls name]).
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7801
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7802
"/    holders := IdentityDictionary new.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7803
"/    holders at:#className put:initial asValue.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7804
"/    holders at:#classList put:list.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7805
"/
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7806
"/    (SystemBrowser 
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7807
"/        openDialogInterface:#methodMoveDialogSpec
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7808
"/        withBindings:holders) ifTrue:[
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7809
"/        newClassName := (holders at:#className) value.
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7810
"/    ].
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7811
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7812
    newClassName := Dialog 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7813
		    request:(resources string:'move current method to which class:')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7814
		    initialAnswer:initial
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7815
		    okLabel:(resources string:'move')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7816
		    title:(resources string:'move method')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7817
		    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
  7818
    newClassName isNil ifTrue:[^ self].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7819
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7820
    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
  7821
    newClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7822
	self warn:'no such class'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7823
	^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7824
    ].
832
2ddf9308bb2f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 826
diff changeset
  7825
    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
  7826
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7827
    showInstance ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7828
	newClass isMeta ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7829
	    newClass := newClass class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7830
	]
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7831
    ].
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  7832
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  7833
    movedMethod := newClass 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7834
			compile:(currentMethod source) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7835
			classified:currentMethodCategory.
978
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  7836
007c5b8c75b5 oops - care for compilation error when moving methods was
Claus Gittinger <cg@exept.de>
parents: 971
diff changeset
  7837
    (movedMethod isNil or:[movedMethod == #Error]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7838
	self warn:'not moved - compilation failed due to a compilation error'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7839
	^ self
284
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7840
    ].
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7841
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7842
    self methodRemove
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7843
def16ab8c75f new 'move-method' function (in methodMenu); new 'show history' function (in classCategoryMenu)
Claus Gittinger <cg@exept.de>
parents: 283
diff changeset
  7844
    "Created: 13.12.1995 / 10:56:42 / cg"
1202
190ff2307ea4 preps to use UISpec.
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
  7845
    "Modified: 25.6.1997 / 13:58:56 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7846
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7847
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7848
methodNewMenuSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7849
    "open a MenuEditor"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7850
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7851
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7852
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7853
    currentClass isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7854
        ^ self warn:'select/create a class first'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7855
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7856
    currentMethodCategory isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7857
        ^ self warn:'select/create a method category first'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7858
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7859
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7860
    (actualClass implements:#menuSpec) ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7861
        specSel := #menuSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7862
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7863
    MenuEditor openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7864
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7865
    "Created: / 28.10.1997 / 12:42:00 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7866
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7867
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7868
methodNewMethod
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7869
    "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
  7870
     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
  7871
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7872
    currentClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7873
	^ 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
  7874
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7875
    currentMethodCategory isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7876
	^ 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
  7877
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7878
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7879
    currentMethod := currentSelector := nil.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7880
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7881
    methodListView setSelection:nil.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7882
    codeView contents:(self methodTemplate).
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7883
    codeView modified:false.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7884
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7885
    self setAcceptAndExplainActionsForMethod.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  7886
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  7887
    "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
  7888
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7889
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7890
methodNewWindowSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7891
    "open GUI Painter"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7892
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7893
    |specSel|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7894
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7895
    currentClass isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7896
        ^ self warn:'select/create a class first'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7897
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7898
    currentMethodCategory isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7899
        ^ self warn:'select/create a method category first'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7900
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7901
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7902
    (actualClass implements:#windowSpec) ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7903
        specSel := #windowSpec
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7904
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7905
    UIPainter openOnClass:currentClass andSelector:specSel
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7906
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7907
    "Modified: / 28.10.1997 / 12:40:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7908
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  7909
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7910
methodPreviousVersion
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7911
    "switch back to the previous version
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7912
     (undo last change)"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7913
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7914
    |cls sel prev|
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7915
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7916
    self checkMethodSelected ifFalse:[^ self].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7917
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7918
    prev := currentMethod previousVersion.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7919
    prev isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7920
	self warn:'oops - previous version is gone'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7921
	^ self
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7922
    ].
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7923
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7924
    cls := currentMethod containingClass.
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7925
    cls notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7926
	sel := actualClass selectorAtMethod:currentMethod.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7927
	sel isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7928
	    self warn:'oops - cannot find methods selector (gone)'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7929
	] ifFalse:[        
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7930
	    cls basicAddSelector:sel withMethod:prev.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7931
	    currentMethod := prev.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7932
	    self updateCodeView
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7933
	].
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7934
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7935
	self warn:'oops - cannot find containing class'
842
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7936
    ]
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7937
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7938
    "Modified: 7.11.1996 / 18:51:09 / cg"
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7939
!
229453c636b4 access to history of changed methods
Claus Gittinger <cg@exept.de>
parents: 841
diff changeset
  7940
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7941
methodPrintOut
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7942
    "print out the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7943
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7944
    |printStream|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7945
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7946
    self checkMethodSelected ifFalse:[^ self].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7947
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7948
    printStream := Printer new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7949
    actualClass printOutSource:(currentMethod source) on:printStream.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7950
    printStream close
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7951
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7952
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7953
methodPrivacy:how
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7954
    "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
  7955
     EXPERIMENTAL"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7956
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7957
    |cls|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  7958
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7959
    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
  7960
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7961
    (how == currentMethod privacy) ifFalse:[
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7962
        currentMethod privacy:how.
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7963
        cls := currentMethod containingClass.
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7964
        cls notNil ifTrue:[
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7965
            cls addChangeRecordForMethodPrivacy:currentMethod.
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7966
        ] ifFalse:[
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7967
            self warn:'cannot write change record (no class)'
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7968
        ].
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7969
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7970
        Class withoutUpdatingChangesDo:[
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7971
            currentClass changed:#methodPrivacy with:currentSelector.
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7972
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7973
    ]
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7974
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7975
    "Created: / 29.10.1995 / 20:00:00 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7976
    "Modified: / 8.1.1997 / 22:37:02 / cg"
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
  7977
    "Modified: / 23.1.1998 / 17:56:02 / stefan"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7978
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7979
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7980
methodRemove
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  7981
    "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
  7982
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  7983
    |cls sel w|
610
26f0bebb40c0 show privacy in fullprotocol as well
Claus Gittinger <cg@exept.de>
parents: 609
diff changeset
  7984
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  7985
    self checkMethodSelected ifFalse:[^ self].
826
cdbbf4eb1afb use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  7986
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  7987
    w := currentMethod who.
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  7988
    w notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7989
	cls := w methodClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7990
	sel := w methodSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7991
	cls notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7992
	    cls ~~ actualClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7993
		^ self warn:'oops - obsolete class; please reselect class ...'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7994
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7995
	    sel notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7996
		actualClass removeSelector:sel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7997
		currentMethod := currentSelector := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7998
		self updateMethodListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  7999
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8000
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8001
	].
1054
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  8002
    ]. 
ecaae0ab1185 removeMethod in obsolete class - show warning
ca
parents: 1050
diff changeset
  8003
    self warn:'cannot remove method (no class)'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8004
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8005
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8006
methodRemoveBreakOrTrace
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8007
    "turn off tracing of the current method"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8008
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8009
    self commonTraceHelperWith:#clearBreakPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8010
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8011
    "Modified: / 12.1.1998 / 19:15:32 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8012
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8013
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8014
methodSTCCompile
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8015
    "compile the current method to machine code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8016
     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
  8017
     the demo version."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8018
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8019
    |prev|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8020
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8021
    self checkMethodSelected ifFalse:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8022
    prev := Compiler stcCompilation:#always.
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8023
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8024
	[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8025
	    codeView accept.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8026
	] valueNowOrOnUnwindDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8027
	    Compiler stcCompilation:prev
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8028
	]
1183
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
  8029
    ].
5c5ddf5dcac1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1171
diff changeset
  8030
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8031
    "Modified: 18.8.1997 / 15:44:22 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8032
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8033
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8034
methodSenders
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8035
    "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
  8036
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8037
    self askForSearchTitle:'selector to browse senders of:' 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8038
		  openWith:#browseAllCallsOn:in:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8039
		isSelector:true
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8040
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  8041
    "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
  8042
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8043
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8044
methodSpawn
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8045
    "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
  8046
     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
  8047
     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
  8048
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8049
    |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
  8050
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8051
    classMethodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8052
	s := classMethodListView selectionValue string.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8053
	clsName := self classNameFromClassMethodString:s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8054
	sel := self selectorFromClassMethodString:s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8055
	isMeta := false
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8056
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8057
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8058
    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8059
	clsName := c.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8060
	sel := s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8061
	isMeta := m
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8062
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8063
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8064
    (sel notNil and:[clsName notNil]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8065
	(clsName knownAsSymbol and:[sel knownAsSymbol]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8066
	    clsSymbol := clsName asSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8067
	    (Smalltalk includesKey:clsSymbol) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8068
		cls := Smalltalk at:clsSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8069
		isMeta ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8070
		    cls := cls class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8071
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8072
		cls isBehavior ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8073
		    cls := cls class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8074
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8075
		cls isBehavior ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8076
		    selSymbol := sel asSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8077
		    self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8078
			(cls includesSelector:selSymbol) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8079
			    cls := cls class.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8080
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8081
			(cls includesSelector:selSymbol) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8082
			    SystemBrowser browseClass:cls selector:selSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8083
			    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8084
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8085
			w := ' does not implement #' , sel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8086
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8087
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8088
		    w := ' is not a class'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8089
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8090
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8091
		w := ' is unknown'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8092
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8093
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8094
	    w := ' and/or ' , sel , ' are unknown'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8095
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8096
	self warn:(clsName , w).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8097
	^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8098
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8099
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8100
    self checkMethodSelected ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8101
	self warn:'select a method first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8102
	^ self
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8103
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8104
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8105
    self withBusyCursorDo:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8106
	w := currentMethod who.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8107
	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
  8108
    ]
363
709901a36b48 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
  8109
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8110
    "Modified: 18.8.1997 / 15:46:10 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8111
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8112
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8113
methodStartCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8114
    "set a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8115
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8116
    self commonTraceHelperWith:#startCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8117
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8118
    "Created: / 15.12.1995 / 11:00:44 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8119
    "Modified: / 12.1.1998 / 19:15:40 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8120
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8121
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8122
methodStartMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8123
    "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
  8124
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8125
    self commonTraceHelperWith:#startCountingMemoryUsage
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8126
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8127
    "Created: / 18.12.1995 / 16:00:22 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8128
    "Modified: / 12.1.1998 / 19:15:46 / cg"
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8129
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8130
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8131
methodStartTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8132
    "set a timing on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8133
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8134
    self commonTraceHelperWith:#startTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8135
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8136
    "Created: / 17.6.1996 / 17:12:06 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8137
    "Modified: / 12.1.1998 / 19:15:50 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8138
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8139
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8140
methodStopCounting
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8141
    "show the number of invocations & remove a countpoint on the current method"
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8142
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8143
    self commonTraceHelperWith:#stopCounting
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8144
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8145
    "Created: / 15.12.1995 / 11:03:22 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8146
    "Modified: / 12.1.1998 / 19:15:55 / cg"
305
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8147
!
16d903e3d59d methodcounting added
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
  8148
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8149
methodStopMemoryUsage
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8150
    "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
  8151
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8152
    self commonTraceHelperWith:#stopCountingMemoryUsage.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8153
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8154
    "Created: / 18.12.1995 / 16:02:02 / stefan"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8155
    "Modified: / 12.1.1998 / 19:16:06 / cg"
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8156
!
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8157
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8158
methodStopTiming
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8159
    "show the execution times on the current method"
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8160
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8161
    self commonTraceHelperWith:#stopTiming
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8162
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8163
    "Created: / 17.6.1996 / 17:12:27 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8164
    "Modified: / 12.1.1998 / 19:16:12 / cg"
629
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8165
!
754a858231f9 method timing info
Claus Gittinger <cg@exept.de>
parents: 626
diff changeset
  8166
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8167
methodStringSearch
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8168
    "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
  8169
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  8170
    self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8171
	askForSearchTitle:'string to search for in sources:' 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8172
	openWith:#browseForString:in:
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8173
	isSelector:true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8174
	searchArea:#class
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  8175
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  8176
    "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
  8177
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8178
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8179
methodTrace
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8180
    "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
  8181
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8182
    self commonTraceHelperWith:#setTracePoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8183
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8184
    "Modified: / 12.1.1998 / 19:16:16 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8185
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8186
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  8187
methodTraceFull
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  8188
    "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
  8189
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8190
    self commonTraceHelperWith:#setTraceFullPoint.
1389
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8191
81d96b427737 use new debugging-interface from Method.
Claus Gittinger <cg@exept.de>
parents: 1384
diff changeset
  8192
    "Created: / 15.12.1995 / 18:20:33 / cg"
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8193
    "Modified: / 12.1.1998 / 19:16:19 / cg"
306
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  8194
!
f0218f7cdbc1 full walkback trace / trace entries now on CONTROL menu
Claus Gittinger <cg@exept.de>
parents: 305
diff changeset
  8195
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8196
methodTraceSender
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8197
    "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
  8198
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8199
    self commonTraceHelperWith:#setTraceSenderPoint.
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8200
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8201
    "Modified: / 12.1.1998 / 19:16:22 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8202
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8203
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8204
!BrowserView methodsFor:'method stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8205
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8206
checkMethodSelected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8207
    currentMethod isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8208
	self warn:'select a method first'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8209
	^ false
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8210
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8211
    ^ true
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8212
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8213
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8214
listEntryForMethod:aMethod selector:selector
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8215
    "answer a method list entry 
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8216
     (gimmic: adding a little image to breakPointed methods)"
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8217
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8218
    |s icn resources|
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8219
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8220
    s := aMethod printStringForBrowserWithSelector:selector.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8221
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8222
    "/
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8223
    "/ wrap icons (i.e. break- or trace points)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8224
    "/ have higher prio ...
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8225
    "/
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8226
    aMethod isWrapped ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8227
        (s endsWith:' !!') ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8228
            s := s copyWithoutLast:2
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8229
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8230
        aMethod isBreakpointed ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8231
            icn := self stopIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8232
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8233
            aMethod isTimed ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8234
                icn := self timeIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8235
            ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8236
                icn := self traceIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8237
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8238
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8239
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8240
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8241
    icn isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8242
        ShowResourceIcons ~~ false ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8243
            (resources := aMethod resources) notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8244
                (resources includesKey:#canvas) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8245
                    icn := self canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8246
                ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8247
                    (resources includesKey:#menu) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8248
                        icn := self menuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8249
                    ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8250
                        (resources includesKey:#image) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8251
                            icn := self imageIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8252
                        ] ifFalse:[
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8253
                            (resources includesKey:#fileImage) ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8254
                                icn := self fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8255
                            ] ifFalse:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8256
                                (resources includesKey:#programMenu) ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8257
                                    icn := self programMenuIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8258
                                ]
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8259
                            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8260
                        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8261
                    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8262
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8263
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8264
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8265
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8266
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8267
    icn notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8268
        ^ LabelAndIcon icon:icn string:s
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8269
    ].
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8270
    ^ s
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8271
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8272
    "Created: / 22.10.1996 / 19:51:00 / cg"
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8273
    "Modified: / 29.10.1997 / 03:31:41 / cg"
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8274
!
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8275
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8276
listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8277
    "answer a list of all methods in a given method category 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8278
     of the argument, aClass and its superclasses.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8279
     Used with fullProtocol browsing."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8280
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8281
    |newList selectors otherSelectors allCategories|
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8282
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8283
    newList := OrderedCollection new.
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8284
    selectors := IdentitySet new.
611
f3e973ecc846 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 610
diff changeset
  8285
    otherSelectors := IdentitySet new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8286
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8287
    allCategories := (aCategory = '* all *').
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8288
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8289
    self classesInFullProtocolHierarchy:aClass do:[:c |
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8290
        |searchCategory|
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8291
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8292
        (aCategory = '* no category *') ifTrue:[
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8293
            searchCategory := nil
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8294
        ] ifFalse:[
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8295
            searchCategory := aCategory
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8296
        ].
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8297
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8298
        c methodDictionary keysAndValuesDo:[:selector :aMethod |
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8299
            (allCategories
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8300
             or:[aMethod category = searchCategory]) ifTrue:[
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8301
                (otherSelectors includes:selector) ifFalse:[
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8302
                    (selectors includes:selector) ifFalse:[
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8303
                        selectors add:selector.
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8304
                        newList add:(selector -> aMethod)
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8305
                    ]
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8306
                ].
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8307
            ] ifFalse:[
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8308
                otherSelectors add:selector
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8309
            ]
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8310
        ].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8311
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8312
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8313
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8314
1346
7776ccf2f9c8 oops - duplicate selector entries in fullProtocol browser
Claus Gittinger <cg@exept.de>
parents: 1345
diff changeset
  8315
    "Modified: 14.10.1997 / 00:19:20 / cg"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8316
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8317
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8318
listOfAllMethodsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8319
    "answer a list of all methods in a given method category 
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8320
     of the argument, aClass"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8321
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8322
    |newList searchCategory all|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8323
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8324
    all := (aCategory = '* all *').
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8325
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8326
    (aCategory = '* no category *') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8327
	searchCategory := nil
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8328
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8329
	searchCategory := aCategory
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8330
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8331
    newList := OrderedCollection new.
793
56d50de4ad72 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 792
diff changeset
  8332
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8333
    aClass methodDictionary keysAndValuesDo:[:selector :aMethod |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8334
	(all or:[aMethod category = searchCategory]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8335
	    newList add:(selector -> aMethod)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8336
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8337
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8338
    (newList size == 0) ifTrue:[^ nil].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8339
    ^ newList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8340
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8341
    "Created: 30.7.1997 / 15:10:16 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8342
    "Modified: 30.7.1997 / 15:12:38 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8343
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8344
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8345
listOfAllSelectorsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8346
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8347
     of the argument, aClass and its superclasses.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8348
     Used with fullProtocol browsing."
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8349
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8350
    |methodList newList otherSelectors allCategories|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8351
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8352
    methodList := self listOfAllMethodsInCategory:aCategory inFullProtocolHierarchyOfClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8353
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8354
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8355
    aClass isJavaClass ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8356
	methodList := methodList asOrderedCollection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8357
	methodList sort:[:a :b |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8358
			    |mA mB|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8359
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8360
			    mA := a value.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8361
			    mB := b value.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8362
			    mA name < mB name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8363
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8364
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8365
	selectorList := methodList collect:[:assoc | assoc key].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8366
	^ methodList collect:[:assoc |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8367
				self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8368
				    listEntryForMethod:(assoc value)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8369
				    selector:(assoc key)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8370
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8371
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8372
1262
8e1263b12ec6 checkin from browser
ca
parents: 1260
diff changeset
  8373
    methodList := methodList asOrderedCollection.
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8374
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8375
    newList := methodList 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8376
		    collect:[:assoc |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8377
			self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8378
			    listEntryForMethod:(assoc value)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8379
			    selector:assoc key
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8380
		    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8381
    ^ newList asOrderedCollection sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8382
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8383
    "Modified: 30.7.1997 / 15:28:59 / cg"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8384
!
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8385
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8386
listOfAllSelectorsInCategory:aCategory ofClass:aClass
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8387
    "answer a list of all selectors in a given method category 
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8388
     of the argument, aClass"
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8389
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8390
    |methodList newList|
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8391
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8392
    methodList := self listOfAllMethodsInCategory:aCategory ofClass:aClass.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8393
    (methodList size == 0) ifTrue:[^ nil].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8394
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8395
    aClass isJavaClass ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8396
	methodList := methodList asOrderedCollection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8397
	methodList sort:[:a :b |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8398
			    |mA mB|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8399
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8400
			    mA := a value.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8401
			    mB := b value.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8402
			    mA name < mB name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8403
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8404
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8405
	selectorList := methodList collect:[:assoc | assoc key].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8406
	^ methodList collect:[:assoc |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8407
				self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8408
				    listEntryForMethod:(assoc value)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8409
				    selector:(assoc key)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8410
			     ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8411
    ].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8412
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8413
    selectorList := methodList collect:[:assoc | assoc key].
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8414
    newList := methodList 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8415
		    collect:[:assoc | 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8416
				self 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8417
				    listEntryForMethod:(assoc value)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8418
				    selector:(assoc key)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8419
			    ].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8420
    ^ newList sort:[:a :b | a string < b string] with:selectorList
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8421
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8422
    "Modified: 30.7.1997 / 15:29:16 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8423
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8424
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8425
methodDoubleClick:lineNr
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8426
    |resources|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8427
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8428
    currentMethod notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8429
        currentMethod hasResource ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8430
            resources := currentMethod resources.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8431
            (resources includesKey:#canvas) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8432
                UIPainter openOnClass:currentClass andSelector:currentSelector.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8433
                ^ self
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8434
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8435
            (resources includesKey:#menu) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8436
                MenuEditor openOnClass:currentClass andSelector:currentSelector.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8437
                ^ self
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8438
            ].
1382
59c2d1a664f1 Double click on image resource methods invokes the Image Editor with the current class and selector as arguments.
tz
parents: 1375
diff changeset
  8439
            ((resources includesKey:#image) or: [resources includesKey:#fileImage]) ifTrue:[
59c2d1a664f1 Double click on image resource methods invokes the Image Editor with the current class and selector as arguments.
tz
parents: 1375
diff changeset
  8440
                ImageEditor openOnClass:currentClass andSelector:currentSelector.
59c2d1a664f1 Double click on image resource methods invokes the Image Editor with the current class and selector as arguments.
tz
parents: 1375
diff changeset
  8441
                ^ self
59c2d1a664f1 Double click on image resource methods invokes the Image Editor with the current class and selector as arguments.
tz
parents: 1375
diff changeset
  8442
            ].
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8443
        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8444
    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8445
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8446
    "Created: / 27.10.1997 / 00:29:58 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8447
    "Modified: / 28.10.1997 / 12:45:05 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8448
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8449
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8450
methodSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8451
    "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
  8452
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  8453
    |selection sensor|
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  8454
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8455
"/    selection := methodListView selectionValue string.
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8456
selection := selectorList at:lineNr.
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  8457
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  8458
    "/ reselected with control ?
1075
f0ca720bce42 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1074
diff changeset
  8459
    ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8460
	selection = currentSelector ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8461
	    "/ if there is a trace/break, remove it.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8462
	    (currentMethod notNil and:[currentMethod isWrapped]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8463
		self methodRemoveBreakOrTrace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8464
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8465
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8466
	].
1073
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  8467
    ].
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  8468
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  8469
    self switchToMethod:selection.
a5ce4c71ab14 ctrl-click on a method removes break/trace point
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  8470
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8471
    "Modified: 30.7.1997 / 15:31:21 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8472
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8473
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8474
methodSelectionChanged
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8475
    "method selection has changed - update dependent views"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8476
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  8477
    self withBusyCursorDo:[
1342
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8478
        |index cls|
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8479
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8480
        aspect := nil.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8481
        self updateCodeView.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8482
        (currentMethod notNil 
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8483
        and:[currentMethod isCounting]) ifTrue:[
1342
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8484
            self updateMethodListWithScroll:false.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8485
        ].
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8486
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8487
        self setAcceptAndExplainActionsForMethod.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8488
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8489
        "
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8490
         if there is any autoSearch string, do the search
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8491
        "
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8492
        autoSearch notNil ifTrue:[
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8493
            codeView 
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8494
                searchFwd:autoSearch 
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8495
                startingAtLine:1 col:0 
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8496
                ifAbsent:[]
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8497
        ].
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8498
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8499
        fullProtocol ifTrue:[
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8500
            "
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8501
             remove any bold attribute from classList
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8502
            "
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8503
            1 to:classListView list size do:[:i |
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8504
                classListView attributeAt:i remove:#bold.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8505
            ].
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8506
            "
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8507
             boldify the class where this method is implemented
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8508
            "
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8509
            currentMethod notNil ifTrue:[
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8510
                cls := currentMethod containingClass.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8511
                index := classListView list indexOf:(cls name).
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8512
                (index == 0 
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8513
                 and:[cls isMeta
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8514
                 and:[cls name endsWith:' class']]) ifTrue:[
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8515
                    index := classListView list indexOf:(cls name copyWithoutLast:6).
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8516
                ].
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8517
                index ~~ 0 ifTrue:[
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8518
                    classListView attributeAt:index add:#bold.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8519
                ].
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8520
                currentClass := acceptClass := cls.
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8521
            ]
f0101f5528ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  8522
        ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8523
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8524
1391
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8525
    "Created: / 23.11.1995 / 14:17:44 / cg"
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8526
    "Modified: / 17.6.1996 / 16:47:50 / stefan"
6404de5f57b6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1390
diff changeset
  8527
    "Modified: / 12.1.1998 / 19:07:36 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8528
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8529
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8530
methodTemplate
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8531
    "return a method definition template"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8532
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8533
    |s|
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8534
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8535
    s := TextStream on:''.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8536
    s nextPutAll:'message selector and argument names
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8537
    "comment stating purpose of this message"
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8538
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8539
    |temporaries|
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8540
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8541
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8542
    statement.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8543
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8544
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8545
    "
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8546
     optional: comment giving example use
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8547
    "
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8548
'.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8549
    s cr.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8550
    s emphasis:(self commentEmphasis).
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8551
    s nextPutAll:'"
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8552
 change the above template into real code.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8553
 Then `accept'' either via the menu 
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8554
 or via the keyboard (usually CMD-A).
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8555
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8556
 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
  8557
 select any existing methods code, change it,
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8558
 and finally `accept''. The method will then be
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8559
 installed under the selector as defined in the
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8560
 actual text - no matter which method is selected
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8561
 in the browser.
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8562
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8563
 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
  8564
 and install it with `accept''.
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8565
"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8566
'.
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8567
    ^ s contents
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8568
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8569
    "Created: 8.2.1996 / 18:21:53 / cg"
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
  8570
    "Modified: 1.8.1997 / 12:43:51 / cg"
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8571
!
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8572
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8573
switchToAnyMethodNamed:matchString
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
  8574
    "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
  8575
     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
  8576
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  8577
    |aSelector classToStartSearch classToSearch aClass nm idx|
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8578
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8579
    actualClass isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8580
	currentClassHierarchy notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8581
	    classToStartSearch := currentClassHierarchy
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8582
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8583
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8584
	classToStartSearch := actualClass 
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8585
    ].
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  8586
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8587
    classToStartSearch notNil ifTrue:[
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8588
"/        showInstance ifFalse:[
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8589
"/            classToStartSearch := classToStartSearch class
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8590
"/        ].
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8591
	((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8592
	    classToSearch := classToStartSearch.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8593
	    aClass := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8594
	    [classToSearch notNil and:[aClass isNil]] whileTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8595
		aSelector := classToSearch methodDictionary findFirstKey:[:element | matchString match:element].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8596
		aSelector notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8597
		    aClass := classToSearch
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8598
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8599
		    classToSearch := classToSearch superclass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8600
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8601
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8602
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8603
	    aSelector := matchString asSymbolIfInterned.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8604
	    aSelector notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8605
		aClass := classToStartSearch whichClassIncludesSelector:aSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8606
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8607
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8608
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8609
	aClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8610
	    nm := aClass name.
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8611
"/            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
  8612
"/                ((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
  8613
"/                    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
  8614
"/                ]
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8615
"/            ].
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8616
	    aClass ~~ actualClass ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8617
		self switchToClassNamed:nm.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8618
	    ].    
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8619
	    self switchToMethodNamed:aSelector "matchString".
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8620
	    ^ self.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8621
	]
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  8622
    ].
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  8623
    self beep
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  8624
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  8625
    "Modified: 17.6.1996 / 16:52:36 / stefan"
750
7427968b55f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 746
diff changeset
  8626
    "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
  8627
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8628
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8629
switchToMethod:aString
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8630
    "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
  8631
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8632
    |selectorString selectorSymbol|
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8633
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8634
    (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
  8635
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8636
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8637
     kludge: extract real selector
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8638
    "
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8639
    selectorString := aString withoutSpaces upTo:(Character space).
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  8640
    selectorSymbol := selectorString asSymbolIfInterned.
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  8641
    selectorSymbol isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8642
	self beep.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8643
	^ self
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  8644
    ].
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8645
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8646
    fullProtocol ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8647
	currentMethod := currentSelector := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8648
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8649
	 search which class implements the selector
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8650
	"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8651
	self classesInFullProtocolHierarchy:actualClass do:[:c |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8652
	    (currentMethod isNil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8653
	     and:[c includesSelector:selectorSymbol]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8654
		currentSelector := selectorSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8655
		currentMethod := c compiledMethodAt:selectorSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8656
		acceptClass := c
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8657
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8658
	]
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8659
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8660
	currentSelector := selectorSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8661
	currentMethod := actualClass compiledMethodAt:selectorSymbol.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8662
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8663
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8664
    methodCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8665
	currentMethod notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8666
	    (currentMethodCategory = currentMethod category) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8667
		currentMethodCategory := currentMethod category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8668
		methodCategoryListView setSelectElement:currentMethodCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8669
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8670
	]
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8671
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8672
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8673
    self methodSelectionChanged
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8674
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8675
    "Created: 4.6.1996 / 23:00:12 / cg"
637
9cf2a5a397d6 switch to method fixes
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
  8676
    "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
  8677
!
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
  8678
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8679
switchToMethodNamed:matchString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8680
    "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
  8681
     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
  8682
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  8683
    |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
  8684
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8685
    currentClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8686
	classToSearch := actualClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8687
	dict := classToSearch methodDictionary.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8688
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8689
	((matchString ~= '*') and:[matchString includesMatchCharacters]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8690
	    aSelector := dict findFirstKey:[:element | matchString match:element].       
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8691
	    aSelector notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8692
		method := dict at:aSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8693
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8694
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8695
	    aSelector := matchString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8696
	    method := dict at:matchString ifAbsent:[]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8697
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8698
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8699
	method notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8700
	    cat := method category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8701
	    cat isNil ifTrue:[cat := '* all *'].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8702
	    methodCategoryListView setSelectElement:cat.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8703
	    currentMethodCategory := cat.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8704
	    self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8705
	    self methodCategorySelectionChanged.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8706
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8707
	    currentMethod := method.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8708
	    currentSelector := aSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8709
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8710
	    m := aSelector , '*(*)'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8711
	    selectorList notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8712
		idx := selectorList findFirst:[:line |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8713
						    line = aSelector
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8714
						    or:[m match:line]].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8715
"/            idx := methodListView list findFirst:[:line |
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8716
"/                                                line = aSelector
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8717
"/                                                or:[m match:line]].
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  8718
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8719
		methodListView setSelection:idx. "/ setSelectElement:aSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8720
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8721
	    self methodSelectionChanged.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8722
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8723
	]
348
55e8c40ae940 fixed findMethod / findMethodHere when showing class protocol
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  8724
    ].
578
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  8725
    self beep.
53a433c25395 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 575
diff changeset
  8726
650
bb426452251e Fix #switchToMethodNamed: -- select name in methodListView.
Stefan Vogel <sv@exept.de>
parents: 637
diff changeset
  8727
    "Modified: 28.6.1996 / 20:28:56 / stefan"
1278
0b0ee3c97910 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
  8728
    "Modified: 8.8.1997 / 12:06:11 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8729
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8730
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8731
updateClassMethodListWithScroll:scroll keepSelection:keep
1163
b36faf475548 ??? duplication removed
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
  8732
    |newList selection s|
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8733
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8734
    newList := OrderedCollection new.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8735
    selection := classMethodListView selection.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8736
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8737
    "/ update the list, caring for traps.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8738
    classMethodListView list do:[:entry |
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8739
        |cls sel mthd s icn|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8740
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8741
        cls := self classFromClassMethodString:entry string.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8742
        sel := self selectorFromClassMethodString:entry string.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8743
        (cls isNil or:[sel isNil]) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8744
            "/ method is gone ?
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8745
            s := entry string.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8746
            (s endsWith:'???') ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8747
                s := s , ' ???'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8748
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8749
            newList add:s
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8750
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8751
            mthd := cls compiledMethodAt:(sel asSymbol).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8752
            mthd isNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8753
                newList add:cls name , ' ' , sel , ' ???'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8754
            ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8755
                newList add:(self listEntryForMethod:mthd selector:(cls name , ' ' , sel))
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8756
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8757
"/                s := cls name , ' ' , (mthd printStringForBrowserWithSelector:sel).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8758
"/                mthd isWrapped ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8759
"/                    (s endsWith:' !!') ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8760
"/                        s := s copyWithoutLast:2
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8761
"/                    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8762
"/                    (s endsWith:' !!') ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8763
"/                        s := s copyWithoutLast:2
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8764
"/                    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8765
"/                    mthd isBreakpointed ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8766
"/                        icn := self stopIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8767
"/                    ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8768
"/                        mthd isTimed ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8769
"/                            icn := self timeIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8770
"/                        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8771
"/                            icn := self traceIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8772
"/                        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8773
"/                    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8774
"/                    newList add:(LabelAndIcon icon:icn string:s)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8775
"/                ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8776
"/                    newList add:s
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8777
"/                ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8778
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8779
        ].
1066
3d42c6f886f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
  8780
    ].
3d42c6f886f4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
  8781
    classMethodListView setList:newList.
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8782
    classMethodListView setSelection:selection.
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8783
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8784
    "Modified: / 18.12.1995 / 22:54:04 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8785
    "Created: / 3.3.1997 / 15:10:15 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  8786
    "Modified: / 26.10.1997 / 16:52:32 / cg"
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8787
!
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8788
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8789
updateMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8790
    self updateMethodListWithScroll:true keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8791
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8792
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8793
updateMethodListWithScroll:scroll
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8794
    self updateMethodListWithScroll:scroll keepSelection:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8795
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8796
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8797
updateMethodListWithScroll:scroll keepSelection:keep
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8798
    |selectors scr first last selection searchCategory|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8799
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8800
    methodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8801
	selection := methodListView selection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8802
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8803
	searchCategory := currentMethodCategory.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8804
	(currentClass notNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8805
	and:[currentClass supportsMethodCategories not]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8806
	    searchCategory := '* all *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8807
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8808
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8809
	(searchCategory notNil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8810
	and:[actualClass notNil]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8811
	    fullProtocol ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8812
		selectors := self listOfAllSelectorsInCategory:searchCategory 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8813
				inFullProtocolHierarchyOfClass:actualClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8814
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8815
		selectors := self listOfAllSelectorsInCategory:searchCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8816
						       ofClass:actualClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8817
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8818
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8819
	scr := scroll.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8820
	first := methodListView firstLineShown.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8821
	first ~~ 1 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8822
	    last := methodListView lastLineShown.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8823
	    selectors size <= (last - first + 1) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8824
		scr := true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8825
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8826
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8827
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8828
	scr ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8829
	    methodListView list: "contents:" selectors
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8830
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8831
	    methodListView setList: "setContents:" selectors
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8832
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8833
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8834
	(variableListView notNil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8835
	and:[variableListView hasSelection]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8836
	    self hilightMethodsInMethodList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8837
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8838
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8839
	keep ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8840
	    methodListView setSelection:selection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8841
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8842
	^ self
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8843
    ].
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8844
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8845
    classMethodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8846
	self updateClassMethodListWithScroll:scroll keepSelection:keep
1058
bb27859b0d78 care for lazy methods when searching for senders;
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  8847
    ].
312
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8848
88a6d2b2f1fb Add memory usage counting in method ctrl/menu.
Stefan Vogel <sv@exept.de>
parents: 309
diff changeset
  8849
    "Modified: 18.12.1995 / 22:54:04 / stefan"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8850
    "Modified: 30.7.1997 / 15:55:06 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8851
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8852
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8853
!BrowserView methodsFor:'misc'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8854
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8855
instanceProtocol:aBoolean
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8856
    "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
  8857
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8858
    |onToggle offToggle|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8859
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8860
    showInstance ~~ aBoolean ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8861
	self checkSelectionChangeAllowed ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8862
	    instanceToggle notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8863
		aBoolean ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8864
		    offToggle := classToggle.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8865
		    onToggle := instanceToggle.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8866
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8867
		    onToggle := classToggle.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8868
		    offToggle := instanceToggle.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8869
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8870
		onToggle turnOn.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8871
		offToggle turnOff.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8872
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8873
	    showInstance := aBoolean.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8874
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8875
	    (variableListView notNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8876
	    and:[variableListView hasSelection]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8877
		self unhilightMethodCategories.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8878
		self unhilightMethods.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8879
		variableListView setSelection:nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8880
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8881
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8882
	    fullProtocol ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8883
		showInstance ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8884
		    actualClass := currentClassHierarchy.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8885
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8886
		    actualClass := currentClassHierarchy class.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8887
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8888
		acceptClass := actualClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8889
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8890
		self updateClassList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8891
		self updateMethodCategoryListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8892
		self updateMethodListWithScroll:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8893
		self updateVariableList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8894
		^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8895
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8896
	    currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8897
		self classSelectionChanged
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8898
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8899
	    codeView modified:false.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8900
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8901
	    aBoolean ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8902
		onToggle := classToggle.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8903
		offToggle := instanceToggle
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8904
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8905
		offToggle := classToggle.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8906
		onToggle := instanceToggle.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8907
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8908
	    onToggle turnOn.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8909
	    offToggle turnOff.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8910
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8911
    ]
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8912
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
  8913
    "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
  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
processName
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8917
    "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
  8918
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8919
    ^ 'System Browser'.
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
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  8922
showActivity:someMessage
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  8923
    "some activityNotification to be forwarded to the user;
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  8924
     show it in the windows title area here."
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  8925
309
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  8926
    self busyLabel:someMessage with:nil
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  8927
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  8928
    "Created: 16.12.1995 / 18:41:37 / cg"
501
655c9ce9a600 commentary
Claus Gittinger <cg@exept.de>
parents: 486
diff changeset
  8929
    "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
  8930
!
383db60e61b7 show activity notifications in the title
Claus Gittinger <cg@exept.de>
parents: 308
diff changeset
  8931
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8932
updateCodeView
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8933
    |code sourceLineNumber|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8934
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8935
    aspect == #hierarchy ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8936
	^ self classHierarchy
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8937
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8938
    aspect == #classInstVars ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8939
	^ self classClassInstVars
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8940
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8941
    aspect == #comment ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8942
	^ self classComment
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8943
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8944
    aspect == #primitiveDefinitions ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8945
	^ self classPrimitiveDefinitions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8946
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8947
    aspect == #primitiveFunctions ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8948
	^ self classPrimitiveFunctions
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8949
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8950
    aspect == #primitiveVariables ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8951
	^ self classPrimitiveVariables
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8952
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8953
    aspect == #revisionInfo ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8954
	^ self classRevisionInfo
353
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8955
    ].
c985b6878ade better updating changes from other browsers
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
  8956
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8957
    fullClass ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8958
	currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8959
	    code := currentClass source.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8960
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8961
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8962
	aspect == #definition ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8963
	    ^ self classDefinition
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8964
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8965
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8966
	currentMethod notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8967
	    (codeView acceptAction isNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8968
	    and:[actualClass notNil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8969
	    and:[currentMethodCategory notNil]]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8970
		self setAcceptAndExplainActionsForMethod.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8971
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8972
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8973
	    code := currentMethod source.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8974
	    sourceLineNumber := currentMethod sourceLineNumber.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8975
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8976
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8977
    codeView contents:code.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8978
    codeView modified:false.
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8979
    sourceLineNumber notNil ifTrue:[
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8980
    sourceLineNumber ~~ 1 ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8981
	    codeView gotoLine:sourceLineNumber.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8982
	    sourceLineNumber > 10 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8983
		sourceLineNumber := sourceLineNumber - 10
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8984
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8985
	    codeView scrollToLine:sourceLineNumber.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  8986
	].
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8987
    ].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8988
    self normalLabel.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8989
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  8990
    "Created: 23.11.1995 / 14:16:43 / cg"
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
  8991
    "Modified: 30.7.1997 / 16:16:10 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8992
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  8993
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  8994
!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
  8995
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  8996
nameSpaceMenu
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8997
    <resource: #programMenu >
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  8998
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  8999
    |labels selectors|
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9000
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9001
    labels := #('new namespace').
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9002
    selectors := #(nameSpaceNewNameSpace).
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9003
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9004
"/    showAllNamespaces ifTrue:[
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9005
"/        labels := labels , #( '-' 'show topLevel namespaces only').
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9006
"/        selectors := selectors , #(nil showTopLevelNamespaces).
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9007
"/    ] ifFalse:[
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9008
"/        labels := labels , #( '-' 'show all namespaces').
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9009
"/        selectors := selectors , #(nil showAllNamespaces).
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9010
"/    ].
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9011
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9012
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9013
    (currentNamespace notNil
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9014
    and:[currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9015
    and:[currentNamespace ~= '* all *']]) ifTrue:[
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9016
        "/ is it all empty ?
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9017
        currentNamespace allClasses isEmpty ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9018
            labels := labels , #('-' 'remove').
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9019
            selectors := selectors , #(nil nameSpaceRemove).
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9020
        ]
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9021
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9022
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9023
    ^ PopUpMenu
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9024
        labels:(resources array:labels)
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9025
        selectors:selectors
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9026
        receiver:self.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9027
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9028
    "Created: / 4.1.1997 / 23:51:38 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
  9029
    "Modified: / 29.10.1997 / 03:39:12 / cg"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9030
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9031
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9032
nameSpaceNewNameSpace
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9033
    "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
  9034
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9035
    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
  9036
    aspect := nil.
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9037
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9038
    "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
  9039
    "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
  9040
!
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9041
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9042
nameSpaceRemove
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9043
    "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
  9044
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9045
    (currentNamespace ~~ Smalltalk
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9046
    and:[currentNamespace allClasses isEmpty]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9047
	self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9048
	    Smalltalk removeClass:currentNamespace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9049
	    allNamespaces := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9050
	    self setListOfNamespaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9051
	    self changeNameSpaceTo:'* all *'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9052
	    namespaceList contents:'* all *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9053
	]
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9054
    ].
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9055
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9056
    "Modified: 18.8.1997 / 15:44:31 / cg"
907
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9057
! !
915c9573dc5c added remove-namespace menu item (only if the space is empty)
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  9058
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9059
!BrowserView methodsFor:'namespace stuff'!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9060
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9061
changeNameSpaceTo:nsName
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9062
    |n selectedClass str selectedCategory|
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9063
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9064
    nsName = '* all *' ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9065
	currentNamespace := nsName.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9066
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9067
	n := Smalltalk at:nsName asSymbol.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9068
	n isNamespace ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9069
	    currentNamespace := n.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9070
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9071
	    ^ self
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9072
	]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9073
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9074
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9075
    selectedClass := actualClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9076
    currentClass := actualClass := nil.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9077
    selectedCategory := currentClassCategory.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9078
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9079
    self updateClassCategoryListWithScroll:true.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9080
    selectedCategory notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9081
	self classCategorySelectionChanged.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9082
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9083
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9084
    selectedClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9085
	str := self displayedClassNameOf:selectedClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9086
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9087
	self switchToClassNamed:str.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9088
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9089
	(classListView list isNil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9090
	or:[(classListView list includes:str) not]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9091
	     currentClassCategory := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9092
	     currentClass := nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9093
	     aspect := nil.   
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9094
	     self updateMethodCategoryList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9095
	     self updateMethodList.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9096
	     self updateCodeView.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9097
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9098
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9099
	(classCategoryListView notNil and:[currentClass notNil]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9100
	    (currentClassCategory = currentClass category) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9101
		currentClassCategory := currentClass category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9102
		classCategoryListView setSelectElement:currentClassCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9103
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9104
	].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9105
    ]
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9106
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9107
    "Created: 3.1.1997 / 11:11:13 / cg"
1015
b3727346969f nicer version validation
Claus Gittinger <cg@exept.de>
parents: 1000
diff changeset
  9108
    "Modified: 29.1.1997 / 18:33:42 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9109
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9110
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9111
displayedClassNameOf:aClass
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9112
    "depending on the current nameSpace, either show a classes
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9113
     fullname or its name without the namespace prefix (if its in the current)"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9114
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9115
    |owner nm ns|
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9116
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  9117
    aClass isJavaClass ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9118
	^ aClass fullName "/ asString replaceAll:$/ with:$.
1095
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  9119
    ].
b54f607eaa97 ask class for its documentation
Claus Gittinger <cg@exept.de>
parents: 1083
diff changeset
  9120
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  9121
    "/ in which nameSpace is that class (or its owner) ?
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  9122
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9123
    owner := aClass topOwningClass.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9124
    owner notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9125
	ns := owner nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9126
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9127
	ns := aClass nameSpace.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9128
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9129
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9130
    "/ this 'cannot' happen (should always be Smalltalk)
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9131
    ns isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9132
	^ aClass name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9133
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9134
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9135
    currentNamespace = '* all *' ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9136
	(ns == Smalltalk) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9137
	    nm := aClass nameWithoutNameSpacePrefix.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9138
	    ^ nm
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9139
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9140
	nm := aClass nameWithoutNameSpacePrefix.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9141
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9142
"/        ^ aClass name        "/ full name
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9143
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9144
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9145
    nm := aClass nameWithoutNameSpacePrefix.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9146
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9147
    "/ is it in one of the selected namespaces ?
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9148
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9149
    (self findClassNamedInNameSpace:nm) isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9150
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9151
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9152
    currentNamespace = ns ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9153
	^ ns name , '::' , nm   "/ full name
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9154
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9155
    ^ nm.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9156
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9157
    "Created: 20.12.1996 / 17:46:41 / cg"
1267
17fc5184fb22 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
  9158
    "Modified: 31.7.1997 / 22:57:16 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9159
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9160
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9161
listOfAllNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9162
    "return a list of all namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9163
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9164
    allNamespaces isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9165
	allNamespaces := Namespace allNamespaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9166
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9167
	showAllNamespaces ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9168
	    "/ only topLevel namespaces are shown
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9169
	    "/ i.e. those without colons in their name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9170
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9171
	    allNamespaces := allNamespaces select:[:ns |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9172
						    |nm|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9173
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9174
						    nm := ns name.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9175
						    (nm includes:$:) not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9176
						  ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9177
	]
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9178
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9179
    ^ allNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9180
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9181
    "Modified: 31.7.1997 / 22:32:30 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9182
!
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9183
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9184
listOfNamespaces
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9185
    "return a list of considered namespaces"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9186
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9187
    currentNamespace isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9188
	^ Array with:Smalltalk
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9189
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9190
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9191
    currentNamespace = '* all *' ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9192
	^ self listOfAllNamespaces
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9193
    ].
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9194
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9195
    ^ Array with:currentNamespace
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9196
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9197
    "Created: 26.10.1996 / 11:25:39 / cg"
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9198
    "Modified: 20.12.1996 / 19:18:18 / cg"
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9199
!
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9200
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9201
setListOfNamespaces
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9202
    |l hasSmalltalk|
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9203
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9204
    namespaceList isNil ifTrue:[ ^ self ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9205
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9206
    l := self listOfAllNamespaces collect:[:ns | ns name].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9207
    l := l asOrderedCollection.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9208
    hasSmalltalk := true.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9209
    l remove:'Smalltalk' ifAbsent:[hasSmalltalk := false].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9210
    l sort.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9211
    l addFirst:'-'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9212
    hasSmalltalk ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9213
	l addFirst:'Smalltalk'
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9214
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9215
    l addFirst:'* all *'.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9216
    namespaceList list:l
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9217
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9218
    "Modified: 20.12.1996 / 19:18:29 / cg"
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9219
!
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9220
1266
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9221
showAllNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9222
    "toggle to show all namespaces"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9223
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9224
    showAllNamespaces := true.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9225
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9226
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9227
    "Modified: 31.7.1997 / 22:33:16 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9228
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9229
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9230
showTopLevelNamespaces
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9231
    "toggle to show topLevel namespaces only"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9232
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9233
    showAllNamespaces := false.
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9234
    self updateNamespaceList
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9235
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9236
    "Created: 31.7.1997 / 22:33:29 / cg"
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9237
!
ee97c01c22c9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1262
diff changeset
  9238
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9239
updateNamespaceList
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9240
    allNamespaces := nil.
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9241
    namespaceList notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9242
	self setListOfNamespaces
918
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9243
    ].
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9244
3b631dff391e also update the nameSpace list (update menu item)
Claus Gittinger <cg@exept.de>
parents: 916
diff changeset
  9245
    "Created: 8.1.1997 / 10:54:03 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9246
! !
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9247
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9248
!BrowserView methodsFor:'private'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9249
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9250
askAndBrowseMethodCategory:title action:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9251
    "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
  9252
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9253
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9254
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9255
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9256
		enterBoxTitle:title 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9257
		okText:'browse'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9258
		label:'browse category'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9259
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9260
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9261
    sel isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9262
	currentMethodCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9263
	    sel := currentMethodCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9264
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9265
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9266
    sel notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9267
	box initialText:(sel asString withoutSpaces)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9268
    ].
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9269
    box action:[:aString | self withBusyCursorDo:[aBlock value:aString]].
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9270
    box showAtPointer
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9271
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9272
    "Modified: 18.8.1997 / 15:42:07 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9273
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9274
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9275
askForMethodCategory
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  9276
    |someCategories box txt retVal|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9277
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9278
    someCategories := actualClass categories sort.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9279
    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
  9280
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9281
    lastMethodCategory isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9282
	txt := 'new methods'
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9283
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9284
	txt := lastMethodCategory
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9285
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9286
    box initialText:txt.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  9287
    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
  9288
    box showAtPointer.
455
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  9289
    ^ retVal
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  9290
4fd3fb9a34e4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 449
diff changeset
  9291
    "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
  9292
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9293
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9294
askForSearchSelectorTitle:title openWith:aSelector
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9295
    "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
  9296
     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
  9297
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9298
    ^ self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9299
	askForSearchTitle:title 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9300
	openWith:aSelector 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9301
	isSelector:true
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9302
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9303
    "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
  9304
!
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9305
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9306
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
  9307
    "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
  9308
     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
  9309
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9310
    ^ self
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9311
	askForSearchTitle:title 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9312
	openWith:aSelector 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9313
	isSelector:isSelector 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9314
	searchArea:#everywhere
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9315
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9316
    "Modified: 11.11.1996 / 12:42:46 / cg"
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9317
!
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9318
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9319
askForSearchTitle:title openWith:aSelector isSelector:isSelector searchArea:whereDefault
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9320
    "convenient method: setup enterBox with text from codeView or selected
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9321
     method for browsing based on a selector. Set action and launch box.
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
  9322
     SearchArea may be one of #everywhere, #classCategory, #class, #classWithPrivateClasses,
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
  9323
     #classHierarchy or #classHierarchyWithPrivateClasses"
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
  9324
1256
29c8e994602f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1255
diff changeset
  9325
    |box grp panel selectorHolder where whereChannel 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9326
     b sel classes areas toSearch cls privates inputField|
1155
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
  9327
c37cb25bed62 better search ;-) private stuff
ca
parents: 1149
diff changeset
  9328
    areas := #(everywhere 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9329
	       classCategory 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9330
	       class 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9331
	       classHierarchy 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9332
	       classWithPrivateClasses 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9333
	       classHierarchyWithPrivateClasses).
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9334
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9335
    isSelector ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9336
	sel := self selectorToSearchFor.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9337
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9338
	sel := self stringToSearchFor.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9339
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9340
    selectorHolder := sel asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9341
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9342
    box := Dialog new.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  9343
    (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
  9344
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9345
    inputField := box addInputFieldOn:selectorHolder tabable:true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9346
    inputField selectAll.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9347
    inputField entryCompletionBlock:[:contents |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9348
	|s what m|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9349
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9350
	s := contents withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9351
	box topView withWaitCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9352
	    what := Smalltalk selectorCompletion:s.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9353
	    inputField contents:what first.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9354
	    (what at:2) size ~~ 1 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9355
		self beep
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9356
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9357
	]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9358
    ].
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9359
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9360
    (currentClassCategory notNil or:[currentClass notNil]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9361
	box addHorizontalLine.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9362
	box addVerticalSpace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9363
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9364
	(box addTextLabel:(resources string:'search in:')) adjust:#left.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9365
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9366
	panel := VerticalPanelView "HorizontalPanelView" new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9367
	panel horizontalLayout:#fitSpace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9368
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9369
	grp := RadioButtonGroup new.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9370
	b := CheckBox "RadioButton" label:(resources string:'everywhere').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9371
	panel add:b. grp add:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9372
	box makeTabable:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9373
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9374
	currentClassCategory notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9375
	    b := CheckBox "RadioButton" label:(resources string:'class category').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9376
	    panel add:b. grp add:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9377
	    box makeTabable:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9378
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9379
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9380
	currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9381
	    b := CheckBox "RadioButton" label:(resources string:'class').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9382
	    panel add:b.grp add:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9383
	    box makeTabable:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9384
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9385
	    b := CheckBox "RadioButton" label:(resources string:'class & subclasses').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9386
	    panel add:b. grp add:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9387
	    box makeTabable:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9388
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9389
	    currentClass subclasses size == 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9390
		b disable.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9391
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9392
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9393
	    b := CheckBox "RadioButton" label:(resources string:'class & private classes').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9394
	    panel add:b.grp add:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9395
	    box makeTabable:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9396
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9397
	    currentClass privateClasses size == 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9398
		b disable
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9399
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9400
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9401
	    b := CheckBox "RadioButton" label:(resources string:'class & subclasses & all private classes').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9402
	    panel add:b. grp add:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9403
	    box makeTabable:b.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9404
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9405
	    currentClass subclasses size == 0 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9406
		b disable.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9407
	    ] ifFalse:[
1236
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
  9408
"/ this takes too long ...
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
  9409
"/                toSearch := IdentitySet new.
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
  9410
"/                currentClass withAllSubclasses do:[:cls | toSearch add:cls privateClasses].
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
  9411
"/                toSearch size == 0 ifTrue:[
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
  9412
"/                    b disable
ffc80648ab57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
  9413
"/                ]
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9414
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9415
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9416
	whereDefault notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9417
	    where := areas indexOf:whereDefault.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9418
	    where == 0 ifTrue:[where := 1].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9419
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9420
	    where := 1.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9421
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9422
	grp value:where.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9423
	whereChannel := grp.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9424
	box addComponent:panel indent:0.  "/ panel has its own idea of indenting
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9425
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9426
	box addVerticalSpace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9427
	box addHorizontalLine.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9428
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9429
	whereChannel := 1 asValue.
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9430
    ].
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9431
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9432
    box addAbortButton.
723
c25a73e57512 use *-categories; correctly update after a classCategory-remove;
Claus Gittinger <cg@exept.de>
parents: 714
diff changeset
  9433
    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
  9434
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9435
    box label:(resources string:'search').
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9436
    box open.
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9437
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9438
    box accepted ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9439
	sel := selectorHolder value.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9440
	where := whereChannel value.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9441
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9442
	sel isEmpty ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9443
	    self warn:'nothing entered for search'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9444
	    ^ self.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9445
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9446
	where isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9447
	    self warn:'no class(es) for search'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9448
	    ^ self.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9449
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9450
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9451
	where := areas at:where ifAbsent:#class.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9452
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9453
	where == #everywhere ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9454
	    classes := Smalltalk allClasses.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9455
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9456
	    where == #classCategory ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9457
		classes := Smalltalk allClassesInCategory:currentClassCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9458
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9459
		(where == #class or:[where == #classWithPrivateClasses]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9460
		    currentClass isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9461
			classes := #()
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9462
		    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9463
			classes := Array with:currentClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9464
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9465
		] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9466
		    (where == #classHierarchy or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9467
			classes := currentClass withAllSubclasses
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9468
		    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9469
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9470
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9471
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9472
	(where == #classWithPrivateClasses or:[where == #classHierarchyWithPrivateClasses]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9473
	    toSearch := IdentitySet withAll:classes.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9474
	    classes := IdentitySet withAll:toSearch.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9475
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9476
	    [toSearch notEmpty] whileTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9477
		cls := toSearch removeFirst.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9478
		privates := cls privateClasses.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9479
		privates notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9480
		    toSearch addAll:cls privateClasses.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9481
		    classes addAll:cls privateClasses.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9482
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9483
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9484
	    classes := classes asOrderedCollection.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9485
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9486
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9487
	classes isEmpty ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9488
	    self warn:'no class(es) given for search'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9489
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9490
	    self withSearchCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9491
		SystemBrowser perform:aSelector with:sel with:classes
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9492
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9493
	]
665
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9494
    ]
eb23262a5ee1 combined sender/localSenders into one dialog-controlled search operation.
Claus Gittinger <cg@exept.de>
parents: 650
diff changeset
  9495
863
65769db0afe5 use different searchArea defaults
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
  9496
    "Created: 11.11.1996 / 12:42:14 / cg"
1256
29c8e994602f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1255
diff changeset
  9497
    "Modified: 28.7.1997 / 18:04:04 / cg"
674
fa41cdb5faa5 show privacy in senders/implementors list;
Claus Gittinger <cg@exept.de>
parents: 665
diff changeset
  9498
!
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9499
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9500
busyLabel:what with:someArgument
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9501
    "set the title for some warning"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9502
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  9503
    self topView
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9504
	label:('System Browser - ' , (resources string:what with:someArgument))
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  9505
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
  9506
    "Modified: 18.8.1997 / 15:19:15 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9507
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9508
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9509
checkSelectionChangeAllowed
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9510
    "return true, if selection change is ok;
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9511
     its not ok, if code has been changed.
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9512
     in this case, return the result of a user query"
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9513
971
3f31069f85ce ignore historyLine, when checking for a changed method
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
  9514
    |what m src1 src2 list1 list2 v|
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9515
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  9516
    codeView modified ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9517
	^ true
447
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  9518
    ].
7f2888c05b92 dont access source again when leaving, if codeView was not modified
Claus Gittinger <cg@exept.de>
parents: 442
diff changeset
  9519
387
cdd20d24f2ee check for nil-actualClass (in case its gone)
Claus Gittinger <cg@exept.de>
parents: 376
diff changeset
  9520
    (currentMethod notNil and:[actualClass notNil]) ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9521
	self withBusyCursorDo:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9522
	    m := actualClass compiledMethodAt:currentSelector.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9523
	    m notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9524
		(src1 := m source) = (src2 := codeView contents) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9525
		    list1 := src1 asCollectionOfLines collect:[:line | line isNil ifTrue:['']
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9526
							       ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9527
								    line 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9528
									withoutTrailingSeparators
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9529
									    withTabsExpanded
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9530
							       ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9531
						      ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9532
		    list2 := src2 asCollectionOfLines collect:[:line | line isNil ifTrue:['']
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9533
							       ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9534
								    line 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9535
									withoutTrailingSeparators
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9536
									    withTabsExpanded
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9537
							       ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9538
						      ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9539
		    HistoryManager notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9540
			list1 := HistoryManager withoutHistoryLines:list1 asStringCollection asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9541
			list2 := HistoryManager withoutHistoryLines:list2 asStringCollection asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9542
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9543
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9544
		    list1 = list2 ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9545
			what := self checkSelectionChangeAllowedWithCompare:true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9546
			what == #compare ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9547
			    v := DiffTextView 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9548
				    openOn:src2 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9549
				    label:(resources string:'code here (to be accepted ?)')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9550
				    and:src1 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9551
				    label:(resources string:'methods actual code').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9552
			    v label:(resources string:'comparing method versions').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9553
			    ^ false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9554
			].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9555
			^ what
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9556
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9557
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9558
		^ true
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9559
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9560
	]
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9561
    ].
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9562
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9563
    ^ self checkSelectionChangeAllowedWithCompare:false
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9564
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9565
    "Created: 24.11.1995 / 11:03:33 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  9566
    "Modified: 18.8.1997 / 15:42:16 / cg"
253
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9567
!
67448eb25c03 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 251
diff changeset
  9568
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9569
checkSelectionChangeAllowedWithCompare:compareOffered
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9570
    "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
  9571
     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
  9572
     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
  9573
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9574
    |action labels values|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9575
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9576
    codeView modified ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9577
	^ true
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9578
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9579
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9580
    compareOffered ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9581
	labels := #('cancel' 'compare' 'accept' 'continue').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9582
	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
  9583
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9584
	labels := #('cancel' 'accept' 'continue').
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9585
	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
  9586
    ].
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9587
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9588
    action := OptionBox 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9589
		  request:(resources at:'text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9590
		  label:(resources string:'Attention')
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9591
		  form:(WarningBox iconBitmap)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9592
		  buttonLabels:(resources array:labels)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9593
		  values:values
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9594
		  default:true.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9595
    action ~~ #accept ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9596
	^ action
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
  9597
    ].
204
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9598
    codeView accept. 
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9599
    ^ true
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9600
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9601
    "Created: 24.11.1995 / 10:54:46 / cg"
376
1e23e215bf66 copy file for mod-time
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
  9602
    "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
  9603
!
6f4460d5a09d added supersend searches; offer comparing the current version with the
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
  9604
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9605
classHierarchyOf:aClass level:level do:aBlock using:subclassDictionary removeFrom:remainSet
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9606
    "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
  9607
     passing class and nesting level to the block."
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9608
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9609
    |names subclasses|
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9610
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9611
    remainSet remove:aClass ifAbsent:[].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9612
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9613
    aBlock value:aClass value:level.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9614
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9615
    subclasses := subclassDictionary at:aClass ifAbsent:[nil].
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9616
    (subclasses size == 0) ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9617
	names := subclasses collect:[:class | class name].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9618
	names sortWith:subclasses.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9619
	subclasses do:[:aSubClass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9620
	    self classHierarchyOf:aSubClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9621
			    level:(level + 1) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9622
			       do:aBlock 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9623
			    using:subclassDictionary
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9624
		       removeFrom:remainSet
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9625
	]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9626
    ]
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9627
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9628
    "Created: 20.12.1996 / 17:05:06 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9629
    "Modified: 5.1.1997 / 18:45:41 / cg"
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9630
!
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9631
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9632
classHierarchyOf:topClass withAutoloaded:withAutoloaded do:aBlock
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9633
    "evaluate the 2-arg block for every class,
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9634
     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
  9635
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9636
    |classes s subclassDict l remaining allNameSpaces nameSpaceList|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9637
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9638
    classes := IdentitySet new.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9639
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9640
    "/ first, collect the list of classes to consider
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9641
    "/ thats all classes which are in the selected NameSpaces,
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9642
    "/ or private ones, owned by a class which is
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9643
    "/ also all of its superclasses are added.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9644
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9645
    allNameSpaces := (currentNamespace = '* all *').
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9646
    nameSpaceList := self listOfNamespaces.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9647
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9648
    Smalltalk allBehaviorsDo:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9649
	|actualNamespace match owner|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9650
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9651
	aClass isMeta ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9652
	    (aClass isNamespace not
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9653
	    or:[aClass == Smalltalk]) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9654
		match := allNameSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9655
		match ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9656
		    (owner := aClass topOwningClass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9657
			actualNamespace := owner nameSpace
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9658
		    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9659
			actualNamespace := aClass nameSpace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9660
		    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9661
		    match := nameSpaceList includesIdentical:actualNamespace.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9662
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9663
		match ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9664
		    classes addAll:(aClass withAllSuperclasses).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9665
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9666
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9667
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9668
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9669
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9670
    "/ now, generate a dictionary, which associates a set of subclasses
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9671
    "/ to each ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9672
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9673
    subclassDict := IdentityDictionary new:classes size.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9674
    classes do:[:aClass |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9675
	s := aClass superclass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9676
	s notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9677
	    l := subclassDict at:s ifAbsent:[nil].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9678
	    l isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9679
		l := OrderedCollection new:5.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9680
		subclassDict at:s put:l
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9681
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9682
	    l add:aClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9683
	]
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  9684
    ].
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9685
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9686
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9687
    "/ walk this ..
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9688
    "/
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9689
    remaining := classes.
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9690
    self classHierarchyOf:topClass level:0 do:aBlock using:subclassDict removeFrom:remaining.
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9691
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9692
    "/
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9693
    "/ if autoloaded classes are wanted ...
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9694
    "/
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9695
    withAutoloaded ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9696
	(remaining includes:Autoload) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9697
	    self classHierarchyOf:Autoload level:0 do:aBlock using:subclassDict removeFrom:remaining.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9698
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9699
	(remaining asSortedCollection:[:a :b | a name < b name]) do:[:aNilSubclass |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9700
	    aBlock value:aNilSubclass value:0
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9701
	]
900
6fd4cb8c03e9 fixed clasHierarchy walk for subclasses
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
  9702
    ].
575
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  9703
1dc6e1aa6d39 show subclasses hierarchical (spawn subclasses)
Claus Gittinger <cg@exept.de>
parents: 572
diff changeset
  9704
    "Created: 28.5.1996 / 13:46:23 / cg"
910
8121a4d4ab79 speedup class list generation
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
  9705
    "Modified: 5.1.1997 / 18:44:50 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9706
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9707
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9708
classesInFullProtocolHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9709
    "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
  9710
     the hierarchy"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9711
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9712
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9713
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9714
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9715
    aClass withAllSuperclasses do:[:c |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9716
	(classListView isInSelection:index) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9717
	    aBlock value:c
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9718
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9719
	index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9720
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9721
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9722
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9723
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9724
classesInHierarchy:aClass do:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9725
    |index|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9726
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9727
    index := (classListView list size).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9728
    aClass withAllSuperclasses do:[:c |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9729
	(classListView isInSelection:index) ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9730
	    aBlock value:c
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9731
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9732
	index := index - 1
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9733
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9734
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9735
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9736
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9737
compileCode:someCode
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9738
    (ReadStream on:someCode) fileIn
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9739
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9740
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9741
enterBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9742
    "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
  9743
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9744
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9745
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9746
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9747
		enterBoxTitle:(resources string:title) 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9748
		okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9749
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9750
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9751
    sel notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9752
	box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9753
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9754
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9755
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9756
    "Modified: 15.1.1997 / 23:09:11 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9757
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9758
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9759
enterBoxForSearchSelectorTitle:title
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9760
    "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
  9761
     method for browsing based on a selector"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9762
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9763
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9764
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9765
    box := self 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9766
		enterBoxTitle:title 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9767
		okText:'search'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9768
		label:'search selector'.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9769
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9770
    box initialText:(self selectorToSearchFor).
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9771
    ^ box
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9772
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9773
    "Modified: 15.1.1997 / 23:10:26 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9774
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9775
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9776
enterBoxTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9777
    "convenient method: setup enterBox"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9778
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9779
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9780
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9781
    box := EnterBox new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9782
    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
  9783
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9784
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9785
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9786
enterBoxTitle:title okText:okText label:label
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9787
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9788
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9789
    |box|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9790
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9791
    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9792
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9793
    box title:(resources string:title) 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9794
	okText:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9795
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9796
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9797
    "Created: 15.1.1997 / 23:01:04 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9798
    "Modified: 16.1.1997 / 00:26:31 / cg"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9799
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9800
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9801
enterBoxTitle:title okText:okText label:label list:aList
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9802
    "convenient method: setup enterBox"
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9803
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9804
    |box fieldHolder|
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9805
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9806
    fieldHolder := ValueHolder new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9807
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9808
    box := DialogBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9809
    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9810
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9811
    (box addTextLabel:(resources string:title)) adjust:#left.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9812
    box addVerticalSpace.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9813
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9814
    aList isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9815
	box addInputFieldOn:fieldHolder.
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9816
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9817
	(box addComboBoxOn:fieldHolder) list:aList
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9818
    ].
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9819
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9820
    box addVerticalSpace:15.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9821
    box addAbortButton;
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9822
	addOkButtonLabelled:(resources string:okText).
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9823
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  9824
    box aspectAt:#fieldValue put:fieldHolder.
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  9825
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9826
"/    box showAtPointer.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9827
"/
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9828
"/    box := EnterBox new.
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9829
"/    box label:(resources string:label).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9830
"/    box title:(resources string:title) 
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9831
"/        okText:(resources string:okText).
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9832
    ^ box
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9833
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9834
    "Created: 15.1.1997 / 23:01:04 / cg"
966
f15f2ac0a745 nicer category copy;
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
  9835
    "Modified: 16.1.1997 / 20:13:28 / cg"
962
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9836
!
55c72d957f50 more national strings;
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
  9837
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9838
extractClassAndSelectorFromSelectionInto:aBlock
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9839
    "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
  9840
     '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
  9841
    the result."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9842
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9843
    |sel clsName isMeta sep s|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9844
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9845
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9846
    sel notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9847
	sel := sel asString withoutSeparators.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9848
	('*>>*' match:sel) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9849
	    sep := $>
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9850
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9851
	    ('* *' match:sel) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9852
		sep := Character space
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9853
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9854
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9855
	sep notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9856
	    "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9857
	     extract class/sel from selection
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9858
	    "
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9859
	    s := ReadStream on:sel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9860
	    clsName := s upTo:sep.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9861
	    [s peek == sep] whileTrue:[s next].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9862
	    sel := s upToEnd.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9863
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9864
	    (clsName endsWith:' class') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9865
		isMeta := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9866
		clsName := clsName copyWithoutLast:6 "copyTo:(clsName size - 5)"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9867
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9868
		isMeta := false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9869
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9870
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9871
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9872
    aBlock value:clsName value:sel value:isMeta
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9873
634
24a678f81829 Change the name of a classes Metaclass from e.g. "SmallIntegerclass" to
Stefan Vogel <sv@exept.de>
parents: 629
diff changeset
  9874
    "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
  9875
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9876
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9877
findClassNamed:aClassName
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9878
    "search through namespaces for aClassName."
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9879
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9880
    |nm nameSym cls meta|
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9881
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9882
    meta := false.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9883
    nm := aClassName.
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9884
    (nm endsWith:' class') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9885
	meta := true.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9886
	nm := nm copyWithoutLast:6.
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9887
    ].
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9888
    nameSym := nm asSymbol.
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9889
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  9890
    currentNamespace = '* all *' ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9891
	(cls := Smalltalk at:nameSym) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9892
	    meta ifTrue:[^ cls class].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9893
	    ^ cls
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9894
	]
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  9895
    ].
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9896
    self listOfNamespaces do:[:aNamespace |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9897
	(cls := aNamespace at:nameSym) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9898
	    meta ifTrue:[^ cls class].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9899
	    ^ cls
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9900
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9901
    ].
884
4e3796d405bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
  9902
    currentNamespace ~= '* all *' ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9903
	(cls := Smalltalk at:nameSym) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9904
	    meta ifTrue:[^ cls class].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9905
	    ^ cls
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9906
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9907
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9908
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9909
    (nm startsWith:'Smalltalk::') ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9910
	cls := Smalltalk classNamed:(nm copyFrom:'Smalltalk::' size + 1).
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9911
	cls notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9912
	    meta ifTrue:[^ cls class].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9913
	    ^ cls
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9914
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9915
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9916
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9917
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9918
    "Created: 20.12.1996 / 15:39:38 / cg"
985
fde6b90945cc method-list fileOut of class methods
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
  9919
    "Modified: 23.1.1997 / 14:21:00 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9920
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9921
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9922
findClassNamedInNameSpace:aClassName
897
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  9923
    "search through current namespaces for aClassName.
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  9924
     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
  9925
8475fc61998f correctly display private subclasses in other namespaces
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
  9926
    |cls owner|
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9927
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9928
    self listOfNamespaces do:[:aNamespace |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9929
	(cls := aNamespace at:aClassName asSymbol) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9930
	    (owner := cls topOwningClass) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9931
		owner nameSpace == aNamespace ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9932
		    ^ cls
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9933
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9934
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9935
		cls nameSpace == aNamespace ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9936
		    ^ cls
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9937
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9938
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9939
	]
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9940
    ].
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9941
    ^ nil
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9942
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9943
    "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
  9944
    "Modified: 3.1.1997 / 19:30:53 / cg"
882
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9945
!
c355bfd9eb08 added a nameSpace filter
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  9946
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9947
findClassOfVariable:aVariableName accessWith:aSelector
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9948
    "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
  9949
     is defined; 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9950
     needs either #instVarNames or #classVarNames as aSelector."
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9951
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9952
    |cls homeClass list|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9953
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9954
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9955
     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
  9956
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9957
    cls := currentClass.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9958
    [cls notNil] whileTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9959
        aSelector == #classInstVarNames ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9960
            list := cls class instVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9961
        ] ifFalse:[                             
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9962
            list := cls perform:aSelector
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9963
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9964
        (list includes:aVariableName) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9965
            homeClass := cls.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9966
            cls := nil.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9967
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9968
            cls := cls superclass
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9969
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9970
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9971
    homeClass isNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9972
        "nope, must be one below ... (could optimize a bit, by searching down
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9973
         for the declaring class ...
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9974
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9975
        homeClass := currentClass
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9976
    ] ifFalse:[
552
c61c0758c10b showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 547
diff changeset
  9977
"/        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
  9978
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9979
    ^ homeClass
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9980
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
  9981
    "Modified: / 25.10.1997 / 20:26:25 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9982
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
  9983
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9984
hideMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9985
    classCategoryListView isNil ifTrue:[
1373
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
  9986
        classListView notNil ifTrue:[
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
  9987
	    methodCategoryListView superView extent:0.0 @ 1.0.
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
  9988
	    methodListView superView origin:0.33 @ 0.0 extent:0.67 @ 1.0.
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
  9989
	].
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
  9990
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9991
    ].
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9992
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9993
    methodCategoryListView superView extent:0.0 @ 1.0.
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9994
    methodListView superView origin:0.5 @ 0.0 extent:0.5 @ 1.0.
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9995
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9996
    "Created: 30.7.1997 / 17:50:27 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9997
    "Modified: 30.7.1997 / 18:00:02 / cg"
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9998
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
  9999
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10000
listBoxForCodeSelectionTitle:title okText:okText
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10001
    "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
 10002
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10003
    |sel box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10004
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10005
    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
 10006
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10007
    sel notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10008
	box initialText:(sel asString withoutSeparators)
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10009
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10010
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10011
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10012
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10013
listBoxTitle:title okText:okText list:aList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10014
    "convenient method: setup a listBox & return it"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10015
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10016
    |box|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10017
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10018
    box := ListSelectionBox 
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10019
		title:(resources string:title)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10020
		okText:(resources string:okText)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10021
		action:nil.
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10022
    box list:aList.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10023
    ^ box
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10024
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10025
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10026
normalLabel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10027
    "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
 10028
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10029
    |l il|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10030
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10031
    myLabel notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10032
	"if I have been given an explicit label,
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10033
	 and its not the default, take that one"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10034
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10035
	myLabel ~= 'System Browser' ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10036
	    l := il := myLabel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10037
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10038
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10039
    l isNil ifTrue:[    
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10040
	l := resources string:'System Browser'.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10041
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10042
	currentClass notNil ifTrue:[
902
6aa43ef227c3 delayed update;
Claus Gittinger <cg@exept.de>
parents: 900
diff changeset
 10043
"/            l := l, ': ', currentClass name.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10044
	    l := self displayedClassNameOf:currentClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10045
	    classListView isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10046
		currentSelector notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10047
		    l := l , ' ' ,  currentSelector
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10048
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10049
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10050
		currentClass isLoaded ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10051
		    l := l , ' (unloaded)'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10052
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10053
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10054
	    il := currentClass nameWithoutPrefix
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10055
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10056
	    il := l.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10057
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10058
    ].
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 10059
    self topView label:l.
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 10060
    self topView iconLabel:il.
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 10061
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 10062
    "Modified: 18.8.1997 / 15:19:36 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10063
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10064
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
 10065
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
 10066
    |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
 10067
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
 10068
    currentClass notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10069
	cls := currentClass.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10070
	cls isMeta ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10071
	    meta := cls.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10072
	    cls := meta soleInstance
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10073
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10074
	    meta := cls class
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10075
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10076
	cls removeDependent:self.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10077
	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
 10078
    ].
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
 10079
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
 10080
    "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
 10081
!
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
 10082
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10083
selectorToSearchFor
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10084
    "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
 10085
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10086
    |sel t|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10087
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10088
    sel := codeView selection.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10089
    sel notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10090
	sel := sel asString.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10091
	t := Parser selectorInExpression:sel.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10092
	t notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10093
	    sel := t
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10094
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10095
	sel := sel withoutSpaces.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10096
	sel == #>> ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10097
	    "oops - thats probably not what we want here ..."
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10098
	    self extractClassAndSelectorFromSelectionInto:[:c :s :m |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10099
		sel := s
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10100
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10101
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10102
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10103
	methodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10104
	    methodListView selection notNil ifTrue:[
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10105
sel := selectorList at:(methodListView selection).
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10106
"/                sel := methodListView selectionValue string
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10107
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10108
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10109
	    classMethodListView notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10110
		classMethodListView selection notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10111
		    sel := classMethodListView selectionValue string.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10112
		].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10113
		sel notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10114
		    sel := self selectorFromClassMethodString:sel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10115
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10116
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10117
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10118
	sel notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10119
	    sel := sel withoutSpaces upTo:(Character space)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10120
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10121
	    sel := ''
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10122
	]
606
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 10123
    ].
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 10124
    ^ sel string
b2d60c276bde care for Text in lists (implementors & senders)
Claus Gittinger <cg@exept.de>
parents: 599
diff changeset
 10125
1259
09357f451ee3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1258
diff changeset
 10126
    "Modified: 30.7.1997 / 15:30:10 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10127
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10128
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10129
setAcceptAndExplainActionsForMethod
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10130
    "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
 10131
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10132
    codeView acceptAction:[:theCode |
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10133
        |cat cls rslt|
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10134
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10135
        fullProtocol ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10136
            cls := acceptClass 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10137
        ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10138
        cls isNil ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10139
            cls := actualClass.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10140
            cls isNil ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10141
                self warning:'oops class is gone; reselect and try again'.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10142
                ^ self
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10143
            ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10144
        ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10145
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10146
        codeView cursor:Cursor execute.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10147
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10148
        (cat := currentMethodCategory) = '* all *' ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10149
            "must check from which category this code came from ...
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10150
             ... thanks to Arno for pointing this out"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10151
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10152
            cat := self askForMethodCategory.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10153
        ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10154
        (cat notNil and:[cat notEmpty]) ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10155
            Object abortSignal catch:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10156
                lockUpdates := true.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10157
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10158
                Class methodRedefinitionSignal handle:[:ex |
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10159
                    |answer oldVsNew oldPkg newPkg|
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10160
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10161
                    oldVsNew := ex parameter.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10162
                    oldPkg := oldVsNew key package.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10163
                    newPkg := oldVsNew value package.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10164
                    answer := OptionBox 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10165
                                  request: 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10166
('You are about to change code from another (system-) package.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10167
The methods original packageID was ''%1''. 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10168
If you proceed, the new code will be marked as belonging
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10169
to the ''%2'' package (and this warning will not be shown again).
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10170
If you proceed with ''keep'', the old packageID will be preserved.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10171
Otherwise, hit ''cancel'' to leave the code unchanged.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10172
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10173
PS: you can disable these checks in the launchers settings-compilation dialog.' bindWith:oldPkg with:newPkg)
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10174
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10175
                                  label:'Method redefinition'
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10176
                                  form:(WarningBox iconBitmap)
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10177
                                  buttonLabels:#('cancel' 'keep' 'continue')
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10178
                                  values:#(#cancel #keep #continue)
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10179
                                  default:#continue.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10180
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10181
                    (answer ~~ #cancel) ifTrue:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10182
                        ex proceedWith:answer
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10183
                    ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10184
                ] do:[
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10185
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10186
                    rslt := actualClass compilerClass 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10187
                        compile:theCode asString
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10188
                        forClass:cls
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10189
                        inCategory:cat 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10190
                        notifying:codeView.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10191
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10192
                    codeView modified:false.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10193
                    currentMethod := actualClass compiledMethodAt:currentSelector.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10194
                    self updateMethodListWithScroll:false keepSelection:(rslt == currentMethod).
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10195
                    self normalLabel.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10196
                ]
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10197
            ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10198
            lockUpdates := false.
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10199
        ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10200
        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
 10201
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10202
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10203
    codeView explainAction:[:theCode :theSelection |
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10204
        self showExplanation:(Explainer 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10205
                                explain:theSelection 
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10206
                                in:theCode
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10207
                                forClass:actualClass)
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10208
    ].
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10209
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10210
    "Modified: / 29.10.1997 / 15:48:35 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10211
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10212
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10213
setDoitActionForClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10214
    "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
 10215
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10216
    "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
 10217
     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
 10218
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10219
    codeView doItAction:[:theCode |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10220
	|compiler ns|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10221
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10222
	currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10223
	    ns := currentClass nameSpace
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10224
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10225
	    ns := nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10226
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10227
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10228
	Class nameSpaceQuerySignal handle:[:ex |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10229
	    ns isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10230
		ex reject
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10231
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10232
	    ex proceedWith:ns
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10233
	] do:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10234
	    currentClass isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10235
		compiler := Compiler
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10236
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10237
		compiler := currentClass evaluatorClass
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10238
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10239
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10240
	    compiler 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10241
		evaluate:theCode 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10242
		in:nil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10243
		receiver:currentClass 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10244
		notifying:codeView 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10245
		logged:false
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10246
		ifFail:nil 
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10247
	]
1029
ad46ca1ccd38 set nameSpace for doIt's to currentClasses ns.
Claus Gittinger <cg@exept.de>
parents: 1015
diff changeset
 10248
    ].
ad46ca1ccd38 set nameSpace for doIt's to currentClasses ns.
Claus Gittinger <cg@exept.de>
parents: 1015
diff changeset
 10249
ad46ca1ccd38 set nameSpace for doIt's to currentClasses ns.
Claus Gittinger <cg@exept.de>
parents: 1015
diff changeset
 10250
    "Modified: 10.2.1997 / 14:17:15 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10251
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10252
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10253
setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10254
    codeView setSearchPattern:aString
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10255
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10256
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10257
showExplanation:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10258
    "show explanation from Parser"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10259
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10260
    self information:someText
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10261
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10262
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 10263
showMethodCategoryList
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 10264
    classCategoryListView isNil ifTrue:[
1373
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
 10265
        classListView notNil ifTrue:[
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
 10266
	    methodCategoryListView superView extent:0.33 @ 1.0.
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
 10267
	    methodListView superView origin:0.66 @ 0.0 extent:0.34 @ 1.0.
1afad5696aa8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1369
diff changeset
 10268
	].
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10269
	^ self.
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 10270
    ].
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 10271
    methodCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10272
	methodCategoryListView superView extent:0.25 @ 1.0.
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 10273
    ].
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 10274
    methodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10275
	methodListView superView origin:0.75 @ 0.0 extent:0.25 @ 1.0.
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 10276
    ].
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 10277
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 10278
    "Created: 30.7.1997 / 17:50:20 / cg"
1290
e4354da51252 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1288
diff changeset
 10279
    "Modified: 16.8.1997 / 03:28:23 / cg"
1260
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 10280
!
856e6e5b2668 more support for alien classes.
Claus Gittinger <cg@exept.de>
parents: 1259
diff changeset
 10281
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10282
stringToSearchFor
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10283
    "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
 10284
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10285
    |sel|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10286
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10287
    sel := codeView selection.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10288
    sel notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10289
	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
 10290
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10291
	sel isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10292
	    currentClass notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10293
		sel := currentClass name
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10294
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10295
	].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10296
	sel notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10297
	    sel := sel withoutSpaces
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10298
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10299
	    sel := ''
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10300
	]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10301
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10302
    ^ sel
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10303
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10304
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10305
warnLabel:what
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10306
    "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
 10307
1291
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 10308
    self topView label:('System Browser WARNING: ' , what)
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 10309
6ea3207c5f5e prepare for being subclass of simpleView
Claus Gittinger <cg@exept.de>
parents: 1290
diff changeset
 10310
    "Modified: 18.8.1997 / 15:19:56 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10311
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10312
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10313
withBusyCursorDo:aBlock
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10314
    ^ self topView withWaitCursorDo:aBlock
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10315
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10316
    "Created: 18.8.1997 / 15:41:52 / cg"
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10317
!
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10318
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10319
withSearchCursorDo:aBlock
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10320
    ^ self topView withCursor:(Cursor questionMark) do:aBlock
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10321
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10322
    "Created: 23.11.1995 / 14:11:14 / cg"
1292
7e1f3a7c65ab central busyCursor handling
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
 10323
    "Modified: 18.8.1997 / 15:40:19 / cg"
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10324
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10325
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10326
!BrowserView methodsFor:'private - defaults'!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10327
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10328
canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10329
    "answer an icon to mark canvas (windowSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10330
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10331
    ^ self class canvasIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10332
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10333
    "Modified: / 7.4.1997 / 17:31:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10334
    "Created: / 26.10.1997 / 16:25:54 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10335
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10336
1269
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10337
commentEmphasis
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10338
    ^ (#color -> (Color red:0 green:0 blue:25))
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10339
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10340
    "Created: 1.8.1997 / 12:36:14 / cg"
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10341
!
122015faaba9 nicer colors ;-)
Claus Gittinger <cg@exept.de>
parents: 1268
diff changeset
 10342
1360
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10343
fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10344
    "answer an icon to mark fileImage methods"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10345
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10346
    ^ self class fileImageIcon
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10347
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10348
    "Modified: / 7.4.1997 / 17:31:40 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10349
    "Created: / 29.10.1997 / 03:32:05 / cg"
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10350
!
4943d5582937 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1355
diff changeset
 10351
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10352
imageIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10353
    "answer an icon to mark image methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10354
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10355
    ^ self class imageIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10356
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10357
    "Modified: / 7.4.1997 / 17:31:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10358
    "Created: / 28.10.1997 / 13:35:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10359
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10360
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10361
menuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10362
    "answer an icon to mark menu (menuSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10363
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10364
    ^ self class menuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10365
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10366
    "Modified: / 7.4.1997 / 17:31:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10367
    "Created: / 27.10.1997 / 00:41:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10368
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10369
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10370
programMenuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10371
    "answer an icon to mark programmed-menu (menuSpec) methods"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10372
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10373
    ^ self class programMenuIcon
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10374
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10375
    "Modified: / 7.4.1997 / 17:31:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10376
    "Created: / 28.10.1997 / 13:35:16 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10377
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10378
1134
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10379
stopIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10380
    "answer an icon to mark breakPointed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10381
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10382
    ^ self class stopIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10383
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10384
    "Modified: 7.4.1997 / 17:31:40 / cg"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10385
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10386
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10387
timeIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10388
    "answer an icon to mark timed methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10389
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10390
    ^ self class timeIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10391
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10392
    "Modified: 7.4.1997 / 17:31:40 / cg"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10393
    "Created: 11.4.1997 / 17:02:55 / cg"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10394
!
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10395
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10396
traceIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10397
    "answer an icon to mark traced methods"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10398
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10399
    ^ self class traceIcon
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10400
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10401
    "Modified: 7.4.1997 / 17:32:14 / cg"
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10402
! !
6b310d81b83e nice timed-method icon
Claus Gittinger <cg@exept.de>
parents: 1126
diff changeset
 10403
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10404
!BrowserView methodsFor:'unused'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10405
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10406
listOfAllMethodCategoriesInHierarchy:aClass
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10407
    "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
 10408
     and all of its superclasses"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10409
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10410
    |newList cat|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10411
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10412
    newList := Set new.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10413
    self classesInHierarchy:aClass do:[:c |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10414
	c methodDictionary do:[:aMethod |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10415
	    cat := aMethod category.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10416
	    cat isNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10417
		cat := '* no category *'
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10418
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10419
	    newList add:cat
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10420
	]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10421
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10422
    (newList size == 0) ifTrue:[^ nil].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10423
    newList add:'* all *'.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10424
    ^ newList asOrderedCollection sort
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10425
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10426
    "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
 10427
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10428
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10429
listOfAllSelectorsInCategory:aCategory inHierarchyOfClass:aClass
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10430
    "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
 10431
     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
 10432
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10433
    |newList|
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10434
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10435
    newList := Set new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10436
    self classesInHierarchy:aClass do:[:c |
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10437
	|searchCategory|
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10438
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10439
	(aCategory = '* all *') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10440
	    newList addAll:(c methodDictionary keys)
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10441
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10442
	    (aCategory = '* no category *') ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10443
		searchCategory := nil
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10444
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10445
		searchCategory := aCategory
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10446
	    ].
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10447
	    c methodDictionary keysAndValuesDo:[:selector :aMethod |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10448
		(aMethod category = searchCategory) ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10449
		    newList add:selector
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10450
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10451
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10452
	].
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10453
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10454
    (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
 10455
    ^ newList asOrderedCollection sort
620
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10456
3ce270dbff3b Use methodDictionary instead of selector/method arrays.
Stefan Vogel <sv@exept.de>
parents: 611
diff changeset
 10457
    "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
 10458
! !
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10459
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10460
!BrowserView methodsFor:'variable list menu'!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10461
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10462
allClassInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10463
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10464
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10465
    self allVarRefsTitle:'class instance variable to browse all modifications of:' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10466
                  access:#classInstVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10467
                    mods:true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10468
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10469
    "Modified: / 25.10.1997 / 20:19:49 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10470
    "Created: / 25.10.1997 / 20:21:48 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10471
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10472
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10473
allClassInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10474
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10475
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10476
    self allVarRefsTitle:'class instance variable to browse all references to:' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10477
                  access:#classInstVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10478
                    mods:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10479
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10480
    "Modified: / 25.10.1997 / 20:20:09 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10481
    "Created: / 25.10.1997 / 20:22:14 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10482
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10483
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10484
allClassVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10485
    "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
 10486
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10487
    self allVarRefsTitle:'class variable to browse all modifications of:' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10488
                  access:#classVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10489
                    mods:true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10490
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10491
    "Modified: / 25.10.1997 / 20:22:24 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10492
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10493
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10494
allClassVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10495
    "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
 10496
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10497
    self allVarRefsTitle:'class variable to browse all references to:' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10498
                  access:#classVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10499
                    mods:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10500
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10501
    "Modified: / 25.10.1997 / 20:22:30 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10502
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10503
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10504
allInstVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10505
    "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
 10506
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10507
    self allVarRefsTitle:'instance variable to browse all modifications of:' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10508
                  access:#instVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10509
                    mods:true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10510
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10511
    "Modified: / 25.10.1997 / 20:22:35 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10512
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10513
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10514
allInstVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10515
    "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
 10516
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10517
    self allVarRefsTitle:'instance variable to browse all references to:' 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10518
                  access:#instVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10519
                    mods:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10520
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10521
    "Modified: / 25.10.1997 / 20:22:40 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10522
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10523
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10524
allVarRefsTitle:title access:access mods:modifications
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10525
    "show an enterbox for instVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10526
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10527
    self doClassMenu:[:currentClass |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10528
        |box|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10529
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10530
        box := self enterBoxForVariableSearch:title.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10531
        box action:[:aVariableName |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10532
            |homeClass|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10533
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10534
            aVariableName isEmpty ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10535
                self withSearchCursorDo:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10536
                    homeClass := self findClassOfVariable:aVariableName accessWith:access.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10537
                    access == #classVarNames ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10538
                        SystemBrowser 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10539
                            browseClassRefsTo:aVariableName 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10540
                            under:homeClass 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10541
                            modificationsOnly:modifications
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10542
                    ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10543
                        access == #classInstVarNames ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10544
                            SystemBrowser 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10545
                                browseInstRefsTo:aVariableName 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10546
                                under:homeClass class
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10547
                                modificationsOnly:modifications
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10548
                        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10549
                            SystemBrowser 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10550
                                browseInstRefsTo:aVariableName 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10551
                                under:homeClass 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10552
                                modificationsOnly:modifications
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10553
                        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10554
                     ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10555
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10556
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10557
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10558
        box showAtPointer
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10559
    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10560
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10561
    "Created: / 25.10.1997 / 20:19:26 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10562
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10563
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10564
classInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10565
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10566
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10567
    self varRefsOrModsTitle:'class instance variable to browse modifications of:'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10568
                     access:#classInstVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10569
                       mods:true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10570
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10571
    "Modified: / 25.10.1997 / 20:17:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10572
    "Created: / 25.10.1997 / 20:21:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10573
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10574
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10575
classInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10576
    "show an enterbox for classVar to search for"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10577
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10578
    self varRefsOrModsTitle:'class instance variable to browse references to:'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10579
                     access:#classInstVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10580
                       mods:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10581
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10582
    "Modified: / 25.10.1997 / 20:17:23 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10583
    "Created: / 25.10.1997 / 20:21:19 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10584
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10585
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10586
classVarMods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10587
    "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
 10588
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10589
    self varRefsOrModsTitle:'class variable to browse modifications of:'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10590
                     access:#classVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10591
                       mods:true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10592
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10593
    "Modified: / 25.10.1997 / 20:17:41 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10594
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10595
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10596
classVarRefs
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10597
    "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
 10598
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10599
    self varRefsOrModsTitle:'class variable to browse references to:'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10600
                     access:#classVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10601
                       mods:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10602
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10603
    "Modified: / 25.10.1997 / 20:17:23 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10604
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10605
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10606
enterBoxForVariableSearch:title
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10607
    |box sel|
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10608
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10609
    box := self enterBoxForCodeSelectionTitle:title okText:'browse'.
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10610
    variableListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10611
	codeView hasSelection ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10612
	    (sel := variableListView selectionValue) notNil ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10613
		(sel startsWith:'---') ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10614
		    box initialText:sel
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10615
		]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10616
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10617
	]
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10618
    ].
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10619
    ^ box
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10620
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10621
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10622
instVarMods
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10623
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10624
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10625
    self varRefsOrModsTitle:'instance variable to browse modifications of:'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10626
                     access:#instVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10627
                       mods:true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10628
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10629
    "Modified: / 25.10.1997 / 20:14:52 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10630
!
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10631
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10632
instVarRefs
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10633
    "show an enterbox for instVar to search for"
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10634
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10635
    self varRefsOrModsTitle:'instance variable to browse references to:'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10636
                     access:#instVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10637
                       mods:false
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10638
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10639
    "Modified: / 25.10.1997 / 20:14:27 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10640
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10641
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10642
showClassInstVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10643
    classInstVarsInVarList := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10644
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10645
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10646
    "Created: / 25.10.1997 / 19:43:04 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10647
    "Modified: / 25.10.1997 / 19:43:41 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10648
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10649
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10650
showClassVars
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10651
    classInstVarsInVarList := false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10652
    self updateVariableList.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10653
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10654
    "Created: / 25.10.1997 / 19:42:55 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10655
    "Modified: / 25.10.1997 / 19:43:35 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10656
!
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10657
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10658
varRefsOrModsTitle:title access:accessor mods:mods
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10659
    "show an enterbox for instvar to search for"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10660
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10661
    self doClassMenu:[:currentClass |
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10662
        |box|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10663
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10664
        box := self enterBoxForVariableSearch:title.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10665
        box action:[:aString |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10666
            aString notEmpty ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10667
                self withSearchCursorDo:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10668
                    |sel classes|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10669
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10670
                    sel := #'browseInstRefsTo:in:modificationsOnly:'.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10671
                    accessor == #classInstVarNames ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10672
                        classes := Array with:currentClass class.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10673
                    ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10674
                        classes := Array with:currentClass.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10675
                        accessor == #classVarNames ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10676
                            sel := #'browseClassRefsTo:in:modificationsOnly:'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10677
                        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10678
                    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10679
                    SystemBrowser perform:sel with:aString with:classes with:mods 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10680
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10681
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10682
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10683
        box showAtPointer
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10684
    ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10685
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10686
    "Created: / 25.10.1997 / 20:12:52 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10687
    "Modified: / 25.10.1997 / 21:10:34 / cg"
93
claus
parents: 92
diff changeset
 10688
!
claus
parents: 92
diff changeset
 10689
claus
parents: 92
diff changeset
 10690
varTypeInfo
claus
parents: 92
diff changeset
 10691
    "show typical usage of a variable"
claus
parents: 92
diff changeset
 10692
claus
parents: 92
diff changeset
 10693
    |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
 10694
     searchClass s|
93
claus
parents: 92
diff changeset
 10695
claus
parents: 92
diff changeset
 10696
    name := variableListView selectionValue.
claus
parents: 92
diff changeset
 10697
    name isNil ifTrue:[^ self].
claus
parents: 92
diff changeset
 10698
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10699
    (classInstVarsInVarList or:[showInstance]) ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10700
        searchClass := currentClass whichClassDefinesClassVar:name.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10701
        value := searchClass classVarAt:(name asSymbol).
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10702
        s := value displayString.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10703
        s size > 60 ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10704
            s := (s copyTo:60) , ' ...'
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10705
        ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10706
        msg := name , ' is (currently):\\' , s.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10707
        s ~= value classNameWithArticle ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10708
            msg := msg , '\\(' , value class name , ')'
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10709
        ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10710
    ] ifTrue:[        
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10711
        searchClass := actualClass whichClassDefinesInstVar:name.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10712
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10713
        idx := searchClass instVarOffsetOf:name.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10714
        idx isNil ifTrue:[^ self].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10715
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10716
        classes := IdentitySet new.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10717
        values := IdentitySet new.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10718
        instCount := 0.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10719
        subInstCount := 0.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10720
        searchClass allSubInstancesDo:[:i |
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10721
            |val|
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10722
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10723
            val := i instVarAt:idx.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10724
            val notNil ifTrue:[values add:val].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10725
            classes add:val class.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10726
            (i isMemberOf:searchClass) ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10727
                instCount := instCount + 1.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10728
            ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10729
                subInstCount := subInstCount + 1
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10730
            ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10731
        ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10732
        (instCount == 0 and:[subInstCount == 0]) ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10733
            self warn:'there are currently no instances of ' , currentClass name.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10734
            ^ self
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10735
        ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10736
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10737
        instCount ~~ 0 ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10738
            msg := 'in (currently: ' , instCount printString,') instances '.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10739
            subInstCount ~~ 0 ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10740
                msg := msg , 'and '
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10741
            ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10742
        ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10743
            msg := 'in '.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10744
        ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10745
        subInstCount ~~ 0 ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10746
            msg := msg , '(currently: ' , subInstCount printString, ') derived instances '
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10747
        ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10748
        msg := msg, 'of ' , searchClass name , ',\'.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10749
        msg := msg , name , ' '.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10750
        ((values size == 1) 
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10751
        or:[classes size == 1 and:[classes first == UndefinedObject]]) ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10752
            values size == 1 ifTrue:[value := values first].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10753
            (value isNumber or:[value isString]) ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10754
                msg := msg , 'is always the same:\\      ' , 
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10755
                             value class name , ' (' , value storeString , ')'.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10756
            ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10757
                (value isNil or:[value == true or:[value == false]]) ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10758
                    msg := msg , 'is always:\\      ' , 
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10759
                                 value printString.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10760
                ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10761
                    msg := msg , 'is always the same:\\'.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10762
                    msg := msg , '      ' , value class name.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10763
                    value isLiteral ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10764
                        msg := msg , ' (' , value storeString , ')'
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10765
                    ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10766
                ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10767
            ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10768
        ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10769
            classes size == 1 ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10770
                msg := msg , 'is always:\\'.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10771
                msg := msg , '      ' , classes first name , '\'.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10772
            ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10773
                msg := msg , 'is one of:\\'.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10774
                classes := classes asOrderedCollection.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10775
                classes size > 20 ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10776
                    classes := classes copyFrom:1 to:20.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10777
                    cut := true
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10778
                ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10779
                    cut := false.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10780
                ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10781
                names := classes collect:[:cls |
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10782
                    |nm|
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10783
                    cls == UndefinedObject ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10784
                        'nil'
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10785
                    ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10786
                        cls == True ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10787
                            'true'
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10788
                        ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10789
                            cls == False ifTrue:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10790
                                'false'
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10791
                            ] ifFalse:[
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10792
                                cls name
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10793
                            ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10794
                        ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10795
                    ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10796
                ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10797
                names sort.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10798
                names do:[:nm |
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10799
                    msg := msg , '      ' , nm , '\'.
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10800
                ].
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10801
            ]
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10802
        ].
93
claus
parents: 92
diff changeset
 10803
    ].
claus
parents: 92
diff changeset
 10804
claus
parents: 92
diff changeset
 10805
    box := InfoBox title:msg withCRs.
claus
parents: 92
diff changeset
 10806
    box label:'variable type information'.
claus
parents: 92
diff changeset
 10807
    box showAtPointer
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 10808
1390
cf8116e88410 fixed classInstVar typeInfo
Claus Gittinger <cg@exept.de>
parents: 1389
diff changeset
 10809
    "Modified: / 3.1.1998 / 14:50:00 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10810
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10811
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10812
variableListMenu
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10813
    <resource: #programMenu >
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10814
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 10815
    |labels selectors m|
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10816
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10817
    currentClass isNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10818
        variableListView flash.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10819
        ^ nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10820
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10821
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10822
    showInstance ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10823
        labels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10824
                    'class instvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10825
                    'class instvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10826
                    'classvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10827
                    'classvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10828
                    '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10829
                    'all class instvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10830
                    'all class instvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10831
                    'all classvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10832
                    'all classvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10833
                   ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10834
        selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10835
                    classInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10836
                    classInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10837
                    classVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10838
                    classVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10839
                    nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10840
                    allClassInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10841
                    allClassInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10842
                    allClassVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10843
                    allClassVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10844
                     ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10845
    ] ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10846
        labels := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10847
                    'instvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10848
                    'instvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10849
                    'classvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10850
                    'classvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10851
                    '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10852
                    'all instvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10853
                    'all classvar refs ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10854
                    'all instvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10855
                    'all classvar mods ...'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10856
                   ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10857
        selectors := #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10858
                    instVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10859
                    instVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10860
                    classVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10861
                    classVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10862
                    nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10863
                    allInstVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10864
                    allClassVarRefs
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10865
                    allInstVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10866
                    allClassVarMods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10867
                     ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10868
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10869
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10870
    showInstance ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10871
        classInstVarsInVarList == true ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10872
            labels := labels , #('-' 'show classVars').
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10873
            selectors := selectors , #(nil #showClassVars).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10874
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10875
            labels := labels , #('-' 'show classInstVars').
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10876
            selectors := selectors , #(nil #showClassInstVars).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10877
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10878
    ].
285
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 10879
8a64105d4ba0 typeinfo also for classVariables
Claus Gittinger <cg@exept.de>
parents: 284
diff changeset
 10880
    ("showInstance and:[" variableListView hasSelection "]" ) ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10881
        labels := labels , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10882
                                '-'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10883
                                'type information'
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10884
                           ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10885
        selectors := selectors , #(
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10886
                                nil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10887
                                varTypeInfo
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10888
                                ).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10889
    ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10890
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10891
    m := PopUpMenu 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10892
                labels:(resources array:labels)
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10893
                selectors:selectors.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10894
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10895
    currentClass instSize == 0 ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10896
        m disableAll:#(instVarRefs instVarMods).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10897
        currentClass subclasses size == 0 ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10898
            m disableAll:#(allInstVarRefs allInstVarMods).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10899
        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10900
    ].
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 10901
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 10902
    currentClass isLoaded ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10903
        m disableAll
894
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 10904
    ].
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 10905
    ^ m
8efe0f142f40 keep class when switching namespaces
Claus Gittinger <cg@exept.de>
parents: 892
diff changeset
 10906
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 10907
    "Modified: / 27.10.1997 / 20:45:17 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10908
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10909
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10910
variableSelection:lineNr
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10911
    "variable selection changed"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10912
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10913
    |name idx|
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10914
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10915
    name := variableListView selectionValue.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10916
    name isNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10917
	self unhilightMethodCategories.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10918
	self unhilightMethods.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10919
	self autoSearch:nil.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10920
	^ self
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10921
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10922
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10923
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10924
     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
 10925
     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
 10926
     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
 10927
    "
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10928
    idx := variableListView list findLast:[:entry | entry = name].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10929
    idx ~~ lineNr ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10930
	"select it - user will see whats going on"
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10931
	variableListView setSelection:idx
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10932
    ].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10933
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10934
    "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
 10935
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10936
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10937
    self hilightMethodsInMethodCategoryList:true inMethodList:true.
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10938
    self autoSearch:name.
561
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 10939
a2e208a1f0d2 #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 559
diff changeset
 10940
    "Modified: 25.5.1996 / 12:26:07 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10941
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 10942
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10943
!BrowserView methodsFor:'variable stuff'!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10944
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10945
hilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10946
    "helper; given a list itme, highlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10947
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10948
    |e|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10949
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10950
    methodCategoryListView font bold ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10951
	"/ already bold; use different color then
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10952
	methodCategoryListView foregroundColor brightness > 0.5 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10953
	    methodCategoryListView backgroundColor brightness < 0.25 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10954
		e := #color->Color blue
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10955
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10956
		e := #color->Color black
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10957
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10958
	] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10959
	    methodCategoryListView backgroundColor brightness > 0.75 ifTrue:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10960
		e := #color->Color red darkened
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10961
	    ] ifFalse:[
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10962
		e := #color->Color white.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10963
	    ]
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10964
	]
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10965
    ] ifFalse:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10966
	e := #bold.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10967
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10968
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10969
    entry isString ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 10970
	^ entry asText emphasizeAllWith:e.
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10971
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10972
    ^ 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
 10973
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10974
    "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
 10975
    "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
 10976
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 10977
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10978
hilightMethodsInMethodCategoryList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10979
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10980
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10981
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10982
    self hilightMethodsInMethodCategoryList:true inMethodList:false
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 10983
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10984
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10985
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10986
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10987
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10988
hilightMethodsInMethodCategoryList:inCat inMethodList:inMethods 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10989
    "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
 10990
     variable, and highlight them"
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10991
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 10992
    |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
 10993
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10994
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10995
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10996
    inCat ifTrue:[self unhilightMethodCategories].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10997
    inMethods ifTrue:[self unhilightMethods].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10998
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 10999
    actualClass isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11000
    (methodCategoryListView isNil 
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11001
    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
 11002
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11003
    name := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11004
    name isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11005
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11006
    self withSearchCursorDo:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11007
        |classes filter any supers|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11008
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11009
        classes := Array with:actualClass.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11010
        (currentClassHierarchy notNil and:[fullProtocol]) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11011
            supers := actualClass allSuperclasses.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11012
            supers notNil ifTrue:[    
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11013
                classes := classes , supers.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11014
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11015
            redefinedSelectors := IdentitySet new.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11016
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11017
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11018
        filter := SystemBrowser 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11019
                        filterToSearchRefsTo:name 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11020
                        classVars:(showInstance not and:[classInstVarsInVarList ~~ true]) 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11021
                        modificationsOnly:false. 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11022
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11023
        methodListView notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11024
            methodList := methodListView list.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11025
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11026
        methodCategoryListView notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11027
            methodCategoryList := methodCategoryListView list.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11028
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11029
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11030
        any := false.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11031
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11032
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11033
         highlight the method that ref this variable
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11034
        "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11035
        classes do:[:someClass |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11036
            (fullProtocol
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11037
            and:[classListView valueIsInSelection:(someClass name)]) ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11038
                someClass methodDictionary keysAndValuesDo:[:selector :method |
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11039
                    (inCat
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11040
                    or:[methodList notNil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11041
                        and:[methodList includes:selector]])
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11042
                    ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11043
                        (redefinedSelectors isNil
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11044
                        or:[(redefinedSelectors includes:selector) not])
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11045
                       ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11046
                           (filter value:someClass value:method value:selector) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11047
                               |idx cat|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11048
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11049
                               (inCat
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11050
                               and:[methodCategoryList notNil]) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11051
                                   cat := method category.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11052
                                   "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11053
                                    highlight the methodCategory
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11054
                                   "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11055
                                   idx := methodCategoryListView list indexOf:cat.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11056
                                   idx ~~ 0 ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11057
                                        entry := methodCategoryListView at:idx.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11058
                                        entry := self hilightEntryFor:entry.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11059
                                        methodCategoryListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11060
"/                                       methodCategoryListView attributeAt:idx put:#bold.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11061
                                   ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11062
                               ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11063
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11064
                               (inMethods
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11065
                               and:[methodList notNil]) ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11066
                                   "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11067
                                    highlight the method
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11068
                                   "
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11069
                                   idx := methodListView list 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11070
                                                findFirst:[:item | item string = selector
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11071
                                                                   or:[item string startsWith:(selector , ' ')]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11072
                                                          ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11073
                                   idx ~~ 0 ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11074
                                        entry := methodListView at:idx.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11075
                                        entry := self hilightEntryFor:entry.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11076
                                        methodListView at:idx put:entry
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11077
"/                                        methodListView attributeAt:idx put:#bold.
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11078
                                   ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11079
                                   any := true
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11080
                               ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11081
                           ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11082
                           redefinedSelectors notNil ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11083
                               redefinedSelectors add:selector
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11084
                           ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11085
                        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11086
                    ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11087
                ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11088
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11089
        ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11090
        any ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11091
            self setSearchPattern:name
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11092
        ]
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11093
    ]
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11094
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11095
    "Created: / 23.11.1995 / 14:12:08 / cg"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11096
    "Modified: / 5.6.1996 / 11:38:19 / stefan"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11097
    "Modified: / 25.10.1997 / 21:02:47 / cg"
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11098
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11099
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11100
hilightMethodsInMethodList
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11101
    "search for methods  which access the selected
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11102
     variable, and highlight them"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11103
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11104
    self hilightMethodsInMethodCategoryList:false inMethodList:true 
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11105
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11106
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11107
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11108
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11109
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11110
unhilightEntryFor:entry
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11111
    "helper; given a list itme, unhighlight it"
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11112
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11113
    entry isString ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11114
	^ entry string
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11115
    ].
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11116
    ^ entry copy string:(entry string)
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11117
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11118
    "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
 11119
!
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11120
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11121
unhilightMethodCategories
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11122
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11123
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11124
    |list entry sz "{ Class: SmallInteger }"|
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11125
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11126
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11127
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11128
    methodCategoryListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11129
	list := methodCategoryListView list.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11130
	sz := list size.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11131
	1 to:sz do:[:idx |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11132
	    entry := list at:idx.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11133
	    entry := self unhilightEntryFor:entry.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11134
	    methodCategoryListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11135
"/            methodCategoryListView attributeAt:idx put:nil.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11136
	]
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11137
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11138
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11139
    "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
 11140
!
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11141
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11142
unhilightMethods
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11143
    "unhighlight items in method list"
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11144
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11145
    |list entry sz "{Class: SmallInteger }" |
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11146
199
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11147
    variableListView isNil ifTrue:[^ self].
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11148
821e07871f4f superSend-search added; remember last class-aspect
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
 11149
    methodListView notNil ifTrue:[
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11150
	list := methodListView list.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11151
	sz := list size.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11152
	1 to:sz do:[:idx |
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11153
	    entry := list at:idx.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11154
	    entry := self unhilightEntryFor:entry.
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11155
	    methodListView at:idx put:entry.
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11156
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11157
"/            methodListView attributeAt:idx put:nil.
1330
2d8c64367afc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
 11158
	].
791
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11159
    ].
ed22bea001e8 nice trap/break marks
Claus Gittinger <cg@exept.de>
parents: 768
diff changeset
 11160
797
d0061c784af8 care for bold-font-views when boldifying
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
 11161
    "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
 11162
!
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11163
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11164
updateVariableList
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11165
    "update the variable list - either show instVars, classVars or classInstVars"
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11166
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11167
    |l subList last nameAccessSelector class oldSelection askMeta|
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11168
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11169
    variableListView isNil ifTrue:[^ self].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11170
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11171
    oldSelection := variableListView selectionValue.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11172
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11173
    l := OrderedCollection new.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11174
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11175
     show classVars/classInstVars, 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11176
     if classProtocol is shown (instead of classInstance vars)
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11177
    "
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11178
    askMeta := false.
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11179
    showInstance ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11180
        nameAccessSelector := #instVarNames
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11181
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11182
        classInstVarsInVarList == true ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11183
            nameAccessSelector := #instVarNames.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11184
            askMeta := true.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11185
        ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11186
            nameAccessSelector := #classVarNames
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11187
        ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11188
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 11189
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 11190
    class := currentClassHierarchy notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11191
        currentClassHierarchy
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 11192
    ] ifFalse:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11193
        currentClass
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 11194
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 11195
    class := currentClass.
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 11196
    fullProtocol ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11197
        class := currentClassHierarchy
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 11198
    ].
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 11199
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 11200
    class isNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11201
        variableListView list:nil.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11202
        ^ self
814
11abf716717e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 813
diff changeset
 11203
    ].
572
0ee9fbf0e535 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 571
diff changeset
 11204
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11205
    class withAllSuperclasses do:[:aClass |
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11206
        |ignore|
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11207
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11208
        ignore := fullProtocol 
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11209
                  and:[classListView valueIsInSelection:(aClass name asString)].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11210
        ignore ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11211
            askMeta ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11212
                subList := aClass class perform:nameAccessSelector.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11213
            ] ifFalse:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11214
                subList := aClass perform:nameAccessSelector.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11215
            ].
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11216
            subList size ~~ 0 ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11217
                l := l , (subList asOrderedCollection reverse).
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11218
                l := l , (OrderedCollection with:'---- ' , aClass name , ' ---------').
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11219
            ]
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11220
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11221
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11222
    l reverse.
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11223
    variableListView setAttributes:nil.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11224
    l ~= variableListView list ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11225
        variableListView list:l.
609
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11226
    ].
99cdf593410c fixed fullProtocol method display when superclass gets striked-out
Claus Gittinger <cg@exept.de>
parents: 607
diff changeset
 11227
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11228
    l keysAndValuesDo:[:index :entry |
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11229
        (entry startsWith:'---') ifTrue:[
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11230
            variableListView attributeAt:index put:#disabled.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11231
            last := index
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11232
        ]
149
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11233
    ].
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11234
    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
 11235
54ab1ea8dc12 change classes versionString when class changes (prepare for sourceCode system)
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
 11236
    oldSelection notNil ifTrue:[
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11237
        variableListView setSelectElement:oldSelection.
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11238
        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
 11239
    ]
569
0b86821dc11a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 567
diff changeset
 11240
1355
34c98fc48b14 show resource-icon; better variableList (classInstVars)
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
 11241
    "Modified: / 25.10.1997 / 21:01:11 / cg"
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 11242
! !
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 11243
759
8d667c66af50 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
 11244
!BrowserView class methodsFor:'documentation'!
201
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 11245
3331e9abc9f0 more features & checkin from browser
Claus Gittinger <cg@exept.de>
parents: 199
diff changeset
 11246
version
1416
cbc8a3787732 Wrapped method forward #privacy now.
Stefan Vogel <sv@exept.de>
parents: 1407
diff changeset
 11247
    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.358 1998-01-23 18:05:21 stefan Exp $'
263
7b9622ce4fcc more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
 11248
! !
74
f2c56efa3599 Initial revision
claus
parents:
diff changeset
 11249
BrowserView initialize!