author | Claus Gittinger <cg@exept.de> |
Tue, 14 Dec 1999 21:15:14 +0100 | |
changeset 2487 | 4ac80975b91d |
parent 2473 | 8108513bbfd1 |
child 2768 | 539b96324cdf |
permissions | -rw-r--r-- |
52 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
982 | 13 |
SystemStatusMonitor subclass:#ProcessMonitor |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
14 |
instanceVariableNames:'processes hideDead runColor suspendedColor waitColor cpuUsages |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
15 |
showDetail' |
315
8a86faf847d1
create a new updateProcess when restarted
Claus Gittinger <cg@exept.de>
parents:
314
diff
changeset
|
16 |
classVariableNames:'' |
8a86faf847d1
create a new updateProcess when restarted
Claus Gittinger <cg@exept.de>
parents:
314
diff
changeset
|
17 |
poolDictionaries:'' |
1053 | 18 |
category:'Monitors-ST/X' |
19 | 19 |
! |
20 |
||
771
5cd10b4845f3
oops - catching the terminateSignal is no good idea
Claus Gittinger <cg@exept.de>
parents:
682
diff
changeset
|
21 |
!ProcessMonitor class methodsFor:'documentation'! |
52 | 22 |
|
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
39 |
This view shows smalltalks (light-weight) processes, and also offers |
|
40 |
a popup menu for various useful operations on them. |
|
41 |
Especially 'debug' is useful, to see what a process is currently |
|
42 |
doing. |
|
85 | 43 |
|
52 | 44 |
The information shown is: |
1896 | 45 |
id - the numeric id of the process |
46 |
name - the name (if any) of the process |
|
47 |
(the name has no semantic meaning; it exists for the processMonitor only) |
|
48 |
state - what is it doing; |
|
49 |
wait - waiting on a semaphore |
|
50 |
eventWait - waiting on a view-event semaphore |
|
51 |
ioWait - waiting on an io-semaphore |
|
52 |
timeWait - waiting for a time-semaphore |
|
53 |
run - run, but currently not scheduled |
|
54 |
active - really running (this info is useless, since at |
|
55 |
update time, its always the update process which is |
|
56 |
running) |
|
57 |
suspended - suspended; not waiting on a semaphore |
|
58 |
light - not yet started (i.e. has no stack yet) |
|
52 | 59 |
|
1896 | 60 |
prio - the processes priority (1..30) |
61 |
usedStack - the current stack use |
|
62 |
totalStack - the stack currently allocated (i.e. the maximum ever needed) |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
63 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
64 |
[see also:] |
1896 | 65 |
Process ProcessorScheduler |
66 |
WindowGroup |
|
67 |
SemaphoreMonitor |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
68 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
69 |
[author:] |
1896 | 70 |
Claus Gittinger |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
71 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
72 |
[start with:] |
1896 | 73 |
ProcessMonitor open |
52 | 74 |
" |
75 |
! ! |
|
76 |
||
771
5cd10b4845f3
oops - catching the terminateSignal is no good idea
Claus Gittinger <cg@exept.de>
parents:
682
diff
changeset
|
77 |
!ProcessMonitor class methodsFor:'defaults'! |
19 | 78 |
|
56 | 79 |
defaultIcon |
80 |
|i| |
|
19 | 81 |
|
93 | 82 |
i := Image fromFile:'ProcMon.xbm'. |
56 | 83 |
i notNil ifTrue:[^ i]. |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
84 |
^ super defaultIcon |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
85 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
86 |
"Modified: 23.1.1997 / 02:52:31 / cg" |
208 | 87 |
! |
88 |
||
89 |
defaultLabel |
|
90 |
^ 'Process Monitor' |
|
1300 | 91 |
! |
92 |
||
93 |
nameLengthInList |
|
94 |
^ 30 |
|
95 |
||
96 |
"Created: 21.8.1997 / 15:42:05 / cg" |
|
85 | 97 |
! ! |
98 |
||
99 |
!ProcessMonitor methodsFor:'drawing'! |
|
100 |
||
101 |
titleLine |
|
109 | 102 |
showDetail ifTrue:[ |
1896 | 103 |
Processor supportDynamicPriorities ifTrue:[ |
1792 | 104 |
^ 'id group name state prio usedStack totalStack current-segment switch where'. |
1896 | 105 |
]. |
1792 | 106 |
^ 'id group name state prio usedStack totalStack current-segment switch where'. |
109 | 107 |
]. |
1791 | 108 |
^ 'id group name state prio where '. |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
109 |
|
1504 | 110 |
"Modified: / 3.7.1996 / 13:57:38 / stefan" |
1792 | 111 |
"Modified: / 3.8.1998 / 23:20:24 / cg" |
85 | 112 |
! |
113 |
||
114 |
updateList |
|
115 |
"update list of processes" |
|
116 |
||
117 |
|newList| |
|
118 |
||
119 |
shown ifTrue:[ |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
120 |
newList := self getProcessList. |
85 | 121 |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
122 |
"sort by id - take care of nil ids of dead processes" |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
123 |
newList sort:[:p1 :p2 | |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
124 |
|id1 id2| |
85 | 125 |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
126 |
(p1 isNil or:[(id1 := p1 id) isNil]) |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
127 |
ifTrue:[true] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
128 |
ifFalse:[ |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
129 |
(p2 isNil or:[(id2 := p2 id) isNil]) |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
130 |
ifTrue:[false] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
131 |
ifFalse:[id1 < id2] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
132 |
] |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
133 |
]. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
134 |
newList ~= processes ifTrue:[ |
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
135 |
self updateStatus:newList |
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
136 |
]. |
85 | 137 |
]. |
138 |
updateBlock notNil ifTrue:[ |
|
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
139 |
Processor removeTimedBlock:listUpdateBlock. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
140 |
Processor addTimedBlock:listUpdateBlock afterSeconds:listUpdateDelay |
85 | 141 |
]. |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
142 |
|
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
143 |
"Modified: / 3.7.1996 / 13:37:29 / stefan" |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
144 |
"Modified: / 14.12.1999 / 20:50:14 / cg" |
85 | 145 |
! |
146 |
||
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
147 |
updateStatus:newProcessList |
85 | 148 |
"update status display of processes" |
149 |
||
1009 | 150 |
|oldList list line dIndex interrupted contextCount |
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
151 |
aProcess nm st n found running sel space oldSelection |
1301 | 152 |
newSelection numHeaderLines nameLength index |
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
153 |
con c totalStack sender id gId r skipping| |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
154 |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
155 |
numHeaderLines := 2. |
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
156 |
space := Character space. |
1300 | 157 |
nameLength := self class nameLengthInList. |
85 | 158 |
|
159 |
shown ifTrue:[ |
|
2176 | 160 |
oldList := listView list. |
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
161 |
|
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
162 |
oldSelection := listView selection. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
163 |
oldSelection notNil ifTrue:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
164 |
oldSelection := oldSelection collect:[:idx | |pI| |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
165 |
pI := idx-numHeaderLines. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
166 |
(pI > processes size or:[pI < 1]) ifTrue:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
167 |
nil |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
168 |
] ifFalse:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
169 |
processes at:pI |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
170 |
] |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
171 |
]. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
172 |
newSelection := OrderedCollection new. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
173 |
]. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
174 |
|
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
175 |
newProcessList notNil ifTrue:[ |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
176 |
processes := WeakArray withAll:newProcessList. |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
177 |
]. |
2176 | 178 |
processes notNil ifTrue:[ |
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
179 |
|
2176 | 180 |
list := OrderedCollection new:(processes size + numHeaderLines). |
181 |
list add:self titleLine. |
|
182 |
list add:(String new:self titleLine size withAll:$-). |
|
85 | 183 |
|
2176 | 184 |
interrupted := Processor interruptedProcess. |
85 | 185 |
|
2176 | 186 |
dIndex := 1. |
187 |
index := 1. |
|
1301 | 188 |
|
2176 | 189 |
"/ use while-loop; |
190 |
"/ processList may change size .... |
|
85 | 191 |
|
2176 | 192 |
[index <= processes size] whileTrue:[ |
193 |
aProcess := processes at:index. |
|
194 |
index := index + 1. |
|
1301 | 195 |
|
2176 | 196 |
(aProcess notNil |
197 |
and:[aProcess ~~ 0]) ifTrue:[ |
|
198 |
((id := aProcess id) notNil or:[hideDead not]) ifTrue:[ |
|
199 |
line := WriteStream on:(String new:200). |
|
656
3a625e4aa73f
Use a Stream to construct lines.
Stefan Vogel <sv@exept.de>
parents:
619
diff
changeset
|
200 |
|
2176 | 201 |
id printOn:line paddedTo:6. |
202 |
gId := aProcess processGroupId. |
|
2473 | 203 |
((gId == id) or:[gId isNil]) ifTrue:[ |
2176 | 204 |
"/ a group leader |
205 |
'- ' printOn:line. |
|
206 |
] ifFalse:[ |
|
207 |
gId printOn:line paddedTo:6. |
|
208 |
]. |
|
663
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
209 |
|
2176 | 210 |
(nm := aProcess name) isNil ifFalse:[ |
211 |
nm := nm printStringPaddedTo:(nameLength-1). |
|
212 |
nm size >= nameLength ifTrue:[ |
|
213 |
nm := (nm contractTo:(nameLength-1)). |
|
214 |
]. |
|
215 |
line nextPutAll:nm; nextPut:space. |
|
216 |
] ifTrue:[ |
|
217 |
line next:(nameLength) put:space. |
|
218 |
]. |
|
680 | 219 |
"/ n := cpuUsages at:(id) ifAbsent:[0]. |
85 | 220 |
"/ n ~~ 0 ifTrue:[ |
221 |
"/ line := line , ((n * 4) printStringLeftPaddedTo:3) |
|
222 |
"/ ] ifFalse:[ |
|
223 |
"/ line := line , ' ' |
|
224 |
"/ ]. |
|
2176 | 225 |
st := aProcess state. |
226 |
(st == #run |
|
227 |
and:[aProcess == interrupted]) ifTrue:[ |
|
228 |
c := ' *'. |
|
229 |
running := true. |
|
230 |
] ifFalse:[ |
|
231 |
[ |
|
232 |
(Processor scheduledProcesses includes:aProcess) ifTrue:[ |
|
233 |
c := ' +' |
|
234 |
] ifFalse:[ |
|
235 |
c := ' '. |
|
236 |
]. |
|
237 |
] valueUninterruptably. |
|
238 |
running := false. |
|
239 |
]. |
|
240 |
line nextPutAll:c; nextPutAll:(st printStringPaddedTo:9). |
|
241 |
line nextPutAll:(aProcess priority printStringLeftPaddedTo:3). |
|
143 | 242 |
|
2176 | 243 |
(showDetail |
244 |
and:[Processor supportDynamicPriorities]) ifTrue:[ |
|
245 |
(r := aProcess priorityRange) isNil ifTrue:[ |
|
246 |
line nextPutAll:' '. |
|
247 |
] ifFalse:[ |
|
248 |
line nextPutAll:(( |
|
249 |
' [' |
|
250 |
, (r start printString) |
|
251 |
, '..' |
|
252 |
, (r stop printString) |
|
253 |
, ']') paddedTo:7). |
|
254 |
]. |
|
255 |
]. |
|
1896 | 256 |
|
2176 | 257 |
con := aProcess suspendedContext. |
258 |
con isNil ifTrue:[ |
|
259 |
aProcess == Processor activeProcess ifTrue:[ |
|
260 |
con := thisContext |
|
261 |
] |
|
262 |
]. |
|
1896 | 263 |
|
2176 | 264 |
showDetail ifTrue:[ |
265 |
line nextPutAll:(aProcess usedStackSize printStringLeftPaddedTo:11). |
|
1791 | 266 |
|
2176 | 267 |
id == 0 ifTrue:[ |
268 |
line nextPutAll:('unlimited' leftPaddedTo:14). |
|
269 |
] ifFalse:[ |
|
270 |
n := aProcess numberOfStackSegments. |
|
271 |
line nextPutAll:(aProcess totalStackSize printStringLeftPaddedTo:10). |
|
272 |
line nextPutAll:(('(' , n printString , ')') paddedTo:4). |
|
273 |
]. |
|
274 |
con notNil ifTrue:[ |
|
275 |
line nextPutAll:' '. |
|
276 |
line nextPutAll:(((ObjectMemory addressOf:con) printStringRadix:16) leftPaddedTo:8 with:$0). |
|
277 |
line nextPutAll:' .. '. |
|
278 |
||
279 |
contextCount := 1. |
|
280 |
c := con. |
|
281 |
[(sender := c sender) notNil] whileTrue:[ |
|
282 |
c := sender. |
|
283 |
contextCount := contextCount + 1. |
|
284 |
]. |
|
285 |
line nextPutAll:(((ObjectMemory addressOf:c) printStringRadix:16) leftPaddedTo:8 with:$0). |
|
286 |
] ifFalse:[ |
|
287 |
line next:20 put:space. |
|
288 |
]. |
|
289 |
line nextPut:space. |
|
290 |
line nextPutAll:(aProcess numberOfStackBoundaryHits printStringLeftPaddedTo:6). |
|
291 |
]. |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
292 |
|
2176 | 293 |
con notNil ifTrue:[ |
294 |
c := con. |
|
295 |
found := false. |
|
296 |
running ifFalse:[ |
|
297 |
"/ search for a semaphore-wait in the top 10 contexts |
|
1009 | 298 |
|
2176 | 299 |
1 to:10 do:[:n | |
300 |
found ifFalse:[ |
|
301 |
c notNil ifTrue:[ |
|
302 |
(c receiver class == Semaphore) ifTrue:[ |
|
303 |
c selector == #wait ifTrue:[ |
|
304 |
found := true. |
|
305 |
] |
|
306 |
]. |
|
307 |
c := c sender. |
|
308 |
] |
|
309 |
] |
|
310 |
]. |
|
311 |
]. |
|
312 |
found ifFalse:[ |
|
313 |
"/ search for a non-processor, non-process |
|
314 |
"/ receiver in the top 10 contexts |
|
143 | 315 |
|
2176 | 316 |
c := con. |
317 |
1 to:10 do:[:n | |
|
318 |
|r| |
|
322
e3ccd5e431df
fixed context display (dont search for suspending context in running processes)
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
319 |
|
2176 | 320 |
found ifFalse:[ |
321 |
c notNil ifTrue:[ |
|
322 |
((r := c receiver) ~~ Processor |
|
323 |
and:[r class ~~ Process]) ifTrue:[ |
|
324 |
found := true. |
|
325 |
] ifFalse:[ |
|
326 |
c := c sender. |
|
327 |
] |
|
328 |
] |
|
329 |
] |
|
330 |
] |
|
331 |
]. |
|
332 |
found ifFalse:[ |
|
333 |
c := con |
|
334 |
]. |
|
413
715a6a18f825
better display of running processes context
Claus Gittinger <cg@exept.de>
parents:
409
diff
changeset
|
335 |
|
2176 | 336 |
"/ skip, until an interesting context is |
337 |
"/ found. |
|
338 |
"/ this skips intermediate contexts, which lead |
|
339 |
"/ to the sema-wait (for example, unwind blocks, |
|
340 |
"/ delay-stuff etc.) |
|
428
1c7406f57591
skip Process contexts in display
Claus Gittinger <cg@exept.de>
parents:
423
diff
changeset
|
341 |
|
2176 | 342 |
skipping := true. |
343 |
[skipping] whileTrue:[ |
|
344 |
skipping := false. |
|
345 |
(c notNil |
|
346 |
and:[c receiver == Delay |
|
347 |
or:[c receiver class == Delay]]) ifTrue:[ |
|
348 |
c := c sender. |
|
349 |
skipping := true. |
|
350 |
]. |
|
322
e3ccd5e431df
fixed context display (dont search for suspending context in running processes)
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
351 |
|
2176 | 352 |
[c notNil |
353 |
and:[c receiver isBlock |
|
354 |
and:[c selector startsWith:'value']]] whileTrue:[ |
|
355 |
c := c sender. |
|
356 |
skipping := true. |
|
357 |
]. |
|
1896 | 358 |
|
2176 | 359 |
[c notNil |
360 |
and:[c receiver == OperatingSystem |
|
361 |
and:[c selector == #unblockInterrupts]]] whileTrue:[ |
|
362 |
c := c sender. |
|
363 |
skipping := true. |
|
364 |
]. |
|
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
365 |
|
2176 | 366 |
[c notNil and:[c isBlockContext]] whileTrue:[ |
367 |
c := c home. |
|
368 |
skipping := true. |
|
369 |
]. |
|
370 |
]. |
|
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
371 |
|
2176 | 372 |
c notNil ifTrue:[ |
373 |
sel := c selector. |
|
374 |
sel isNil ifTrue:[ |
|
375 |
sel := '* unknown *' |
|
376 |
]. |
|
377 |
line nextPutAll:' '. |
|
378 |
line nextPutAll:c receiver class name. |
|
379 |
line nextPutAll:'>>'; nextPutAll:sel. |
|
380 |
] |
|
381 |
]. |
|
382 |
list add:line contents. |
|
383 |
processes at:dIndex put:aProcess. |
|
384 |
(oldSelection notNil and:[oldSelection includesIdentical:aProcess]) ifTrue:[ |
|
385 |
newSelection add:dIndex+numHeaderLines. |
|
386 |
]. |
|
1807
b98ad1474686
skip uninterresting contexts in the where list;
Claus Gittinger <cg@exept.de>
parents:
1792
diff
changeset
|
387 |
|
2176 | 388 |
dIndex := dIndex + 1 |
389 |
] |
|
390 |
]. |
|
391 |
]. |
|
392 |
dIndex to:processes size do:[:index | |
|
393 |
processes at:index put:nil |
|
394 |
] |
|
395 |
]. |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
396 |
|
2176 | 397 |
"avoid flicker" |
398 |
(oldList notNil and:[oldList size == list size]) ifTrue:[ |
|
399 |
list keysAndValuesDo:[:idx :entry | |
|
400 |
(oldList at:idx) ~= entry ifTrue:[ |
|
401 |
listView at:idx put:entry |
|
402 |
] |
|
403 |
] |
|
404 |
] ifFalse:[ |
|
405 |
listView setList:list. |
|
406 |
"the first two entries cannot be selected" |
|
407 |
listView attributeAt:1 put:#disabled. |
|
408 |
listView attributeAt:2 put:#disabled. |
|
1103
c70ece0e331a
keep selection when list changes
Claus Gittinger <cg@exept.de>
parents:
1053
diff
changeset
|
409 |
|
2176 | 410 |
oldSelection notNil ifTrue:[ |
411 |
listView selection:newSelection. |
|
412 |
] |
|
413 |
]. |
|
2473 | 414 |
"/ cg: must flush here - drawing is done by a background process; |
415 |
"/ without the flush, the output may look ugly (delayed) |
|
416 |
listView flush |
|
85 | 417 |
]. |
418 |
updateBlock notNil ifTrue:[ |
|
2176 | 419 |
Processor removeTimedBlock:updateBlock. |
420 |
Processor addTimedBlock:updateBlock afterSeconds:updateDelay |
|
85 | 421 |
] |
322
e3ccd5e431df
fixed context display (dont search for suspending context in running processes)
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
422 |
|
1504 | 423 |
"Modified: / 3.7.1996 / 13:56:01 / stefan" |
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
424 |
"Created: / 14.12.1999 / 20:47:12 / cg" |
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
425 |
"Modified: / 14.12.1999 / 20:50:59 / cg" |
143 | 426 |
! ! |
427 |
||
19 | 428 |
!ProcessMonitor methodsFor:'initialization'! |
429 |
||
430 |
initialize |
|
431 |
super initialize. |
|
432 |
||
45 | 433 |
hideDead := true. |
109 | 434 |
showDetail := Smalltalk at:#SystemDebugging ifAbsent:false. |
45 | 435 |
|
19 | 436 |
device hasColors ifTrue:[ |
1896 | 437 |
runColor := Color green. |
438 |
suspendedColor := Color yellow. |
|
439 |
waitColor := Color red. |
|
19 | 440 |
] ifFalse:[ |
1896 | 441 |
runColor := suspendedColor := waitColor := Color black |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
442 |
]. |
19 | 443 |
|
45 | 444 |
" |
445 |
ProcessMonitor open |
|
446 |
" |
|
315
8a86faf847d1
create a new updateProcess when restarted
Claus Gittinger <cg@exept.de>
parents:
314
diff
changeset
|
447 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
448 |
"Modified: 23.1.1997 / 02:51:38 / cg" |
85 | 449 |
! |
450 |
||
208 | 451 |
realize |
452 |
waitColor := waitColor on:device. |
|
453 |
runColor := runColor on:device. |
|
454 |
suspendedColor := suspendedColor on:device. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
455 |
super realize. |
56 | 456 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
457 |
"Modified: 23.1.1997 / 02:30:37 / cg" |
19 | 458 |
! ! |
459 |
||
460 |
!ProcessMonitor methodsFor:'menu actions'! |
|
461 |
||
208 | 462 |
abortProcess |
463 |
"abort (raise AbortSignal in) the selected process" |
|
464 |
||
465 |
self selectedProcessesDo:[:p | |
|
466 |
p interruptWith:[AbortSignal raise] |
|
467 |
] |
|
468 |
! |
|
469 |
||
470 |
debugProcess |
|
471 |
"open a debugger on the selected process" |
|
472 |
||
473 |
self selectedProcessesDo:[:p | |
|
474 |
Debugger openOn:p |
|
475 |
] |
|
476 |
! |
|
477 |
||
1932 | 478 |
debugProcessWhenResumed |
479 |
self selectedProcessesDo:[:p | |
|
480 |
p onResumeDo:[:con | Debugger enter:con] |
|
481 |
] |
|
482 |
||
483 |
"Created: / 14.10.1998 / 15:50:07 / cg" |
|
484 |
"Modified: / 14.10.1998 / 16:06:08 / cg" |
|
485 |
! |
|
486 |
||
487 |
debugWhenResumed |
|
488 |
self selectedProcessesDo:[:p | |
|
489 |
p addInterruptAction:[Debugger enter] |
|
490 |
] |
|
491 |
||
492 |
"Created: / 14.10.1998 / 15:48:04 / cg" |
|
493 |
"Modified: / 14.10.1998 / 15:48:40 / cg" |
|
494 |
! |
|
495 |
||
1301 | 496 |
hardTerminateProcess |
497 |
"hard terminate the selected process" |
|
498 |
||
499 |
self selectedProcessesSend:#terminateNoSignal |
|
500 |
||
501 |
"Created: 22.8.1997 / 02:06:51 / cg" |
|
502 |
! |
|
503 |
||
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
504 |
hideDead:aBoolean |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
505 |
"turn on/off hiding of dead (already terminated) processes" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
506 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
507 |
hideDead := aBoolean |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
508 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
509 |
"Modified: 23.1.1997 / 02:34:01 / cg" |
208 | 510 |
! |
511 |
||
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
512 |
inspectSelection |
208 | 513 |
"open an inspector on the selected process" |
514 |
||
515 |
self selectedProcessesSend:#inspect |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
516 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
517 |
"Created: 23.1.1997 / 02:27:33 / cg" |
208 | 518 |
! |
519 |
||
520 |
lowerPrio |
|
521 |
"lower the selected processes priority" |
|
522 |
||
523 |
self selectedProcessesDo:[:p | |
|
524 |
p priority:(p priority - 1) |
|
525 |
] |
|
526 |
! |
|
527 |
||
528 |
raisePrio |
|
529 |
"raise the selected processes priority" |
|
143 | 530 |
|
531 |
self selectedProcessesDo:[:p | |
|
208 | 532 |
p priority:(p priority + 1) |
143 | 533 |
] |
534 |
! |
|
535 |
||
817 | 536 |
restartProcess |
537 |
"abort (raise AbortSignal in) the selected process" |
|
538 |
||
539 |
self selectedProcessesDo:[:p | |
|
1896 | 540 |
p restart. |
817 | 541 |
] |
542 |
! |
|
543 |
||
143 | 544 |
resumeProcess |
545 |
"resume the selected process (i.e. let it run) " |
|
546 |
||
547 |
self selectedProcessesSend:#resume |
|
548 |
! |
|
549 |
||
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
550 |
statusMenu |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
551 |
"return a popUpMenu" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
552 |
|
1620 | 553 |
<resource: #programMenu> |
554 |
||
1932 | 555 |
|items labels selectors m sel allRestartable| |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
556 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
557 |
device ctrlDown ifTrue:[ |
1932 | 558 |
items := #( |
559 |
('\c detail' toggleDetail) |
|
560 |
). |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
561 |
] ifFalse:[ |
1932 | 562 |
items := #( |
563 |
('inspect' inspectSelection) |
|
564 |
('debug' debugProcess) |
|
565 |
"/ ('debug when resumed' debugProcessWhenResumed) |
|
566 |
('-') |
|
567 |
('resume' resumeProcess) |
|
568 |
('suspend' suspendProcess) |
|
569 |
('stop' stopProcess) |
|
570 |
('-') |
|
571 |
('abort' abortProcess) |
|
572 |
('terminate' terminateProcess) |
|
573 |
('terminate group' terminateProcessGroup) |
|
574 |
"/ ('hard terminate' hardTerminateProcess) |
|
575 |
('restart' restartProcess) |
|
576 |
('-') |
|
577 |
('raise prio' raisePrio) |
|
578 |
('lower prio' lowerPrio) |
|
579 |
). |
|
580 |
||
581 |
updateProcess isNil ifTrue:[ |
|
582 |
items := #( |
|
583 |
('update' updateView) |
|
584 |
('-') |
|
585 |
) , items. |
|
586 |
]. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
587 |
]. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
588 |
|
1932 | 589 |
m := PopUpMenu |
590 |
itemList:items |
|
591 |
resources:resources |
|
592 |
performer:self. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
593 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
594 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
595 |
listView hasSelection ifFalse:[ |
1932 | 596 |
m disableAll:#( |
597 |
inspectSelection |
|
598 |
debugProcess |
|
599 |
debugProcessWhenResumed |
|
600 |
resumeProcess |
|
601 |
suspendProcess |
|
602 |
stopProcess |
|
603 |
restartProcess |
|
604 |
abortProcess |
|
605 |
terminateProcess |
|
606 |
terminateProcessGroup |
|
607 |
raisePrio |
|
608 |
lowerPrio |
|
609 |
) |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
610 |
] ifTrue:[ |
1932 | 611 |
allRestartable := true. |
612 |
self selectedProcessesDo:[:p | |
|
613 |
p isRestartable ifFalse:[ |
|
614 |
allRestartable := false |
|
615 |
]. |
|
616 |
]. |
|
617 |
allRestartable ifFalse:[ |
|
618 |
m disable:#restartProcess |
|
619 |
]. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
620 |
]. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
621 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
622 |
m checkToggleAt:#toggleDetail put:showDetail. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
623 |
^ m |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
624 |
|
1932 | 625 |
"Created: / 23.1.1997 / 03:05:54 / cg" |
626 |
"Modified: / 14.10.1998 / 17:15:43 / cg" |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
627 |
! |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
628 |
|
92 | 629 |
stopProcess |
630 |
"stop the selected process - not even interrupts will wake it up" |
|
631 |
||
632 |
self selectedProcessesSend:#stop |
|
633 |
! |
|
634 |
||
19 | 635 |
suspendProcess |
92 | 636 |
"suspend the selected process - interrupts will let it run again" |
637 |
||
58 | 638 |
self selectedProcessesSend:#suspend |
85 | 639 |
! |
45 | 640 |
|
208 | 641 |
terminateProcess |
642 |
"terminate the selected process" |
|
92 | 643 |
|
208 | 644 |
self selectedProcessesSend:#terminate |
663
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
645 |
! |
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
646 |
|
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
647 |
terminateProcessGroup |
817 | 648 |
"terminate the selected process with all of its subprocesses" |
663
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
649 |
|
befe6a1d886f
show process group & added menu item to terminate a complete group
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
650 |
self selectedProcessesSend:#terminateGroup |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
651 |
! |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
652 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
653 |
toggleDetail |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
654 |
"toggle detail" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
655 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
656 |
showDetail := showDetail not. |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
657 |
self updateView |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
658 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
659 |
"Modified: 23.1.1997 / 02:33:03 / cg" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
660 |
"Created: 23.1.1997 / 02:33:30 / cg" |
19 | 661 |
! ! |
662 |
||
143 | 663 |
!ProcessMonitor methodsFor:'private'! |
664 |
||
665 |
selectedProcessesDo:aBlock |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
666 |
"evaluate aBlock on all selected processes" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
667 |
|
143 | 668 |
|p nr sel| |
85 | 669 |
|
143 | 670 |
sel := listView selection. |
671 |
sel isNil ifTrue:[^ self]. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
672 |
|
143 | 673 |
(sel isKindOf:Collection) ifTrue:[ |
1896 | 674 |
sel do:[:n | |
675 |
nr := n - 2. "for headlines" |
|
676 |
nr notNil ifTrue:[ |
|
677 |
nr > 0 ifTrue:[ |
|
678 |
p := processes at:nr. |
|
679 |
(p notNil and:[p ~~ 0]) ifTrue:[ |
|
680 |
aBlock value:p |
|
681 |
] |
|
682 |
] |
|
683 |
] |
|
684 |
] |
|
85 | 685 |
] ifFalse:[ |
1896 | 686 |
nr := sel - 2. "for headlines" |
687 |
nr notNil ifTrue:[ |
|
688 |
nr > 0 ifTrue:[ |
|
689 |
p := processes at:nr. |
|
690 |
(p notNil and:[p ~~ 0]) ifTrue:[ |
|
691 |
aBlock value:p |
|
692 |
] |
|
693 |
] |
|
694 |
] |
|
85 | 695 |
]. |
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
696 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
697 |
"Modified: 23.1.1997 / 03:10:53 / cg" |
143 | 698 |
! |
699 |
||
700 |
selectedProcessesSend:aSelector |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
701 |
"send a message to all selected processes" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
702 |
|
143 | 703 |
self selectedProcessesDo:[:p | |
1896 | 704 |
p perform:aSelector |
143 | 705 |
]. |
706 |
self updateView. |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
707 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
708 |
"Modified: 23.1.1997 / 02:34:49 / cg" |
85 | 709 |
! ! |
710 |
||
2084
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
711 |
!ProcessMonitor methodsFor:'process selection'! |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
712 |
|
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
713 |
getProcessList |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
714 |
"select processes to display. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
715 |
Subclasses may redefine this" |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
716 |
|
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
717 |
|coll| |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
718 |
|
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
719 |
showDetail ifTrue:[ |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
720 |
coll := Process allSubInstances asOrderedCollection. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
721 |
] ifFalse:[ |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
722 |
coll := ProcessorScheduler knownProcesses asOrderedCollection. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
723 |
]. |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
724 |
^ coll |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
725 |
! ! |
0445a6a61d45
Extract #getProcessList to support easy subclasses.
Stefan Vogel <sv@exept.de>
parents:
2013
diff
changeset
|
726 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
727 |
!ProcessMonitor methodsFor:'user actions'! |
85 | 728 |
|
979
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
729 |
doubleClicked |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
730 |
"open a debugger on the selected process" |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
731 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
732 |
self debugProcess |
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
733 |
|
c1e318bee326
extracted common stuff into a superclass
Claus Gittinger <cg@exept.de>
parents:
817
diff
changeset
|
734 |
"Created: 23.1.1997 / 03:21:30 / cg" |
85 | 735 |
! ! |
208 | 736 |
|
771
5cd10b4845f3
oops - catching the terminateSignal is no good idea
Claus Gittinger <cg@exept.de>
parents:
682
diff
changeset
|
737 |
!ProcessMonitor class methodsFor:'documentation'! |
208 | 738 |
|
739 |
version |
|
2487
4ac80975b91d
avoid loosing the selection when the list is updated
Claus Gittinger <cg@exept.de>
parents:
2473
diff
changeset
|
740 |
^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.72 1999-12-14 20:15:02 cg Exp $' |
1053 | 741 |
! ! |