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