ProcessMonitorV2.st
branchjv
changeset 16571 cf319f2e56d0
parent 15769 b62e96d5d327
parent 16515 d623427c5274
child 16617 69e7de1ef22f
equal deleted inserted replaced
16570:dc5e958a20dc 16571:cf319f2e56d0
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 2003 by eXept Software AG
     2  COPYRIGHT (c) 2003 by eXept Software AG
     5 	      All Rights Reserved
     3 	      All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
  3493 fillItemInformationIn:processItem
  3491 fillItemInformationIn:processItem
  3494     |state stateColor running con aProcess|
  3492     |state stateColor running con aProcess|
  3495 
  3493 
  3496     aProcess := processItem processInstance.
  3494     aProcess := processItem processInstance.
  3497     aProcess isNil ifTrue:[
  3495     aProcess isNil ifTrue:[
  3498 	^ self.
  3496         ^ self.
  3499     ].
  3497     ].
  3500 
  3498 
  3501     processItem processId:aProcess id.
  3499     processItem processId:aProcess id.
  3502     processItem idVal:aProcess id ? -1.
  3500     processItem idVal:aProcess id ? -1.
  3503 
  3501 
  3508 
  3506 
  3509     state := aProcess state.
  3507     state := aProcess state.
  3510     running := (state == #run and:[aProcess == Processor interruptedProcess]).
  3508     running := (state == #run and:[aProcess == Processor interruptedProcess]).
  3511 
  3509 
  3512     stateColor := (state == #run)
  3510     stateColor := (state == #run)
  3513 			ifTrue:[ Color green darkened ]
  3511                         ifTrue:[ Color green darkened ]
  3514 			ifFalse:[
  3512                         ifFalse:[
  3515 			    (state == #debug or:[state == #stopped])
  3513                             (state == #debug or:[state == #stopped])
  3516 				ifTrue:[ Color red ]
  3514                                 ifTrue:[ Color red ]
  3517 				ifFalse:[ Color black ]].
  3515                                 ifFalse:[ Color black ]].
  3518 
  3516 
  3519     processItem processState:(state asString colorizeAllWith:stateColor).
  3517     processItem processState:(state asString withColor:stateColor).
  3520     processItem processActive:(self getActiveStringFor:aProcess running:running).
  3518     processItem processActive:(self getActiveStringFor:aProcess running:running).
  3521 
  3519 
  3522 "/    processItem processBlocked:(aProcess interruptsDisabled).
  3520 "/    processItem processBlocked:(aProcess interruptsDisabled).
  3523     processItem prioVal:(aProcess priority).
  3521     processItem prioVal:(aProcess priority).
  3524     processItem processPrio:(self getPrioStringFor:aProcess).
  3522     processItem processPrio:(self getPrioStringFor:aProcess).
  3526     processItem processUsedStack:aProcess usedStackSize.
  3524     processItem processUsedStack:aProcess usedStackSize.
  3527     processItem processTotalStack:(self getTotalStackStringFor:aProcess).
  3525     processItem processTotalStack:(self getTotalStackStringFor:aProcess).
  3528 
  3526 
  3529     con := aProcess suspendedContext.
  3527     con := aProcess suspendedContext.
  3530     con isNil ifTrue:[
  3528     con isNil ifTrue:[
  3531 	aProcess == Processor activeProcess ifTrue:[
  3529         aProcess == Processor activeProcess ifTrue:[
  3532 	    con := thisContext
  3530             con := thisContext
  3533 	]
  3531         ]
  3534     ].
  3532     ].
  3535     showWhere value ifTrue:[
  3533     showWhere value ifTrue:[
  3536 	processItem processWhere:(self getWhereStringFor:con running:running).
  3534         processItem processWhere:(self getWhereStringFor:con running:running).
  3537     ].
  3535     ].
  3538     processItem processCurrentSegment:(self getCurrentSegmentStringFor:con).
  3536     processItem processCurrentSegment:(self getCurrentSegmentStringFor:con).
  3539     processItem processSwitch:(aProcess numberOfStackBoundaryHits).
  3537     processItem processSwitch:(aProcess numberOfStackBoundaryHits).
  3540     showApplication value ifTrue:[
  3538     showApplication value ifTrue:[
  3541 	processItem processApplication:(self getApplicationStringFor:aProcess)
  3539         processItem processApplication:(self getApplicationStringFor:aProcess)
  3542     ].
  3540     ].
  3543     showWindowTitle value ifTrue:[
  3541     showWindowTitle value ifTrue:[
  3544 	processItem processWindowTitle:(self getWindowTitleFor:aProcess)
  3542         processItem processWindowTitle:(self getWindowTitleFor:aProcess)
  3545     ].
  3543     ].
  3546     showInstrumentation value ifTrue:[
  3544     showInstrumentation value ifTrue:[
  3547 	processItem processInstrumentation:(self getInstrumentationStringFor:aProcess)
  3545         processItem processInstrumentation:(self getInstrumentationStringFor:aProcess)
  3548     ].
  3546     ].
  3549 
  3547 
  3550     "Modified: / 17-08-2011 / 11:04:32 / cg"
  3548     "Modified: / 17-08-2011 / 11:04:32 / cg"
  3551 !
  3549 !
  3552 
  3550