ProcessMonitorV2.st
author Stefan Vogel <sv@exept.de>
Fri, 16 Apr 2010 17:59:53 +0200
changeset 9410 4cf82538c97e
parent 9293 dcbf31f821ed
child 9480 c89920e683af
permissions -rw-r--r--
changed: #startUpdateProcess - no debugger on stx snapIn

"
 COPYRIGHT (c) 2003 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libtool' }"

ApplicationModel subclass:#ProcessMonitorV2
	instanceVariableNames:'processList tableColumns selectedProcesses updateSema showDetail
		hasSelectionHolder showProcessId showGroup showState showPrio
		showUsedStack showTotalStack showCurrentSegment showSwitch
		showWhere currentSortOrder processTable showDead sortBlock
		selectionRestartable updateListDelayTime updateContentsDelayTime
		enableDecreaseListDelayTime enableDecreaseContentsDelayTime
		enableIncreaseListDelayTime enableIncreaseContentsDelayTime
		listUpdateDelay updateDelay updateBlock listUpdateBlock
		updateProcess visibleBlock allowModifications tableMenu
		hasSelectionWithApplicationProcessHolder
		hasSelectionAndProcessIsApplicationProcessHolder
		hasSelectionWithStoppedProcessHolder
		hasSelectionAndProcessIsStoppedHolder
		hasSelectionWithGUIProcessHolder'
	classVariableNames:''
	poolDictionaries:''
	category:'Monitors-ST/X'
!

Object subclass:#ProcessItem
	instanceVariableNames:'processId processGroup processName processActive processState
		processPrio processUsedStack processTotalStack processWhere
		processInstance weakArrayWithProcesses
		processInstanceIndexInWeakArray processCurrentSegment
		processSwitch prioVal idVal groupVal'
	classVariableNames:''
	poolDictionaries:''
	privateIn:ProcessMonitorV2
!

!ProcessMonitorV2 class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2003 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    documentation to be added.

    [author:]
	Christian Penk (penk@bierfix)

    [instance variables:]

    [class variables:]

    [see also:]

"
!

examples
"
  Starting the application:
								[exBegin]
    ProcessMonitorV2 open

								[exEnd]

  Starting the application withot any possibilities to change
  the processes
								[exBegin]
    ProcessMonitorV2 openAllowNoModifications

								[exEnd]

  more examples to be added:
								[exBegin]
    ... add code fragment for
    ... executable example here ...
								[exEnd]
"
!

history
    "Created: / 14.1.2003 / 11:16:10 / penk"
! !

!ProcessMonitorV2 class methodsFor:'instance creation'!

openAllowNoModifications


    |application|

    application := self new.
    application open.
    application allowModifications value:false.
! !

!ProcessMonitorV2 class methodsFor:'defaults'!

defaultIcon
    |i|

    i := Image fromFile:'ProcMon.xbm'.
    i notNil ifTrue:[^ i].
    ^ super defaultIcon

    "Modified: 23.1.1997 / 02:52:31 / cg"
!

defaultLabel
    ^ 'Process Monitor'
!

resourcePackName
    "return the name which is used as the fileNameBase of my resource file.
     Here, use the same resources as the (old) ProcessMonitor"

    ^ 'ProcessMonitor'
! !

!ProcessMonitorV2 class methodsFor:'help'!

aboutThisApplicationText
    ^ super aboutThisApplicationText ,
      '\\Written by Christian Penk, eXept Software AG.' withCRs
! !

!ProcessMonitorV2 class methodsFor:'help specs'!

flyByHelpSpec
    "This resource specification was automatically generated
     by the UIHelpTool of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIHelpTool may not be able to read the specification."

    "
     UIHelpTool openOnClass:ProcessMonitorV2
    "

    <resource: #help>

    ^ super flyByHelpSpec addPairsFrom:#(

#Debug
'Debug'

#Details
'Details'

#Inspect
'Inspect'

#'Lower Prio'
'Lower Prio'

#'Raise Prio'
'Raise Prio'

#RaiseWindow
'Raise Application''s Window'

#Restart
'Restart'

#Resume
'Resume'

#Abort
'Abort'

#Stop
'Stop'

#Suspend
'Suspend'

#Terminate
'Terminate'

#'Terminate Group'
'Terminate Group'

#'Update Process List'
'Update Process List'

)

    "Modified: / 05-06-2007 / 18:35:47 / cg"
! !

!ProcessMonitorV2 class methodsFor:'image specs'!

detailsMenuIconDown
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self detailsMenuIconDown inspect
     ImageEditor openOnClass:self andSelector:#detailsMenuIconDown
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class detailsMenuIconDown'
	ifAbsentPut:[(Depth1Image new) width: 7; height: 5; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 7; height: 5; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@A@(UJ(b') ; yourself); yourself]
!

detailsMenuIconUp
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self detailsMenuIconUp inspect
     ImageEditor openOnClass:self andSelector:#detailsMenuIconUp
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class detailsMenuIconUp'
	ifAbsentPut:[(Depth1Image new) width: 7; height: 5; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 7; height: 5; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'*%P(D@@b') ; yourself); yourself]
!

process22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self process22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#process22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class process22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA XFA XH@@@@@@@@@@@@@@@@APXFA0 GA XFA0@@@@@@@@@@@@@@
APXFA0 @@@TFA XG@@@@@@@@@@@EAPXFA  @@@@@APXFA TG@@@@@@@@B@ FA XG@@@@@@TFA XHB@@@@@@@@@@@A0\FA T@@@TFA XH@@@@@@@@@@@@@@@G
A XFAPTFA XH@@@@@@@@@@@@@@@@APXFA XFA XFB@@@@@@@@@@@@@@@APXHA0XFA XFAPXH@@@@@@@@@@@@@@\H@@@EA XG@@@GB@@@@@@@@@@@@@@@@@@@
@@TH@@@@@@@@@@@@@@@@@@@@@@@@@@@EB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _9? O??@C?<@C?<@G?>@G?>@COL@@O@@@F@@@@@@@@@@@@@@') ; yourself); yourself]
!

processAbort22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processAbort22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processAbort22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processAbort22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@ @@@@@@@@@@@@@@@@@@@@@@@@@@APH@@@@@@@@@@@@@@@@@
@@@BAP@@APLC@P@@APH@@@@@@@@@@@@@@PLEAPLC@0LEAPLA@@@@@@@@@@@@@@@B@0LC@0LC@0LA@@@@@@@@@@@@@@@@APLC@ DB@0LC@ @@@@@@@@@@@@@@
APLC@ D@@@TC@0LB@@@@@@@@@@@EAPLC@0D@@@@@APLC@0TB@@@@@@@@@PDC@0LB@@@@@@TC@0LA@P@@@@@@@@@@@ HC@0T@@@TC@0LA@@TE@@@@@@@@@@@B
@0LCAPTC@0LA@@TFA TE@@@@@@@@APLC@0LC@0LC@PTFA@PFAP@@@@@@APLA@ LC@0LCAPTFA@PDA@XE@@@@@@HA@@@E@0LB@@TFA@PDA@PFA @@@@@@@@TE
@@TA@@@EA XDA@PFAPT@@@@@@@@EA TE@P@@APTEA PDA @@@@@@@@@@@@TFAP@@@@TEA PDA T@@@@@@@@@@@@@A XEAPTFA PDA@X@@@@@@@@@@@@@@@TF
A XFA@PDA XE@@@@@@@@@@@@@@@@APTFA XFA TE@@@@@@@a') ; colorMapFromArray:#[0 0 0 127 127 127 161 161 165 194 194 194 255 0 0 255 255 255 192 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _9? O?? C??8C??8G??<G??<C?_<@?_0@^_0@O? @O? @G?@') ; yourself); yourself]
!

processDebug22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processDebug22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processDebug22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processDebug22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@F@0@@@@@@@@@@@@@@@@@@@@@@@@@@A L@@@@@@@@@@@@@@@@@
@@@CA @@A PD@P@@A L@@@@@@@@@@@@@@PPFA PDA@PFA PA@@@@@@@@@@@@@@@CA@PD@@@DA@PA@@@@@@@@@@@@@@@@A P@@0DC@@@D@0@@@@@@@@@@@@@@
A PD@0@@@@X@@@@@@@@@@@@@@@@FA PDA@D@@@@@@@HB@ HB@ @@@@@@@PDDA@@@@@@@@ HBAPTEAPTB@@@@@@@@@0@B@ @B@ HEAPTEAPTEAPH@@@@@@@HB
APTE@@HEAPTEAPTEAPTE@ @@@@@B@ TEAP@BAPTEAPTEAPTEAPH@@@@@@@HEAPT@@@@@@@@@@@@@@@@@@@@@@@HBAPTE@@HBAPTEAPTEAPTE@ @@@@@@@ HE
@ @B@ HEAPTEAPTE@ H@@@@@@@@@@@@@@@HB@ HB@ HB@ @@@@@@@@@@@@@@@@@@@@@B@ HB@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 127 127 127 128 0 0 161 161 165 194 194 194 255 0 0 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?= C??XO?? _=?0_??8O??<???<C??<G??<???<_??<@??8@G?0@L? @Q#X@FA ') ; yourself); yourself]
!

processInspect22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processInspect22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processInspect22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processInspect22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA @@@@XH@@@@@@@@@@@@@@@@APXF@@@BCPH@@@@@@@@@@@@@@@@@
APXF@@0MCP4MCP0@@@@@@@@@@@@EAPXFA @MCPTEAP4M@@TG@@@@@@@@B@ FA @BCPTEAP4MCPH@B@@@@@@@@@@@A0\@CP4EAP4MCP4M@@@@@@@@@@@@@@@G
@@HMAP4MCP4M@ @@@@@@@@@@@@@@APX@CP4MCP4MCP@@@@@@@@@@@@@@APXH@@0MCP4MCP0@BP@@@@@@@@@@@@\H@@@@@@HM@ @@@ @@@@@@@@@@@@@@@@@@
@@T@@@@@B @K@0@@@@@@@@@@@@@@@@@EB@@@@@@@C ,C@@@@@@@@@@@@@@@@@@@@@@@@@@@NB0L@@@@@@@@@@@@@@@@@@@@@@@@@@@8K@0@@@@@@@@@@@@@@
@@@@@@@@@@@@C ,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127 120 120 120 0 64 64 88 88 88 80 80 80 200 200 200 48 48 48]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_?? _?? O??@C?>@C?<@G?>@G??@CO/ @OG0@FC8@@A<@@@<@@@X') ; yourself); yourself]
!

processLowerPrio22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processLowerPrio22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processLowerPrio22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processLowerPrio22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA XFA XH@@@@@@@@@@@@@@@@APXFA0 GA XFA0@@@@@@@@@@@@@@
APXFA0 @@@TFA XG@@@@@@@@@@@EAPXFA  @@@@@APXFA TG@@@@@@@@B@ FA XG@@@@@@TEAPTEAPTE@@@@@@@@A0\FA T@@@TFAP@@@@@@AP@@@@@@@@@G
A XFAPTFA T@@@@@@@T@@@@@@@@@APXFA XFA XE@@@@@@@E@@@@@@@@APXHA0XFA XFAP@@@@@@AP@@@@@@@@\H@@@EA XEAPT@@@@@@@TEAP@@@@@@@@@@
@@THAP@@@@@@@@@@@@T@@@@@@@@@@@@EB@@E@@@@@@@@@@T@@@@@@@@@@@@@@@@@@@T@@@@@@@T@@@@@@@@@@@@@@@@@@@@@AP@@@@T@@@@@@@@@@@@@@@@@
@@@@@@@E@@T@@@@@@@@@@@@@@@@@@@@@@@@@@@T@@@@@@@@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _9?0O??0C??0C??0G??0G??<CO?<@O?8@F_0@@O @@G@@@B@') ; yourself); yourself]
!

processRaisePrio22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processRaisePrio22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processRaisePrio22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processRaisePrio22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA XFA XH@@@@@@@@@@@@@@@@APXFA0 GA XFA0@@@@@@@@@@@@@@
APXFA0 @@@TFA XG@@@@@@@@@@@EAPXFA  @@@@@APXFA TG@@@@@@@@B@ FA XG@@@@@@TFA XEB@@@@@@@@@@@A0\FA T@@@TFA XE@@T@@@@@@@@@@@@G
A XFAPTFA XE@@@@AP@@@@@@@@@@APXFA XFA XE@@@@@@@E@@@@@@@@APXHA0XFA XE@@@@@@@@@@T@@@@@@@\H@@@EA XE@@@@@@@@@@@@AP@@@@@@@@@@
@@THAPTE@@@@@@@EAPT@@@@@@@@@@@@EB@@@AP@@@@@@AP@@@@@@@@@@@@@@@@@@@@T@@@@@@@T@@@@@@@@@@@@@@@@@@@@E@@@@@@@E@@@@@@@@@@@@@@@@
@@@@AP@@@@@@AP@@@@@@@@@@@@@@@@@@@@TEAPTEAPT@@@@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _9? O??@C?? C??0G??8G??<CO?<@O_0@F_0@@_0@@_0@@_0') ; yourself); yourself]
!

processRestart22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processRestart22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processRestart22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processRestart22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@GAP@@@@@@@@@@@@@@@@@@@@@@@@@@A0T@@@@@@@@@@@@@@@@@
@@@EA0@@A0XFA@@@A0T@@@@@@@@@@@@@A@XGA0XFA XGA0XD@@@@@@@@@@@@@@@EA XFA XF@@@@@@@@@@@@@@@@@@@@A0XFAPP@@@LC@0@@@P@@@@@@@@@@
A0XFAPP@@0LC@0@E@@@@@@@@@@@GA0XFA P@@@LC@0@FA \@@@@@@@@@A@PFA XE@@LC@0@FA XD@@@@@@@@@@@@APTFA @C@0L@A XD@@@@@@@@@@@@@@@E
@@LC@0LC@0L@@@@@@@@@@@@@@@@@A0X@@0LC@0L@@@@@@@@@@@@@@@@@A0XDAP@C@0L@@@@@@@@@@@@@@@@@@@TD@@@@@@L@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 0 64 0 0 128 0 0 192 0 127 127 127 161 161 165 194 194 194 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?>@C?? O??0_?>P_?>HO?<@C?= C?30G?''8G7/<CCO0@PC0@HG @L_ @G?@@A<@') ; yourself); yourself]
!

processResume22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processResume22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processResume22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processResume22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA XFA XH@@@@@@@@@@@@@@@@APXFA0 GA XFA0@@@@@@@@@@@@@@
APXFA0 @@@TFA XG@@@@@@@@@@@EAPXFA  @@@@@APXFA TG@@@@@@@@B@ FA XG@@@@@@TE@@THB@@@@@@@@@@@A0\FA T@@@TFAP@@AP@@@@@@@@@@@@@G
A XFAPTFA T@@@@E@@@@@@@@@@@@APXFA XFA XE@@@@@@T@@@@@@@@@APXHA0XFA XFAP@@@@@@AP@@@@@@@@\H@@@EA XG@@T@@@@@@@@E@@@@@@@@@@@@
@@TH@@@E@@@@@@@@AP@@@@@@@@@@@@@EB@@@AP@@@@@@AP@@@@@@@@@@@@@@@@@@@@T@@@@@AP@@@@@@@@@@@@@@@@@@@@@E@@@@AP@@@@@@@@@@@@@@@@@@
@@@@AP@@AP@@@@@@@@@@@@@@@@@@@@@@@@T@AP@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _9? O??@C??@C?? G??0G??8CO_8@O_0@F_ @@_@@@^@@@\@') ; yourself); yourself]
!

processStop22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processStop22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processStop22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processStop22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA XFA XH@@@@@@@@@@@@@@@@APXFA0 GA XFA0@@@@@@@@@@@@@@
APXFA0 @@@TFA XG@@@@@@@@@@@EAPXFA  @@@@@APXFA TG@@@@@@@@B@ FA XG@@@@@@TFA XHB@@@@@@@@@@@A0\FA T@@@TFA XH@@@@@@@@@@@@@@@G
A XFAPTFAPTEAPTEAPTEAP@@@@@@APXFA XFA T@@@@EAP@@@@T@@@@@APXHA0XFA XE@@@@APT@@@@E@@@@@@\H@@@EA XGAP@@@@TE@@@@AP@@@@@@@@@@
@@TH@@T@@@@EAP@@@@T@@@@@@@@@@@@EB@@E@@@@APT@@@@E@@@@@@@@@@@@@@@@AP@@@@TE@@@@AP@@@@@@@@@@@@@@@@T@@@@EAP@@@@T@@@@@@@@@@@@@
@@@E@@@@APT@@@@E@@@@@@@@@@@@@@@@APTEAPTEAPTEAP@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _9? O??@C??<C??<G??<G??<CO?<@O?<@F?<@@?<@@?<@@?<') ; yourself); yourself]
!

processSuspend22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processSuspend22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processSuspend22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processSuspend22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA XFA XH@@@@@@@@@@@@@@@@APXFA0 GA XFA0@@@@@@@@@@@@@@
APXFA0 @@@TFA XG@@@@@@@@@@@EAPXFA  @@@@@APXFA TG@@@@@@@@B@ FA XG@@TEAPTEAPTEAPTEAPT@@@@@A0\FA TEAPTEAPTEAPTEAPTE@@@@@@@G
A XFAPTE@@@@@@@@@@@EAP@@@@@@APXFA TEAP@@@@@@@@@@APT@@@@@APXHA0XEAPT@@@@@@@@@@@TE@@@@@@\H@@@EAPTE@@@@@@@@@@@EAP@@@@@@@@@@
@@TEAP@@@@@@@@@@APT@@@@@@@@@@@@EAPT@@@@@@@@@@@TE@@@@@@@@@@@@APTE@@@@@@@@@@@EAP@@@@@@@@@@@@TEAP@@@@@@@@@@APT@@@@@@@@@@@@E
APTEAPTEAPTEAPTE@@@@@@@@@@@@APTEAPTEAPTEAPTEAP@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _??<O??<C??<C??<G??<G??<CO?<@O?<@G?<@G?<@G?<@G?<') ; yourself); yourself]
!

processTerminate22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processTerminate22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processTerminate22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processTerminate22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EA0@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@
@@@GAP@@APXFB@@@AP\@@@@@@@@@@@@@B@XEAPXFA XEAPXH@@@@@@@@@@@@@@@GA XFA XFA XH@@@@@@@@@@@@@@@@APXFA0 GA XFA0@@@@@@@@@@@@@@
APXFA0 @@@TFA XG@@@@@@@@@@@EAPXFA  @@@@@APXFA TGC@@@@@@@B@ FA XG@@@LC@TFA XHC@,K@@@@@@@@A0\FA TLB0,LC@XHC@,KBP@@@@@@@@@G
A XFAPTJB0,LB0,KBP@@@@@@@@@@APXFA XFA (KB0,KBP@@@@@@@@@@APXHA0XFA XFC@,KC@@@@@@@@@@@@@\H@@@EA XGC@,KB00@@@@@@@@@@@@@@@@@
@@THC@,I@@(KC@@@@@@@@@@@@@@@@@@EB@0I@@@@B ,@@@@@@@@@@@@@@@@@@@0K@@@@@@@JB0@@@@@@@@@@@@@@@@@LBP@@@@@@@@,@@@@@@@@@@@@@@@@@
C@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127 64 0 0 128 0 0 192 0 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@F@@@O@@COL@G?>@G?>@C?<@C?<@O??@_9? _;?0O??0C?? C??@G?>@G?>@CO?@@O#@@GA @C@ @B@@@@@@') ; yourself); yourself]
!

processTerminateGroup22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self processTerminateGroup22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#processTerminateGroup22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class processTerminateGroup22x22Icon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@AP\@@@@@@@@@@@@@@@@@@@@@@@@@@@TG@@@@@@@@@@@@@@@@@@@@A0T@@@TFA  @@@TG@@@@@@@@@@@@
@@ FAPTF@@@FAPTFB@@@@@@@@@@@@@@@A0XF@@TG@@XFB@@@@@@@@@@@@@@@@@@FA @EA0@FA @@@@@@@@@@@@@@@@\E@@@EA XH@@@EA0@@@@@@@@@@AP@H
A TEA XFA TEA  @A0@@@@@@@@ H@@\FA XFA XFA  @B@ @@@@@@@@@@@@EA XGB@\FA XG@@@@@@@L@@@@@@@EA XGB@@@AP0LA \@@@@LB0,@@@TEA XF
B@@FA 0KB00LAP\LB0,I@@@HB@XFA \@A X@AP(KB00KB0,I@@@@@@@GA0XFAP@@APXFB ,KB0,I@@@@@@@@@@\FA XEAPXFA  LB0,L@@@@@@@@@@@EA XF
A XFA XLB0,KC@@@@@@@@@@EA  GA XFA XLB0$@B ,L@@@@@@@@A0 @@@TFA \@C@$H@@@JB0@@@@@@@@@@@@@@AP @C@,@@@@@@@(K@@@@@@@@@@@@@@TH
@@0I@@@@@@@@B0@@@@@@@@@@@@@@@@@L@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 128 128 128 160 160 160 195 195 195 220 220 220 255 255 255 194 194 194 161 161 165 127 127 127 64 0 0 128 0 0 192 0 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@L@@@^@@F^X@O?<@O?<@G?8@G?8@_?>@???@???@_?>P_?>8???8???0_?? G??@G??@O?? O?= F_80@_ P@M@@') ; yourself); yourself]
!

raiseWindow22x22Icon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self raiseWindow22x22Icon inspect
     ImageEditor openOnClass:self andSelector:#raiseWindow22x22Icon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'ProcessMonitorV2 class raiseWindow22x22Icon'
        ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@.K"8.K"8.K"8.K"8.K"8.K"8.K @@@@@@@ HB@ HB@ HB@ HB@ HB@B8@@@@@@@H+J2,+J2,+J2,+J2,+@ @.@@@@@@@BJ2,+J2,+J2,+J2,+J2 @K @@
@ HB@ HB@ HB@ HB@ HBJ2,"@B8@@@HB@ HB@ HB@ HB@ HB@",EF @.@@@B@ HB@ HB@ HB@ HB@" EHQ(@K @@@ HB@ HB@ HB@ HB@ H"AR$(@B8@@@H+
J2,+J2,+J2,+J2,!!JBD''J@@.@@@BJ2,+J2,+J2,+J2,+HR !!I2 @K @@@",+J2,+J2,+J2,+J2\(HRL @B8@@@H+J2,+J2,+J2,+J2,''JBT#H@@.@@@BJ2,+
J2,+J2,+J2,EI2 ''A"@@K @@@",+J2,+J2,+J2,EARL I0X @B8@@@H+J2,+J2,+J2,EAR$#HB\FH@@.@@@BJ2,+J2,+J2,EAR$)A"@F@2@@K @@@",+J2,+
J2,EAR$)HPX HB@Y@B8@@@H+J2,+J2,EAPT)HRDFH@@@@@@.@@@BJ2,EJR$)HRD!!CB\''@2@@@@@@K @@DRPGA2<^D@,KJ!!<-JB@Y@@@@@B8@@@@@@@@@@@@@
@@@@@@@@@@@@@@@.@@@@@@@@@@@@@@@@@@@@@@@@K"8.K @a') ; colorMapFromArray:#[160 200 248 175 200 248 0 48 168 208 208 224 207 216 240 240 240 248 223 216 224 80 136 208 240 232 240 175 208 248 176 208 248 64 112 192 239 232 232 255 248 176 255 248 24 255 248 152 79 120 192 48 120 208 159 192 248 255 248 88 160 192 248 255 248 48 255 248 96 144 184 248 240 144 24 15 56 160 63 88 176 191 216 248 240 208 24 255 248 136 79 120 200 63 104 184 48 80 176 239 232 240 31 72 176 223 216 232 80 144 208 224 224 240 255 248 200 224 224 232 48 88 176 240 240 240 64 104 184 255 248 248 47 112 208 63 96 184 236 233 216 79 128 200]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@A??0A??0A??0O??0O??0O??0O??0O??0O??0O??0O??0O??0O??0O??0O??0O??0O?>@O?>@O?>@@@@@@@@@') ; yourself); yourself]
!

terminateGroupIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self terminateGroupIcon inspect
     ImageEditor openOnClass:self andSelector:#terminateGroupIcon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class terminateGroupIcon'
	ifAbsentPut:[(Depth8Image new) width: 22; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@PDA@PXJB (JB (JB (JB TE@PDA@PDA@PXJB (JB (JB (JB (JA0TA@PD@@PXJB (JB (JB (JB (JB (JA D@@@HDB (J@ HJB (JB PDA@(JB X@@@@@
@P\G@PDAA (JB XA@PDFA XA@@@@A DA@PDA@PXJB (F@PDA@PDA@PX@A \A@PD@@@@@@@@@A DJ@@@@@@@@@@XJB DA@@,KB0,K@@@A@@,KB0,KB0@AA XF
B (@B0,KB0,@@@,KB0,KB0@A@PDA@PXJB @KB0,KB0,KB0,KB0@A@PDA@PXJB (J@@,KB0,KB0,KB0@A@PD@@PXJB (JB (@B0,KB0,KB0@JA D@@@HDB (J
@ HJB @KB0,KB0@JB X@@@@@@P\G@PDAA @KB0,KB0,K@@XA@@@@@@DA@PDA@P@KB0,KB0,KB0,@@P@@@@@A@PDA@P@KB0,KB0@KB0,KB0@@@@@@@@DA@P@K
B0,KB0@@@@,KB0,K@@@@@@@@@@@KB0,KB0@A@@@@B0,KB0,@@@@@@@@@@@@@@@@A@P@@@@@@@@@@@@@@@@@@@@@@@@DA@P@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 48 48 48 56 59 56 64 68 64 88 92 88 128 128 128 160 160 160 192 192 192 216 219 216 239 244 239 248 252 248 160 0 0]; mask:((Depth1Image new) width: 22; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<_??8_??0O??0_??8???<???<???<???<???<_??8_??0O??0O??0O??0G?/8A?''<A?#<@G@@') ; yourself); yourself]
!

terminateIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self terminateIcon inspect
     ImageEditor openOnClass:self andSelector:#terminateIcon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class terminateIcon'
	ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@@@@@@@@@@LC@@@@@@@C@ H@@@@@@@LB@ LC@@@C@ H@@@@@@@@@@@DB@ LB
@ H@@@@@@@@@@@@@@PHB@ H@@@@@@@@@@@@@@@@C@ HC@@@@@@@@@@@@@@@C@ HB@0@@@@@@@@@@@@@C@ @@@PHC@@@@@@@@@@@@@0@@@@@A@ @@@@@@@@@@
@0H@@@@@@@DB@@@@@@@@@@L@@@@@@@@@@ @@@@@@@@@C@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[64 0 0 128 0 0 192 0 0 255 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@HCA0_O@_8@?@A8@O A7@FL@0XC@ H@@@@@@@b') ; yourself); yourself]
!

viewDetailsIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self viewDetailsIcon inspect
     ImageEditor openOnClass:self andSelector:#viewDetailsIcon
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
	constantNamed:#'ProcessMonitorV2 class viewDetailsIcon'
	ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@]+X@@@@@]+X@@@@@]+X@@@@@]+X@@@@@@@@b') ; yourself); yourself]
! !

!ProcessMonitorV2 class methodsFor:'interface specs'!

windowSpec
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIPainter may not be able to read the specification."

    "
     UIPainter new openOnClass:ProcessMonitorV2 andSelector:#windowSpec
     ProcessMonitorV2 new openInterface:#windowSpec
     ProcessMonitorV2 open
    "

    <resource: #canvas>

    ^
     #(FullSpec
        name: windowSpec
        window:
       (WindowSpec
          label: 'ProcessMonitor'
          name: 'ProcessMonitor'
          min: (Point 10 10)
          bounds: (Rectangle 0 0 791 358)
          menu: mainMenu
        )
        component:
       (SpecCollection
          collection: (
           (MenuPanelSpec
              name: 'ToolBar1'
              layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
              menu: toolBarMainMenu
              textDefault: true
            )
           (DataSetSpec
              name: 'ProcessTable'
              layout: (LayoutFrame 0 0.0 32 0.0 0 1.0 -23 1)
              model: selectedProcesses
              menu: tableMenu
              hasHorizontalScrollBar: true
              hasVerticalScrollBar: true
              dataList: processList
              useIndex: false
              doubleClickSelector: doubleClickedAt:
              columnHolder: tableColumns
              multipleSelectOk: true
              verticalSpacing: 0
              postBuildCallback: postBuildProcessTable:
            )
           (LabelSpec
              label: 'Update Contents Delay (s):'
              name: 'ContentsUpdateLabel'
              layout: (LayoutFrame -593 1 -20 1 -402 1 0 1)
              translateLabel: true
              adjust: right
            )
           (ViewSpec
              name: 'Box1'
              layout: (LayoutFrame -396 1 -22 1 -306 1 0 1)
              level: 0
              component:
             (SpecCollection
                collection: (
                 (ArrowButtonSpec
                    name: 'ArrowButton3'
                    layout: (LayoutFrame 68 0 0 0 89 0 20 0)
                    model: increaseupdateContentsDelayTime
                    enableChannel: enableIncreaseContentsDelayTime
                    isTriggerOnDown: true
                    autoRepeat: true
                    actionValue: ''
                    direction: up
                  )
                 (InputFieldSpec
                    name: 'EntryField2'
                    layout: (LayoutFrame 22 0 0 0 66 0 20 0)
                    model: updateContentsDelayTime
                    acceptOnReturn: true
                    acceptOnTab: true
                    acceptOnLostFocus: true
                    acceptOnPointerLeave: false
                  )
                 (ArrowButtonSpec
                    name: 'ArrowButton4'
                    layout: (LayoutFrame 0 0 0 0 20 0 20 0)
                    model: decreaseupdateContentsDelayTime
                    enableChannel: enableDecreaseContentsDelayTime
                    isTriggerOnDown: true
                    autoRepeat: true
                    actionValue: ''
                    direction: down
                  )
                 )

              )
            )
           (LabelSpec
              label: 'Update List Delay (s):'
              name: 'ListUpdateLabel'
              layout: (LayoutFrame -301 1 -20 1 -93 1 0 1)
              translateLabel: true
              adjust: right
            )
           (ViewSpec
              name: 'Box2'
              layout: (LayoutFrame -89 1 -21 1 1 1 1 1)
              level: 0
              component:
             (SpecCollection
                collection: (
                 (ArrowButtonSpec
                    name: 'ArrowButton5'
                    layout: (LayoutFrame 68 0 0 0 89 0 20 0)
                    model: increaseupdateListDelayTime
                    enableChannel: enableIncreaseListDelayTime
                    isTriggerOnDown: true
                    autoRepeat: true
                    actionValue: ''
                    direction: up
                  )
                 (InputFieldSpec
                    name: 'EntryField3'
                    layout: (LayoutFrame 22 0 0 0 66 0 20 0)
                    model: updateListDelayTime
                    acceptOnReturn: true
                    acceptOnTab: true
                    acceptOnLostFocus: true
                    acceptOnPointerLeave: false
                  )
                 (ArrowButtonSpec
                    name: 'ArrowButton6'
                    layout: (LayoutFrame 0 0 0 0 20 0 20 0)
                    model: decreaseupdateListDelayTime
                    enableChannel: enableDecreaseListDelayTime
                    isTriggerOnDown: true
                    autoRepeat: true
                    actionValue: ''
                    direction: down
                  )
                 )

              )
            )
           )

        )
      )
! !

!ProcessMonitorV2 class methodsFor:'menu specs'!

applicationMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#applicationMenu
     (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 applicationMenu)) startUp
    "

    <resource: #menu>

    ^
     #(Menu
	(
	 (MenuItem
	    enabled: hasSelectionWithApplicationProcessHolder
	    label: 'Raise Applications Window'
	    itemValue: raiseApplicationWindow
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: hasSelectionWithApplicationProcessHolder
	    label: 'Lower Applications Window'
	    itemValue: lowerApplicationWindow
	    translateLabel: true
	  )
	 (MenuItem
	    label: '-'
	  )
	 (MenuItem
	    enabled: hasSelectionWithApplicationProcessHolder
	    label: 'Close'
	    itemValue: closeApplication
	    translateLabel: true
	  )
	 )
	nil
	nil
      )

    "Modified: / 07-06-2007 / 12:44:21 / cg"
!

debugMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#debugMenu
     (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 debugMenu)) startUp
    "

    <resource: #menu>

    ^
     #(Menu
        (
         (MenuItem
            enabled: hasSelectionHolder
            label: 'Inspect Process'
            itemValue: inspectSelection
            translateLabel: true
          )
         (MenuItem
            enabled: hasSelectionWithApplicationProcessHolder
            label: 'Inspect Application'
            itemValue: inspectApplication
            translateLabel: true
          )
         (MenuItem
            label: '-'
          )
         (MenuItem
            enabled: hasSelectionWithApplicationProcessHolder
            label: 'Browse Application'
            itemValue: browseApplication
            translateLabel: true
          )
         (MenuItem
            label: '-'
            isVisible: allowModificationsAndHasDebugger
          )
         (MenuItem
            enabled: hasSelectionHolder
            label: 'Debug'
            itemValue: debugProcess
            translateLabel: true
            isVisible: allowModificationsAndHasDebugger
          )
         )
        nil
        nil
      )

    "Modified: / 07-06-2007 / 12:49:58 / cg"
!

mainMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#mainMenu
     (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 mainMenu)) startUp
    "

    <resource: #menu>

    ^
     #(Menu
	(
	 (MenuItem
	    label: 'File'
	    translateLabel: true
	    submenu:
	   (Menu
	      (
	       (MenuItem
		  label: 'Exit'
		  itemValue: closeRequest
		  translateLabel: true
		)
	       )
	      nil
	      nil
	    )
	  )
	 (MenuItem
	    label: 'Process'
	    translateLabel: true
	    isVisible: allowModifications
	    submenuChannel: processMenu
	  )
	 (MenuItem
	    label: 'Application'
	    translateLabel: true
	    submenuChannel: applicationMenu
	    keepLinkedMenu: true
	  )
	 (MenuItem
	    label: 'Debug'
	    translateLabel: true
	    submenuChannel: debugMenu
	    keepLinkedMenu: true
	  )
	 (MenuItem
	    label: 'View'
	    translateLabel: true
	    submenuChannel: viewDetailsMenuSpec
	  )
	 (MenuItem
	    label: 'Help'
	    translateLabel: true
	    startGroup: conditionalRight
	    submenu:
	   (Menu
	      (
	       (MenuItem
		  label: 'Documentation'
		  itemValue: openDocumentation
		  translateLabel: true
		)
	       (MenuItem
		  label: '-'
		)
	       (MenuItem
		  label: 'About this Application...'
		  itemValue: openAboutThisApplication
		  translateLabel: true
		)
	       )
	      nil
	      nil
	    )
	  )
	 )
	nil
	nil
      )
!

processMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#processMenu
     (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 processMenu)) startUp
    "

    <resource: #menu>

    ^
     #(Menu
	(
	 (MenuItem
	    enabled: hasSelectionWithStoppedProcessHolder
	    label: 'Resume'
	    itemValue: resumeProcess
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Suspend'
	    itemValue: suspendProcess
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Stop'
	    itemValue: stopProcess
	    translateLabel: true
	  )
	 (MenuItem
	    label: '-'
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Abort'
	    itemValue: abortProcess
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Terminate'
	    itemValue: terminateProcess
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Hard Terminate'
	    itemValue: hardTerminateProcess
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Terminate Group'
	    itemValue: terminateProcessGroup
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: selectionRestartable
	    label: 'Restart'
	    itemValue: restartProcess
	    translateLabel: true
	  )
	 (MenuItem
	    label: '-'
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Raise Prio'
	    itemValue: raisePrio
	    translateLabel: true
	  )
	 (MenuItem
	    enabled: hasSelectionHolder
	    label: 'Lower Prio'
	    itemValue: lowerPrio
	    translateLabel: true
	  )
	 )
	nil
	nil
      )
!

tableMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#tableMenu
     (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 tableMenu)) startUp
    "

    <resource: #menu>

    ^
     #(#Menu
	#(
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Debug'
	    #itemValue: #debugProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Inspect'
	    #itemValue: #inspectSelection
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionWithApplicationProcessHolder
	    #label: 'Inspect Application'
	    #itemValue: #inspectApplication
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionWithApplicationProcessHolder
	    #label: 'Browse Application'
	    #itemValue: #browseApplication
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #label: '-'
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionWithStoppedProcessHolder
	    #label: 'Resume'
	    #itemValue: #resumeProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Suspend'
	    #itemValue: #suspendProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Stop'
	    #itemValue: #stopProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #label: '-'
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Abort'
	    #itemValue: #abortProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Terminate'
	    #itemValue: #terminateProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Hard Terminate'
	    #itemValue: #hardTerminateProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Terminate Group'
	    #itemValue: #terminateProcessGroup
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #selectionRestartable
	    #label: 'Restart'
	    #itemValue: #restartProcess
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #label: '-'
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Raise Prio'
	    #itemValue: #raisePrio
	    #translateLabel: true
	  )
	 #(#MenuItem
	    #enabled: #hasSelectionHolder
	    #label: 'Lower Prio'
	    #itemValue: #lowerPrio
	    #translateLabel: true
	  )
	 )
	nil
	nil
      )

    "Modified: / 07-06-2007 / 12:49:47 / cg"
!

toolBarMainMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#toolBarMainMenu
     (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 toolBarMainMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(Menu
        (
         (MenuItem
            activeHelpKey: Inspect
            enabled: hasSelectionHolder
            label: 'Inspect'
            itemValue: inspectSelection
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processInspect22x22Icon)
          )
         (MenuItem
            activeHelpKey: Debug
            enabled: hasSelectionHolder
            label: 'Debug'
            itemValue: debugProcess
            translateLabel: true
            isButton: true
            isVisible: allowModificationsAndHasDebugger
            labelImage: (ResourceRetriever ProcessMonitorV2 processDebug22x22Icon)
          )
         (MenuItem
            activeHelpKey: RaiseWindow
            enabled: hasSelectionWithApplicationProcessHolder
            label: 'Raise Applications Window'
            itemValue: raiseApplicationWindow
            translateLabel: true
            isButton: true
            labelImage: (ResourceRetriever ProcessMonitorV2 raiseWindow22x22Icon)
          )
         (MenuItem
            label: '-'
            isVisible: allowModifications
          )
         (MenuItem
            activeHelpKey: Resume
            enabled: hasSelectionWithStoppedProcessHolder
            label: 'Resume'
            itemValue: resumeProcess
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processResume22x22Icon)
          )
         (MenuItem
            activeHelpKey: Stop
            enabled: hasSelectionHolder
            label: 'Stop'
            itemValue: stopProcess
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processStop22x22Icon)
          )
         (MenuItem
            activeHelpKey: Abort
            enabled: hasSelectionHolder
            label: 'Abort'
            itemValue: abortProcess
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processAbort22x22Icon)
          )
         (MenuItem
            label: '-'
            isVisible: allowModifications
          )
         (MenuItem
            activeHelpKey: Terminate
            enabled: hasSelectionHolder
            label: 'Terminate'
            itemValue: terminateProcess
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processTerminate22x22Icon)
          )
         (MenuItem
            activeHelpKey: #'Terminate Group'
            enabled: hasSelectionHolder
            label: 'Terminate Group'
            itemValue: terminateProcessGroup
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processTerminateGroup22x22Icon)
          )
         (MenuItem
            activeHelpKey: Restart
            enabled: selectionRestartable
            label: 'Restart'
            itemValue: restartProcess
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processRestart22x22Icon)
          )
         (MenuItem
            label: '-'
            isVisible: allowModifications
          )
         (MenuItem
            activeHelpKey: #'Lower Prio'
            enabled: hasSelectionHolder
            label: 'Lower Prio'
            itemValue: lowerPrio
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processLowerPrio22x22Icon)
          )
         (MenuItem
            activeHelpKey: #'Raise Prio'
            enabled: hasSelectionHolder
            label: 'Raise Prio'
            itemValue: raisePrio
            translateLabel: true
            isButton: true
            isVisible: allowModifications
            labelImage: (ResourceRetriever ProcessMonitorV2 processRaisePrio22x22Icon)
          )
         (MenuItem
            label: ''
            isVisible: allowModifications
          )
         (MenuItem
            activeHelpKey: #'Update Process List'
            label: 'Update'
            itemValue: updateList
            translateLabel: true
            isButton: true
            startGroup: right
            labelImage: (ResourceRetriever ToolbarIconLibrary reloadIcon)
          )
         (MenuItem
            activeHelpKey: Details
            label: 'View Details'
            translateLabel: true
            isButton: true
            startGroup: right
            submenuChannel: viewDetailsMenuSpec
            labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon)
          )
         )
        nil
        nil
      )
!

viewDetailsMenuSpec
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#viewDetailsMenuSpec
     (Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 viewDetailsMenuSpec)) startUp
    "

    <resource: #menu>

    ^
     #(#Menu
	#(
	 #(#MenuItem
	    #label: 'Id'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showProcessId
	  )
	 #(#MenuItem
	    #label: 'Group'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showGroup
	  )
	 #(#MenuItem
	    #label: 'State'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showState
	  )
	 #(#MenuItem
	    #label: 'Prio'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showPrio
	  )
	 #(#MenuItem
	    #label: 'Used Stack'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showUsedStack
	  )
	 #(#MenuItem
	    #label: 'Total Stack'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showTotalStack
	  )
	 #(#MenuItem
	    #label: 'Current-Segment'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showCurrentSegment
	  )
	 #(#MenuItem
	    #label: 'Switch'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showSwitch
	  )
	 #(#MenuItem
	    #label: 'Where'
	    #translateLabel: true
	    #hideMenuOnActivated: false
	    #indication: #showWhere
	  )
	 #(#MenuItem
	    #label: '-'
	  )
	 #(#MenuItem
	    #label: 'Show Dead Processes'
	    #translateLabel: true
	    #indication: #showDead
	  )
	 #(#MenuItem
	    #label: '-'
	  )
	 #(#MenuItem
	    #label: 'Update'
	    #itemValue: #updateView
	    #translateLabel: true
	  )
	 )
	nil
	nil
      )
! !

!ProcessMonitorV2 class methodsFor:'tableColumns specs'!

tableColumns
    "This resource specification was automatically generated
     by the DataSetBuilder of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the DataSetBuilder may not be able to read the specification."

    "
     DataSetBuilder new openOnClass:ProcessMonitorV2 andSelector:#tableColumns
    "

    <resource: #tableColumns>

    ^#(
      #(#DataSetColumnSpec
	 #label: 'Id'
	 #id: #id
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'idVal'
	 #width: 45
	 #type: #number
	 #model: #processId
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Group'
	 #id: #group
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'groupVal'
	 #width: 45
	 #model: #processGroup
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Name'
	 #id: #name
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processName'
	 #width: 200
	 #model: #processName
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: ''
	 #id: #active
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processActive'
	 #width: 10
	 #height: 5
	 #model: #processActive
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'State'
	 #id: #state
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processState'
	 #width: 100
	 #model: #processState
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Prio'
	 #id: #prio
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'prioVal'
	 #width: 40
	 #model: #processPrio
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Used Stack'
	 #id: #usedStack
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processUsedStack'
	 #columnAlignment: #right
	 #width: 75
	 #type: #number
	 #model: #processUsedStack
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Total Stack'
	 #id: #totalStack
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processTotalStack'
	 #columnAlignment: #right
	 #width: 75
	 #model: #processTotalStack
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Current-Segment'
	 #id: #currentSegment
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processCurrentSegment'
	 #width: 110
	 #model: #processCurrentSegment
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Switch'
	 #id: #switch
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processSwitch'
	 #columnAlignment: #right
	 #width: 55
	 #type: #number
	 #model: #processSwitch
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      #(#DataSetColumnSpec
	 #label: 'Where'
	 #id: #where
	 #labelAlignment: #left
	 #labelButtonType: #Button
	 #labelActionSelector: #sortProcessListBy:
	 #labelActionArgument: 'processWhere'
	 #model: #processWhere
	 #canSelect: false
	 #showRowSeparator: false
	 #showColSeparator: false
       )
      )
! !

!ProcessMonitorV2 methodsFor:'accessing'!

visibleBlock
    ^ visibleBlock
!

visibleBlock:aProcessVisibleFilterBlock
    visibleBlock := aProcessVisibleFilterBlock.
! !

!ProcessMonitorV2 methodsFor:'actions'!

changeSelectionTo:aSelection
    | newSelection |

    aSelection notNil ifTrue:[
        newSelection := OrderedCollection new.
        aSelection do:[:processItem |
            | index |

            index := processList findFirst:[:anItem | (anItem processInstance == processItem processInstance)].
            index ~~ 0 ifTrue:[
                newSelection add:(processList at:index).
            ].
        ].
        self selectedProcesses value:newSelection
    ].
!

changeSelectionToProcesses:aProcessList

    aProcessList notNil ifTrue:[
	| newSelection |
	newSelection := OrderedCollection new.
	aProcessList do:[:aProcess |
	    | index |
	    index := processList findFirst:[:anItem | (anItem processInstance == aProcess)].
	    index ~~ 0 ifTrue:[
		newSelection add:(processList at:index).
	    ].
	].
	self selectedProcesses value:newSelection
    ].
!

decreaseupdateContentsDelayTime

    self updateContentsDelayTime value:(self scaledUpdateContentsDelayTime - 0.1).
    self evaluateEnableInDecreaseButtons.
!

decreaseupdateListDelayTime

    self updateListDelayTime value:(self scaledUpdateListDelayTime - 0.1).
    self evaluateEnableInDecreaseButtons.
!

doubleClickedAt:anItemIndex
    "open a debugger on the selected process"

    self debugProcess
!

evaluateEnableInDecreaseButtons

    | contDelaySmallerListDelay |

    contDelaySmallerListDelay := (self scaledUpdateContentsDelayTime < (self scaledUpdateListDelayTime)).
    self enableDecreaseContentsDelayTime value:((self scaledUpdateContentsDelayTime <= 0.5) not).
    self enableDecreaseListDelayTime value:contDelaySmallerListDelay.
    self enableIncreaseContentsDelayTime value:contDelaySmallerListDelay.
!

getProcessList
    "select processes to display.
     Subclasses may redefine this"

    |coll|

    self showDead value ifTrue:[
	coll := Process allSubInstances asOrderedCollection.
    ] ifFalse:[
	coll := ProcessorScheduler knownProcesses asOrderedCollection.
    ].
    ^ coll
!

increaseupdateContentsDelayTime

    self updateContentsDelayTime value:(self scaledUpdateContentsDelayTime + 0.1).
    self evaluateEnableInDecreaseButtons.
!

increaseupdateListDelayTime

    self updateListDelayTime value:(self scaledUpdateListDelayTime + 0.1).
    self evaluateEnableInDecreaseButtons.
!

selectedProcessesDo:aBlock
    | sel proc|

    sel := self selectedProcesses value.
    sel isNil ifTrue:[^ self].

    sel do:[:processItem |
	proc := processItem processInstance.
	proc notNil ifTrue:[
	    aBlock value:proc.
	].
    ].

    "Modified: / 07-06-2007 / 12:38:25 / cg"
!

selectedProcessesSend:aSelector
    "send a message to all selected processes"

    self selectedProcessesDo:[:p |
	p perform:aSelector
    ].

    self updateList.

    "Modified: / 07-06-2007 / 12:38:29 / cg"
! !

!ProcessMonitorV2 methodsFor:'aspects'!

allowModifications

    allowModifications isNil ifTrue:[
	allowModifications := true asValue
    ].
    ^ allowModifications
!

allowModificationsAndHasDebugger
    ^ BlockValue
        forLogical:(self allowModifications)
        and:[ Debugger notNil ]
!

currentSortOrder
    "return/create the 'currentSortOrder' value holder (automatically generated)"

    currentSortOrder isNil ifTrue:[
	currentSortOrder := Dictionary new asValue.
    ].
    ^ currentSortOrder
!

enableDecreaseContentsDelayTime

    enableDecreaseContentsDelayTime isNil ifTrue:[
	enableDecreaseContentsDelayTime := true asValue.
    ].
    ^ enableDecreaseContentsDelayTime.
!

enableDecreaseListDelayTime

    enableDecreaseListDelayTime isNil ifTrue:[
	enableDecreaseListDelayTime := true asValue.
    ].
    ^ enableDecreaseListDelayTime.
!

enableIncreaseContentsDelayTime

    enableIncreaseContentsDelayTime isNil ifTrue:[
	enableIncreaseContentsDelayTime := true asValue.
    ].
    ^ enableIncreaseContentsDelayTime.
!

enableIncreaseListDelayTime

    enableIncreaseListDelayTime isNil ifTrue:[
	enableIncreaseListDelayTime := true asValue.
    ].
    ^ enableIncreaseListDelayTime.
!

hasSelection
    ^ self selectedProcesses value notEmptyOrNil

    "Modified: / 05-06-2007 / 17:43:58 / cg"
!

hasSelectionHolder
    ^ hasSelectionHolder

    "Created: / 05-06-2007 / 17:41:54 / cg"
!

hasSelectionWithApplicationProcess
    ^ self hasSelectionWithProcessForWhich:[:p |self isApplicationProcess:p ]

    "Created: / 05-06-2007 / 17:50:37 / cg"
!

hasSelectionWithApplicationProcessHolder
    ^ hasSelectionWithApplicationProcessHolder

    "Created: / 05-06-2007 / 17:50:31 / cg"
!

hasSelectionWithGUIProcess
    ^ self hasSelectionWithProcessForWhich:[:p |p isGUIProcess ]

    "Created: / 05-06-2007 / 17:52:10 / cg"
!

hasSelectionWithGUIProcessHolder
    ^ hasSelectionWithGUIProcessHolder

    "Created: / 05-06-2007 / 17:52:01 / cg"
!

hasSelectionWithProcessForWhich:aBlock
    ^ self hasSelection
      and:[ self selectedProcesses value contains:[:pItem |
		|process|

		process := pItem processInstance.
		process notNil and:[ aBlock value:process ]]  ]

    "Created: / 05-06-2007 / 17:40:27 / cg"
!

hasSelectionWithStoppedProcess
    ^ self hasSelectionWithProcessForWhich:[:p |p isStopped ]

    "Modified: / 05-06-2007 / 17:40:42 / cg"
!

hasSelectionWithStoppedProcessHolder
    ^ hasSelectionWithStoppedProcessHolder

    "Created: / 05-06-2007 / 17:42:41 / cg"
!

processList

    processList isNil ifTrue:[
	processList := List new.
    ].
    ^ processList.
!

scaledUpdateContentsDelayTime

    ^ self updateContentsDelayTime value asFloat asFixedPoint:1.
!

scaledUpdateListDelayTime

    ^ self updateListDelayTime value asFloat asFixedPoint:1.
!

selectedProcesses

    selectedProcesses isNil ifTrue:[
	selectedProcesses := ValueHolder new.
	selectedProcesses addDependent:self.
    ].
    ^ selectedProcesses.
!

selectionRestartable

    selectionRestartable isNil ifTrue:[
	selectionRestartable := ValueHolder new.
    ].
    ^ selectionRestartable
!

showDead
    "return/create the 'showDead' value holder (automatically generated)"

    showDead isNil ifTrue:[
	showDead := false asValue.
	showDead addDependent:self.
    ].
    ^ showDead
!

sortBlock

    sortBlock isNil ifTrue:[
	| curSortOrder defaultSortInstance|
	defaultSortInstance := #idVal.
	sortBlock := [:a :b |
	    ((a perform:defaultSortInstance) < (b perform:defaultSortInstance))
	].
	curSortOrder := self currentSortOrder value.
	curSortOrder at:#column put:defaultSortInstance.
	curSortOrder at:#reverse put:true.
    ].
    ^ sortBlock
!

tableColumns

    tableColumns isNil ifTrue:[
	tableColumns := self class tableColumns asValue.
    ].
    ^ tableColumns.
!

updateContentsDelayTime

    updateContentsDelayTime isNil ifTrue:[
	updateContentsDelayTime := updateDelay asValue.
	updateContentsDelayTime onChangeSend:#evaluateEnableInDecreaseButtons to:self.
    ].
    ^ updateContentsDelayTime.
!

updateListDelayTime

    updateListDelayTime isNil ifTrue:[
	updateListDelayTime := listUpdateDelay asValue.
	updateListDelayTime onChangeSend:#evaluateEnableInDecreaseButtons to:self.
    ].
    ^ updateListDelayTime.
! !

!ProcessMonitorV2 methodsFor:'aspects column'!

showCurrentSegment
    "return/create the 'showCurrentSegment' value holder (automatically generated)"

    showCurrentSegment isNil ifTrue:[
	showCurrentSegment := showDetail asValue.
	showCurrentSegment onChangeSend:#viewedColumnsChanged to:self.
    ].
    ^ showCurrentSegment
!

showGroup
    "return/create the 'showGroup' value holder (automatically generated)"

    showGroup isNil ifTrue:[
	showGroup := true asValue.
	showGroup onChangeSend:#viewedColumnsChanged to:self.
    ].
    ^ showGroup
!

showPrio
    "return/create the 'showPrio' value holder (automatically generated)"

    showPrio isNil ifTrue:[
	showPrio := true asValue.
	showPrio onChangeSend:#viewedColumnsChanged to:self.
    ].
    ^ showPrio
!

showProcessId

    showProcessId isNil ifTrue:[
	showProcessId := true asValue.
	showProcessId onChangeSend:#viewedColumnsChanged to:self
    ].
    ^ showProcessId
!

showState
    "return/create the 'showState' value holder (automatically generated)"

    showState isNil ifTrue:[
	showState := true asValue.
	showState onChangeSend:#viewedColumnsChanged to:self
    ].
    ^ showState
!

showSwitch
    "return/create the 'showSwitch' value holder (automatically generated)"

    showSwitch isNil ifTrue:[
	showSwitch := showDetail asValue.
	showSwitch onChangeSend:#viewedColumnsChanged to:self
    ].
    ^ showSwitch
!

showTotalStack
    "return/create the 'showTotalStack' value holder (automatically generated)"

    showTotalStack isNil ifTrue:[
	showTotalStack := showDetail asValue.
	showTotalStack onChangeSend:#viewedColumnsChanged to:self
    ].
    ^ showTotalStack
!

showUsedStack
    "return/create the 'showUsedStack' value holder (automatically generated)"

    showUsedStack isNil ifTrue:[
	showUsedStack := showDetail asValue.
	showUsedStack onChangeSend:#viewedColumnsChanged to:self
    ].
    ^ showUsedStack
!

showWhere
    "return/create the 'showWhere' value holder (automatically generated)"

    showWhere isNil ifTrue:[
	showWhere := true asValue.
	showWhere onChangeSend:#viewedColumnsChanged to:self
    ].
    ^ showWhere
! !

!ProcessMonitorV2 methodsFor:'change & update'!

selectionChanged

    |hasSelection allRestartable|

    hasSelection := self hasSelection.

    self hasSelectionHolder value:hasSelection.
    self hasSelectionWithStoppedProcessHolder value:self hasSelectionWithStoppedProcess.
    self hasSelectionWithApplicationProcessHolder value:self hasSelectionWithApplicationProcess.
    self hasSelectionWithGUIProcessHolder value:self hasSelectionWithGUIProcess.

    hasSelection ifFalse:[
	self selectionRestartable value:false.
	^ self
    ].

    allRestartable := true.
    self selectedProcessesDo:[:p |
	p isRestartable ifFalse:[
	    allRestartable := false
	].
    ].
    self selectionRestartable value:allRestartable.
    ^ self.

    "Modified: / 05-06-2007 / 17:51:48 / cg"
!

update:something with:aParameter from:changedObject
    "Invoked when an object that I depend upon sends a change notification."

    "stub code automatically generated - please change as required"

    changedObject == builder window ifTrue:[
	something == #visibility ifTrue:[
	    self updateList.
	].
    ].
    changedObject == self selectedProcesses ifTrue:[
	self selectionChanged.
	^ self
    ].
    changedObject == self showDead ifTrue:[
	self updateList.
	^ self
    ].
    super update:something with:aParameter from:changedObject
!

viewedColumnsChanged

    | columns buffer locCurrentSortOrder currentSortOrderColumn currentSortOrderReverse oldSelection sel|

    sel := self selectedProcesses value.
    sel notNil ifTrue:[
	oldSelection := OrderedCollection new.
	sel do:[:proItem|
	    proItem processInstance notNil ifTrue:[
		oldSelection add:(proItem processInstance)
	    ].
	].
    ].
"/    Transcript showCR:'oldSelection on catch in viewedColumnsChanged', (oldSelection isNil ifTrue:['nil'] ifFalse:[oldSelection first printString]).
    columns := OrderedCollection new.
    self class tableColumns do:[:el|
	columns add:(DataSetColumnSpec decodeFromLiteralArray:el).
    ].
    buffer := columns copy.
    locCurrentSortOrder := self currentSortOrder value.
    currentSortOrderColumn := locCurrentSortOrder at:#column ifAbsent:nil.
    currentSortOrderReverse := locCurrentSortOrder at:#reverse ifAbsent:nil.
    buffer do:[:col |
	| id |
	id := col id.
	id notNil ifTrue:[
	    (col labelActionArgument notNil and:[col labelActionArgument asSymbol == currentSortOrderColumn]) ifTrue:[
		| label icon|
		label := col label.
		icon := currentSortOrderReverse ifTrue:[self class detailsMenuIconDown] ifFalse:[self class detailsMenuIconUp].
		col label:(LabelAndIcon label:label icon:icon).
	    ].
	    #(
		( #id             #showProcessId)
		( #group          #showGroup)
		( #prio           #showPrio)
		( #currentSegment #showCurrentSegment)
		( #state          #showState)
		( #switch         #showSwitch)
		( #totalStack     #showTotalStack)
		( #usedStack      #showUsedStack)
		( #where          #showWhere)
	    ) pairsDo:[:colName :holderAccessorSelector |
		(id == colName and:[(self perform:holderAccessorSelector) value not]) ifTrue:[
		    columns remove:col.
		]
	    ]
	]
    ].
    updateSema critical:[
	self tableColumns value:columns.
"/        self updateTable:nil.
"/        Transcript showCR:'oldSelection on set in viewedColumnsChanged', (oldSelection isNil ifTrue:['nil'] ifFalse:[oldSelection first printString]).
	self changeSelectionToProcesses:oldSelection.
    ].

    "Modified: / 27-03-2007 / 08:43:49 / cg"
! !

!ProcessMonitorV2 methodsFor:'event handling'!

processEvent:anEvent
    "filter keyboard events.
     Return true, if I have eaten the event"

    |focusView key rawKey|

    anEvent isKeyPressEvent ifTrue:[
	focusView := anEvent targetView.
	key := anEvent key.
	rawKey := anEvent rawKey.

	(focusView == processList) ifTrue:[
	    key == #InspectIt ifTrue:[
		self inspectSelection.
		^ true.
	    ].
	]
    ].
    ^ false
! !

!ProcessMonitorV2 methodsFor:'initialization & release'!

commonPostOpen

    super commonPostOpen.

    builder window addDependent:self.
    self viewedColumnsChanged.
    self updateList.
    self startUpdateProcess.
    self selectionChanged.
    self sortProcessListBy:#idVal.
    self windowGroup addPreEventHook:self.
!

initialize

    super initialize.

    hasSelectionHolder := false asValue.
    hasSelectionWithStoppedProcessHolder := false asValue.
    hasSelectionWithApplicationProcessHolder := false asValue.
    hasSelectionWithGUIProcessHolder := false asValue.

    showDetail := (Smalltalk at:#SystemDebugging ifAbsent:false).
    updateSema := Semaphore forMutualExclusion.
    updateDelay := 0.5.
    listUpdateDelay := 5.0.

    "/ event mode is no longer used;
    "/ this event support may vanish
    Processor isPureEventDriven ifTrue:[
	updateBlock := [self updateStatus:nil].
	listUpdateBlock := [self updateList].
    ].

    "Modified: / 05-06-2007 / 17:53:48 / cg"
!

postBuildProcessTable:aWidget

    processTable       := aWidget scrolledView.
    processTable wantsFocusWithPointerEnter.
!

release
    updateBlock notNil ifTrue:[
	Processor removeTimedBlock:updateBlock.
	updateBlock := nil.
    ].
    listUpdateBlock notNil ifTrue:[
	Processor removeTimedBlock:listUpdateBlock.
	listUpdateBlock := nil.
    ].
    updateProcess notNil ifTrue:[
	updateProcess terminate.
	updateProcess := nil.
    ].
    super release
!

restarted
    "restarted from snapshot"

    super restarted.
    self startUpdateProcess.
! !

!ProcessMonitorV2 methodsFor:'menu accessing'!

tableMenu

    ^[
	self tableMenuAccess
    ]
!

tableMenuAccess
    self allowModifications value ifTrue:[
	tableMenu isNil ifTrue:[
	    tableMenu := Menu decodeFromLiteralArray:(self class tableMenu).
	    tableMenu receiver:self.
	    tableMenu findGuiResourcesIn:self.
	].
	^ tableMenu
    ].
    ^ nil

    "Modified: / 27-03-2007 / 08:43:43 / cg"
! !

!ProcessMonitorV2 methodsFor:'menu actions'!

abortProcess
    "abort (raise AbortSignal in) the selected process"

    self selectedProcessesDo:[:p |
	p abort
    ].
    self updateList.

    "Modified: / 07-06-2007 / 12:38:42 / cg"
!

hardTerminateProcess
    "hard terminate the selected process"

    self selectedProcessesSend:#terminateNoSignal
!

lowerPrio
    "lower the selected processes priority"

    self selectedProcessesDo:[:p |
       p priority:(p priority - 1)
    ].
    self updateList.

    "Modified: / 07-06-2007 / 12:38:50 / cg"
!

openDocumentation
    "This method was generated by the Browser.
     It will be invoked when the menu-item 'help-documentation' is selected."

    "/ change below as required ...

    "/ to open an HTML viewer on some document (under 'doc/online/<language>/' ):
    HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#PROCESSMONITOR'.

    "/ add application-specific help files under the 'doc/online/<language>/help/appName'
    "/ directory, and open a viewer with:
    "/ HTMLDocumentView openFullOnDocumentationFile:'help/<MyApplication>/TOP.html'.
!

raisePrio
    "raise the selected processes priority"

    self selectedProcessesDo:[:p |
       p priority:(p priority + 1)
    ].
    self updateList.

    "Modified: / 07-06-2007 / 12:38:57 / cg"
!

restartProcess
    "abort (raise AbortSignal in) the selected process"

    self selectedProcessesDo:[:p |
	p restart.
    ].
    self updateList.

    "Modified: / 07-06-2007 / 12:39:04 / cg"
!

resumeProcess
    "resume the selected process (i.e. let it run) "

    self selectedProcessesSend:#resume
!

stopProcess
    "stop the selected process - not even interrupts will wake it up"

    self selectedProcessesSend:#stop
!

suspendProcess
    "suspend the selected process - interrupts will let it run again"

    self selectedProcessesSend:#suspend
!

terminateProcess
    "terminate the selected process"

    self selectedProcessesSend:#terminate.
    self updateList.
!

terminateProcessGroup
    "terminate the selected process with all of its subprocesses"

    self selectedProcessesSend:#terminateGroup.
    self updateList.
! !

!ProcessMonitorV2 methodsFor:'menu actions-application'!

closeApplication
    "close the process(es) topView(s)"

    self selectedApplicationTopViewsDo:[:topView | topView terminate]

    "Created: / 07-06-2007 / 12:40:20 / cg"
!

lowerApplicationWindow
    "lower the selected process(es) topView(s)"

    self selectedApplicationTopViewsDo:[:topView | topView lower]

    "Created: / 07-06-2007 / 12:43:46 / cg"
!

raiseApplicationWindow
    "raise the selected process(es) topView(s)"

    self selectedApplicationTopViewsDo:[:topView | topView raiseDeiconified]

    "Created: / 05-06-2007 / 18:37:30 / cg"
    "Modified: / 07-06-2007 / 12:43:55 / cg"
!

selectedApplicationTopViewsDo:aBlock
    self selectedProcessesDo:[:eachProcess |
	|wg app topView|

	wg := self windowGroupOfProcess:eachProcess.
	wg notNil ifTrue:[
	    (topView := wg mainView) notNil ifTrue:[
		aBlock value:topView.
	    ]
	]
    ]

    "Created: / 07-06-2007 / 12:42:09 / cg"
! !

!ProcessMonitorV2 methodsFor:'menu actions-debug'!

browseApplication
    "open a browser on the selected process(es) application or topView"

    self selectedApplicationTopViewsDo:[:topView |
	|app|

	(app := topView application) notNil ifTrue:[
	    app class browse.
	] ifFalse:[
	    topView class browse.
	]
   ]

    "Created: / 07-06-2007 / 12:48:05 / cg"
!

debugProcess
    "open a debugger on the selected process(es)"

    Debugger isNil ifTrue:[ ^ self ].

    self selectedProcessesDo:[:p |
       Debugger openOn:p
    ]

    "Modified: / 07-06-2007 / 12:34:43 / cg"
!

debugWhenResumed
    "open a debugger when the selected process(es) is resumed"

    Debugger isNil ifTrue:[ ^ self ].

    self selectedProcessesDo:[:p |
       p addInterruptAction:[Debugger enter]
    ]

    "Modified: / 07-06-2007 / 12:34:38 / cg"
!

inspectApplication
    "open an inspector on the selected process(es) application or topView"

    self selectedApplicationTopViewsDo:[:topView |
	|app|

	(app := topView application) notNil ifTrue:[
	    app inspect.
	] ifFalse:[
	    topView inspect.
	]
   ]

    "Modified: / 07-06-2007 / 12:46:42 / cg"
!

inspectSelection
    "open an inspector on the selected process"

    self selectedProcessesSend:#inspect
! !

!ProcessMonitorV2 methodsFor:'private queries'!

isApplicationProcess:aProcess
    ^ (self windowGroupOfProcess:aProcess) notNil.
!

windowGroupOfProcess:aProcess
    WindowGroup scheduledWindowGroups
	do:[:eachGroup |
	    (eachGroup process == aProcess) ifTrue:[
		eachGroup isModal ifTrue:[
		    ^ eachGroup previousGroup
		].
		^ eachGroup
	    ]
	].

    ^ nil
! !

!ProcessMonitorV2 methodsFor:'queries - table string'!

getActiveStringFor:aProcess running:isRunning
    |stateCharacter|

    isRunning ifTrue:[
	stateCharacter := '*'.
    ] ifFalse:[
	[
	    (Processor scheduledProcesses includes:aProcess) ifTrue:[
		stateCharacter := '+'
	    ] ifFalse:[
		stateCharacter := ''.
	    ].
	] valueUninterruptably.
    ].
    ^ stateCharacter.
!

getCurrentSegmentStringFor:con

    con notNil ifTrue:[
	| contextCount c sender|
	contextCount := 1.
	c := con.
	[(sender := c sender) notNil] whileTrue:[
	    c := sender.
	    contextCount := contextCount + 1.
	].
	^ (((ObjectMemory addressOf:con) printStringRadix:16),
	   ' .. ',
	   ((ObjectMemory addressOf:c) printStringRadix:16)).
    ].
    ^ ''
!

getGroupStringFor:aProcess

    |gId|

    gId := aProcess processGroupId.
    ((gId == aProcess id) or:[gId isNil]) ifTrue:[
	"/ a group leader
	^ '-'.
    ] ifFalse:[
	^ gId.
    ].
!

getPrioStringFor:aProcess

    |prioRange|

    Processor supportDynamicPriorities ifTrue:[
	(prioRange := aProcess priorityRange) isNil ifTrue:[
	    ^ aProcess priority asString.
	] ifFalse:[
	    ^ (aProcess priority asString,
		    ' [',
		    prioRange start printString,
		    '..',
		    prioRange stop printString,
		    ']').
	].
    ].
    ^ ''
!

getTotalStackStringFor:aProcess


    aProcess id == 0 ifTrue:[
	^ 'unlimited'.
    ] ifFalse:[
	| tStackSize noOfSegs |
	((tStackSize := aProcess totalStackSize) notNil and:[
	 (noOfSegs := aProcess numberOfStackSegments) notNil
	]) ifTrue:[
	    ^ ((tStackSize printString),
	       ' (',
	       (noOfSegs printString),
	       ')' )
	]
    ].
    ^ ''
!

getWhereStringFor:con running:isRunning
    |c found skipping rs rc r sel|

    con notNil ifTrue:[
	c := con.
	found := false.
	isRunning ifFalse:[
	    "/ search for a semaphore-wait in the top 10 contexts
	    1 to:10 do:[:n |
		found ifFalse:[
		    c notNil ifTrue:[
			(c receiver class == Semaphore) ifTrue:[
			    c selector == #wait ifTrue:[
				found := true.
			    ]
			].
			c := c sender.
		    ]
		]
	    ].
	].
	found ifFalse:[
	    "/ search for a non-processor, non-process
	    "/ receiver in the top 10 contexts
	    c := con.
	    1 to:10 do:[:n |
		found ifFalse:[
		    c notNil ifTrue:[
			((r := c receiver) ~~ Processor and:[ r class ~~ Process ]) ifTrue:[
			    found := true.
			] ifFalse:[
			    c := c sender.
			]
		    ]
		]
	    ]
	].

	"/ skip, until an interesting context is
	"/ found.
	"/ this skips intermediate contexts, which lead
	"/ to the sema-wait (for example, unwind blocks,
	"/ delay-stuff etc.)
	found ifFalse:[
	    c := con
	].
	skipping := true.
	[ skipping ] whileTrue:[
	    skipping := false.
	    (c notNil and:[ c receiver == Delay or:[ c receiver class == Delay ] ]) ifTrue:[
		c := c sender.
		skipping := true.
	    ].
	    [
		c notNil and:[ c receiver isBlock and:[ c selector startsWith:'value' ] ]
	    ] whileTrue:[
		c := c sender.
		skipping := true.
	    ].
	    [
		c notNil and:[ c receiver isBlock and:[ c selector = 'ensure:' ] ]
	    ] whileTrue:[
		c := c sender.
		skipping := true.
	    ].
	    [
		c notNil
		    and:[ c receiver == OperatingSystem and:[ c selector == #unblockInterrupts ] ]
	    ] whileTrue:[
		c := c sender.
		skipping := true.
	    ].
	    [
		c notNil and:[ c isBlockContext ]
	    ] whileTrue:[
		c := c home.
		skipping := true.
	    ].
	].
	c notNil ifTrue:[
	    sel := c selector.
	    sel isNil ifTrue:[
		sel := '* unknown *'
	    ].
	    r := c receiver.
	    rc := r class.
	    rs := rc name.
	    (rc == SharedQueue
	    or:[rc == RecursionLock]) ifTrue:[
		rs := rs , ' (', (r identityHash bitShift:-12) hexPrintString,') '.
	    ].
	    ^ (rs , '>>' , sel).
	]
    ].
    ^ ''

    "Modified: / 07-06-2007 / 22:53:40 / cg"
! !

!ProcessMonitorV2 methodsFor:'sorting'!

sortProcessListBy:instanceName
    "method to sort the list of BugReport"

    | aSymbol isReverse cmpOp currentSortOrder|

    aSymbol := instanceName asSymbol.
    isReverse := false.
    currentSortOrder := self currentSortOrder value.
    currentSortOrder isEmpty ifTrue:[
	currentSortOrder at:#column put:aSymbol.
	currentSortOrder at:#reverse put:false.
    ] ifFalse:[
	(currentSortOrder at:#column) = aSymbol ifTrue:[
	    "/ same column like before - change sort order ifReverse is true
	    isReverse := currentSortOrder at:#reverse.
	    currentSortOrder at:#reverse put:(isReverse not).
	] ifFalse:[
	    "/ another column - remark column
	    currentSortOrder at:#column put:aSymbol.
	]
    ].
    (currentSortOrder at:#reverse) ifTrue:[
	cmpOp := #'>'
    ] ifFalse:[
	cmpOp := #'<'
    ].
    sortBlock := [:a :b |
	    |entry1 entry2|

	    entry1 := (a perform:aSymbol) ? 0.
	    entry2 := (b perform:aSymbol) ? 0.
	    entry1 = entry2 ifTrue:[
		(a idVal < 0 and:[b idVal < 0]) ifTrue:[
		    "/ two dead ones (take anything which remains constant)
		    a processName ~= b processName ifTrue:[
			a processName < b processName
		    ] ifFalse:[
			a processInstance identityHash < b processInstance identityHash
		    ]
		] ifFalse:[
		    a idVal < b idVal
		]
	    ] ifFalse:[
		entry1 perform:cmpOp with:entry2
	    ]
	].
   self viewedColumnsChanged.
! !

!ProcessMonitorV2 methodsFor:'update process'!

fillItemInformationIn:processItem
    |state stateColor running con aProcess|

    aProcess := processItem processInstance.
    aProcess isNil ifTrue:[
        ^ self.
    ].

    processItem processId:aProcess id.
    processItem idVal:aProcess id ? -1.

    processItem processGroup:(self getGroupStringFor:aProcess).
    processItem groupVal:(processItem processGroup isNumber ifTrue:[processItem processGroup] ifFalse:[-1]).

    processItem processName:aProcess name ? ''.

    state := aProcess state.
    running := (state == #run and:[aProcess == Processor interruptedProcess]).

    stateColor := (state == #run) 
                        ifTrue:[ Color green darkened ]
                        ifFalse:[
                            (state == #debug or:[state == #stopped])
                                ifTrue:[ Color red ]
                                ifFalse:[ Color black ]].

    processItem processState:(state asString colorizeAllWith:stateColor).
    processItem processActive:(self getActiveStringFor:aProcess running:running).

    processItem prioVal:(aProcess priority).
    processItem processPrio:(self getPrioStringFor:aProcess).

    processItem processUsedStack:aProcess usedStackSize.
    processItem processTotalStack:(self getTotalStackStringFor:aProcess).

    con := aProcess suspendedContext.
    con isNil ifTrue:[
        aProcess == Processor activeProcess ifTrue:[
            con := thisContext
        ]
    ].
    processItem processWhere:(self getWhereStringFor:con running:running).

    processItem processCurrentSegment:(self getCurrentSegmentStringFor:con).
    processItem processSwitch:(aProcess numberOfStackBoundaryHits).
!

fillItemInformationIn:processItem with:aProcess inArray:weakArrayWithProcesses atIndex:processInstanceIndexInWeakArray

    processItem weakArrayWithProcesses:weakArrayWithProcesses.
    processItem processInstanceIndexInWeakArray:processInstanceIndexInWeakArray.
    self fillItemInformationIn:processItem
!

startUpdateProcess
    updateBlock notNil ifTrue:[
        Processor addTimedBlock:updateBlock afterSeconds:self scaledUpdateContentsDelayTime.
        Processor addTimedBlock:listUpdateBlock afterSeconds:self scaledUpdateListDelayTime.
    ] ifFalse:[
        "after a restart, updateProcess is a dead process"
        self assert:(updateProcess isNil or:[updateProcess isDead]).

        updateProcess := [
            [
                |id cnt myDelay|

                myDelay := Delay forSeconds:self scaledUpdateContentsDelayTime.

                "
                 every updateDelay (0.5), we look which process runs;
                 every half second, the status is updated.
                 every listUpdateDelay (5s), the list of processes is
                 built up again
                "
                [true] whileTrue:[
                    ((self scaledUpdateListDelayTime // self scaledUpdateContentsDelayTime) max:2) - 1 timesRepeat:[
                        myDelay wait.
                        self updateStatus:nil.
                    ].
                    myDelay wait.
                    self updateList.
                ]
            ] valueOnUnwindDo:[
                updateProcess := nil
            ]
        ]  forkAt:(Processor userSchedulingPriority + 1).
        updateProcess name:'monitor [' ,
                           Processor activeProcess id printString ,
                           '] update'.
        "
         raise my own priority
        "
        Processor activeProcess priority:(Processor userSchedulingPriority + 2)
    ].
!

updateChangedItem:oldItem newItem:newItem atIndex:index
    | colIdx newValue |

    colIdx := 1.

    oldItem weakArrayWithProcesses:newItem weakArrayWithProcesses.
    oldItem processInstanceIndexInWeakArray:newItem processInstanceIndexInWeakArray.

    "/ ID

    oldItem processId ~= (newValue := newItem processId) ifTrue:[
        oldItem processId:newValue.
        processTable invalidateRowAt:index colAt:colIdx.
    ].

    "/ GROUP
    self showGroup value ifTrue:[
        colIdx := colIdx + 1.
        oldItem processGroup ~= (newValue := newItem processGroup) ifTrue:[
            oldItem processGroup:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "/ NAME
    colIdx := colIdx + 1.
    oldItem processName ~= (newValue := newItem processName) ifTrue:[
        oldItem processName:newValue.
        processTable invalidateRowAt:index colAt:colIdx.
    ].

    "/ ACTIVE
    colIdx := colIdx + 1.
    oldItem processActive ~= (newValue := newItem processActive) ifTrue:[
        oldItem processActive:newValue.
        "/ (processTable columnAt:colIdx).
        processTable invalidateRowAt:index colAt:colIdx.
    ].

    "/ STATE
    self showState value ifTrue:[
        colIdx := colIdx + 1.
        (oldItem processState sameStringAndEmphasisAs: (newValue := newItem processState)) ifFalse:[
            oldItem processState:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "/ PRIO
    self showPrio value ifTrue:[
        colIdx := colIdx + 1.
        oldItem processPrio ~= (newValue := newItem processPrio) ifTrue:[
            oldItem processPrio:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "/ USED STACK
    self showUsedStack value ifTrue:[
        colIdx := colIdx + 1.
        oldItem processUsedStack ~= (newValue := newItem processUsedStack) ifTrue:[
            oldItem processUsedStack:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "/ TOTAL STACK
    self showTotalStack value ifTrue:[
        colIdx := colIdx + 1.
        oldItem processTotalStack ~= (newValue := newItem processTotalStack) ifTrue:[
            oldItem processTotalStack:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "/ CURRENT SEGMENT
    self showCurrentSegment value ifTrue:[
        colIdx := colIdx + 1.
        oldItem processCurrentSegment ~= (newValue := newItem processCurrentSegment) ifTrue:[
            oldItem processCurrentSegment:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "/ Switch
    self showSwitch value ifTrue:[
        colIdx := colIdx + 1.
        oldItem processSwitch ~= (newValue := newItem processSwitch) ifTrue:[
            oldItem processSwitch:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "/ WHERE
    self showWhere value ifTrue:[
        colIdx := colIdx + 1.
        oldItem processWhere ~= (newValue := newItem processWhere) ifTrue:[
            oldItem processWhere:newValue.
            processTable invalidateRowAt:index colAt:colIdx.
        ].
    ].

    "Modified: / 19-03-2007 / 10:28:27 / cg"
!

updateList

    |newList|

    processTable shown ifTrue:[
        newList := self getProcessList.
        visibleBlock notNil ifTrue:[
            newList := newList select:visibleBlock
        ].
        self updateStatus:newList.
    ].
    updateBlock notNil ifTrue:[
        Processor removeTimedBlock:listUpdateBlock.
        Processor addTimedBlock:listUpdateBlock afterSeconds:self scaledUpdateListDelayTime.
    ].
!

updateStatus:newProcessList

    |startTime endTime deltaT|


    startTime := Timestamp now.
    updateSema critical:[
	self updateTable:newProcessList.
    ].

    endTime := Timestamp now.
    deltaT := (endTime millisecondDeltaFrom:startTime) / 1000.0.
"/    Transcript show:deltaT; show:' ' ; showCR:(self scaledUpdateContentsDelayTime / 10.0).
    deltaT > (self scaledUpdateContentsDelayTime / 5) ifTrue:[
	"/ the update took longer than 20% - make delay longer, to reduce cpu load.
	self updateContentsDelayTime value:(self scaledUpdateContentsDelayTime * 2).
	"/ Transcript show:'+++ '; showCR:self scaledUpdateContentsDelayTime.
    ] ifFalse:[
"/        self scaledUpdateContentsDelayTime > 0.5 ifTrue:[
"/            deltaT < (self scaledUpdateContentsDelayTime / 20) ifTrue:[
"/                "/ the update took less than 5% - make delay smaller for better animation.
"/                self updateContentsDelayTime value:((self scaledUpdateContentsDelayTime / 2) max:0.5).
"/                "/ Transcript show:'--- ';showCR:self scaledUpdateContentsDelayTime.
"/            ].
"/        ].
    ].
    updateBlock notNil ifTrue:[
	Processor removeTimedBlock:updateBlock.
	Processor addTimedBlock:updateBlock afterSeconds:self scaledUpdateContentsDelayTime.
    ]
!

updateTable:newProcessList
    |oldSelection newList sel diff weakProcessList|

    processTable shown ifTrue:[
"/        Transcript showCR:('update the table', Timestamp now printString, 'with new list:', newProcessList notNil asString).
	sel := self selectedProcesses value.
	sel notNil ifTrue:[
	    oldSelection := OrderedCollection new.
	    sel do:[:proItem|
		proItem processInstance notNil ifTrue:[
		    oldSelection add:(proItem processInstance)
		].
	    ].
	].
"/            Transcript showCR:'oldSelection on catch in updateTable: ', (oldSelection isEmptyOrNil ifTrue:['nil'] ifFalse:[oldSelection first printString]).
	newProcessList isNil ifTrue:[
	    newList := OrderedCollection new.
	    processList do:[:oldItem |
		| newItem |
		(self showDead value
		 or:[oldItem processInstance notNil
		     and:[oldItem processInstance isDead not]]) ifTrue:[
		    newItem := oldItem copy.
		    self fillItemInformationIn:newItem.
		    newList add:newItem.
		]
	    ].
	] ifFalse:[
	    "/ remove dead processes if not shown
	    newList := OrderedCollection new.
	    weakProcessList := WeakArray withAll:newProcessList.
	    weakProcessList keysAndValuesDo:[:indexInWeakArray :procOrNilOrZero |
		"/ in a weakarray, dead entries are 0
		(procOrNilOrZero notNil and:[procOrNilOrZero ~~ 0]) ifTrue:[
		    (procOrNilOrZero isDead not or:[self showDead value]) ifTrue:[
			| processItem |
			processItem := ProcessItem new.
			self fillItemInformationIn:processItem with:procOrNilOrZero inArray:weakProcessList atIndex:indexInWeakArray.
			newList add:processItem.
		    ]
		]
	    ].
	].
	newList sort:self sortBlock.
	newList doWithIndex:[:newItem :index|
	    | oldItem |
	    oldItem := processList at:index ifAbsent:nil.
	    oldItem isNil ifTrue:[
		processList add:newItem beforeIndex:index
	    ] ifFalse:[
		self updateChangedItem:oldItem newItem:newItem atIndex:index
	    ]
	].
	diff := processList size - newList size.
	diff > 0 ifTrue:[
	    processList removeLast:diff
	].
"/            Transcript showCR:'oldSelection on set in updateTable: ', (oldSelection isEmptyOrNil ifTrue:['nil'] ifFalse:[oldSelection first printString]).
	self changeSelectionToProcesses:oldSelection.
    ].
! !

!ProcessMonitorV2::ProcessItem methodsFor:'accessing'!

groupVal
    "return the value of the instance variable 'groupVal' (automatically generated)"

    ^ groupVal
!

groupVal:something
    "set the value of the instance variable 'groupVal' (automatically generated)"

    groupVal := something.
!

idVal
    "return the value of the instance variable 'idVal' (automatically generated)"

    ^ idVal
!

idVal:something
    "set the value of the instance variable 'idVal' (automatically generated)"

    idVal := something.
!

prioVal
    "return the value of the instance variable 'prioVal' (automatically generated)"

    ^ prioVal
!

prioVal:something
    "set the value of the instance variable 'prioVal' (automatically generated)"

    prioVal := something.
!

processActive
    "return the value of the instance variable 'processActive' (automatically generated)"

    ^ processActive
!

processActive:something
    "set the value of the instance variable 'processActive' (automatically generated)"

    processActive := something.
!

processCurrentSegment
    "return the value of the instance variable 'processCurrentSegment' (automatically generated)"

    ^ processCurrentSegment
!

processCurrentSegment:something
    "set the value of the instance variable 'processCurrentSegment' (automatically generated)"

    processCurrentSegment := something.
!

processGroup
    "return the value of the instance variable 'processGroup' (automatically generated)"

    ^ processGroup
!

processGroup:something
    "set the value of the instance variable 'processGroup' (automatically generated)"

    processGroup := something.
!

processId
    "return the value of the instance variable 'processId' (automatically generated)"

    ^ processId
!

processId:something
    "set the value of the instance variable 'processId' (automatically generated)"

    processId := something.
!

processInstance
    "return the value of the instance variable 'processInstance' (automatically generated)"

    |procOrNilOrZero|

    procOrNilOrZero := weakArrayWithProcesses at:processInstanceIndexInWeakArray.
    procOrNilOrZero == 0 ifTrue:[^ nil].
    ^ procOrNilOrZero
!

processInstance:something
    "set the value of the instance variable 'processInstance' (automatically generated)"

    processInstance := something.
!

processInstanceIndexInWeakArray
    "return the value of the instance variable 'processInstanceIndexInWeakArray' (automatically generated)"

    ^ processInstanceIndexInWeakArray
!

processInstanceIndexInWeakArray:something
    "set the value of the instance variable 'processInstanceIndexInWeakArray' (automatically generated)"

    processInstanceIndexInWeakArray := something.
!

processName
    "return the value of the instance variable 'processName' (automatically generated)"

    ^ processName
!

processName:something
    "set the value of the instance variable 'processName' (automatically generated)"

    processName := something.
!

processPrio
    "return the value of the instance variable 'processPrio' (automatically generated)"

    ^ processPrio
!

processPrio:something
    processPrio := something.
!

processState
    ^ processState
!

processState:something
    processState := something.
!

processSwitch
    ^ processSwitch
!

processSwitch:something
    processSwitch := something.
!

processTotalStack
    ^ processTotalStack
!

processTotalStack:something
    processTotalStack := something.
!

processUsedStack
    ^ processUsedStack
!

processUsedStack:something
    processUsedStack := something.
!

processWhere
    ^ processWhere
!

processWhere:something
    processWhere := something.
!

weakArrayWithProcesses
    ^ weakArrayWithProcesses
!

weakArrayWithProcesses:something
    weakArrayWithProcesses := something.
! !

!ProcessMonitorV2::ProcessItem methodsFor:'printing'!

printOn:aStream
    (self processName ? '') printOn:aStream.
    aStream nextPut:$[.
    (self processId ? '') printOn:aStream. 
    aStream nextPut:$].
! !

!ProcessMonitorV2 class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitorV2.st,v 1.49 2010-04-16 15:59:53 stefan Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitorV2.st,v 1.49 2010-04-16 15:59:53 stefan Exp $'
! !