"Change Set: ProcessBrowser30gFixes-nk Date: 16 February 2001 Author: Ned Konz A couple of fixes for Squeak 3.0Gamma: * Does not crash if no MVC ScheduledControllers, which is the case out of the box * Traps errors getting method text * Identifies the SoundPlayer playerProcess, and does not allow it to be stopped or debugged * Recovers more gracefully when there are problems identifying well-known processes "! !ProcessBrowser methodsFor: 'accessing' stamp: 'nk 2/16/2001 13:39'! selectedMethod ^ methodText ifNil: [methodText _ selectedContext ifNil: [''] ifNotNil: [| pcRange | methodText _ [ selectedContext sourceCode ] ifError: [ :err :rcvr | 'error getting method text' ]. pcRange _ self pcRange. methodText asText addAttribute: TextColor red from: pcRange first to: pcRange last; addAttribute: TextEmphasis bold from: pcRange first to: pcRange last]]! ! !ProcessBrowser methodsFor: 'process actions' stamp: 'nk 2/16/2001 13:45'! nameAndRulesFor: aProcess "Answer a nickname and two flags: allow-stop, and allow-debug" (aProcess priority = Processor timingPriority and: [aProcess suspendedContext receiver == Delay]) ifTrue: [^ {'the timer interrupt watcher'. false. false}]. ^ [ aProcess caseOf: { [] -> [{'no process'. false. false}]. [autoUpdateProcess] -> [{'my auto-update process'. true. true}]. [Smalltalk lowSpaceWatcherProcess] -> [{'the low space watcher'. false. false}]. [WeakArray runningFinalizationProcess] -> [{'the WeakArray finalization process'. false. false}]. [Processor activeProcess] -> [{'the UI process'. false. true}]. [Processor backgroundProcess] -> [{'the idle process'. false. false}]. [Sensor inputProcess] -> [{'the I/O process'. false. false}]. [Sensor interruptWatcherProcess] -> [{'the user interrupt watcher'. false. false}]. [Project uiProcess] -> [{'the inactive Morphic UI process'. false. false}]. [SoundPlayer playerProcess] -> [{'the Sound Player'. false. false}]. [ScheduledControllers ifNotNil: [ ScheduledControllers activeControllerProcess ] ] -> [{'the inactive MVC controller process'. false. true}]} otherwise: [{aProcess suspendedContext asString. true. true}] ] ifError: [ :err :rcvr | {aProcess suspendedContext asString. true. true} ]! ! !SoundPlayer class methodsFor: 'player process' stamp: 'nk 2/16/2001 13:26'! playerProcess ^PlayerProcess! !