3721 setLabelFor:aMessage in:aProcess |
3721 setLabelFor:aMessage in:aProcess |
3722 |l lines processNameOrNil pidOrNil osPidString| |
3722 |l lines processNameOrNil pidOrNil osPidString| |
3723 |
3723 |
3724 lines := aMessage asStringCollection. |
3724 lines := aMessage asStringCollection. |
3725 lines size > 1 ifTrue:[ |
3725 lines size > 1 ifTrue:[ |
3726 l := lines first |
3726 l := lines first |
3727 ] ifFalse:[ |
3727 ] ifFalse:[ |
3728 l := aMessage. |
3728 l := aMessage. |
3729 ]. |
3729 ]. |
3730 |
3730 |
3731 l := l , ' ('. |
3731 l := l , ' ('. |
3732 Error handle:[:ex | |
3732 Error handle:[:ex | |
3733 l := l , '???' |
3733 l := l , '???' |
3734 ] do:[ |
3734 ] do:[ |
3735 processNameOrNil := aProcess name. |
3735 processNameOrNil := aProcess name. |
3736 processNameOrNil notNil ifTrue:[ |
3736 processNameOrNil notNil ifTrue:[ |
3737 l := l , (processNameOrNil contractTo:20) , ''. |
3737 l := l , (processNameOrNil contractTo:20) , ''. |
3738 ]. |
3738 ]. |
3739 pidOrNil := aProcess id printString. |
3739 pidOrNil := aProcess id printString. |
3740 l := l , '[' , pidOrNil , ']'. |
3740 l := l , '[' , pidOrNil , ']'. |
3741 ]. |
3741 ]. |
3742 l := l , ')'. |
3742 l := l , ')'. |
3743 self label:l. |
3743 self label:l. |
3744 |
3744 |
3745 ((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
3745 ((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ |
3746 osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
3746 osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. |
3747 ]. |
3747 ]. |
3748 |
3748 |
3749 exceptionInfoLabel notNil ifTrue:[ |
3749 exceptionInfoLabel notNil ifTrue:[ |
3750 exceptionInfoLabel |
3750 exceptionInfoLabel |
3751 label:(resources |
3751 label:(resources |
3752 string:'%1 in process %2 [%3]%4' |
3752 string:'%1 in process %2 [%3]%4' |
3753 with:(lines first colorizeAllWith:Color red) |
3753 with:(lines first withColor:#red) |
3754 with:(processNameOrNil ? '') |
3754 with:(processNameOrNil ? '') |
3755 with:(pidOrNil ? '') |
3755 with:(pidOrNil ? '') |
3756 with:(osPidString ? '')) |
3756 with:(osPidString ? '')) |
3757 ]. |
3757 ]. |
3758 |
3758 |
3759 "Modified: / 06-07-2006 / 12:43:19 / cg" |
3759 "Modified: / 06-07-2006 / 12:43:19 / cg" |
3760 ! ! |
3760 ! ! |
3761 |
3761 |
7378 |
7378 |
7379 !DebugView methodsFor:'private-context handling'! |
7379 !DebugView methodsFor:'private-context handling'! |
7380 |
7380 |
7381 contextListEntryFor:aContext |
7381 contextListEntryFor:aContext |
7382 ^ Error |
7382 ^ Error |
7383 handle:[:ex | '???' ] |
7383 handle:[:ex | '???' ] |
7384 do:[ |
7384 do:[ |
7385 |s| |
7385 |s| |
7386 |
7386 |
7387 aContext selector == #doIt ifTrue:[ |
7387 aContext selector == #doIt ifTrue:[ |
7388 aContext receiver isNil ifTrue:[ |
7388 aContext receiver isNil ifTrue:[ |
7389 s := 'doIt' allBold |
7389 s := 'doIt' allBold |
7390 ] |
7390 ] |
7391 ]. |
7391 ]. |
7392 |
7392 |
7393 s := Text streamContents:[:s | aContext printOn:s ]. |
7393 s := Text streamContents:[:s | aContext printOn:s ]. |
7394 RememberedCallChain notNil ifTrue:[ |
7394 RememberedCallChain notNil ifTrue:[ |
7395 (RememberedCallChain includesIdentical:aContext) ifTrue:[ |
7395 (RememberedCallChain includesIdentical:aContext) ifTrue:[ |
7396 s := s colorizeAllWith:(Color red). |
7396 s := s withColor:#red. |
7397 ]. |
7397 ]. |
7398 ]. |
7398 ]. |
7399 s |
7399 s |
7400 ]. |
7400 ]. |
7401 |
7401 |
7402 "Created: / 21-05-2007 / 13:30:24 / cg" |
7402 "Created: / 21-05-2007 / 13:30:24 / cg" |
7403 ! |
7403 ! |
7404 |
7404 |
7405 is:aHomeContext inCallingChainOf:aContext |
7405 is:aHomeContext inCallingChainOf:aContext |
9273 ] |
9273 ] |
9274 ]. |
9274 ]. |
9275 |
9275 |
9276 "/ code ~= (codeView contents) ifTrue:[ |
9276 "/ code ~= (codeView contents) ifTrue:[ |
9277 cannotAcceptDueToOutdatedClass ifTrue:[ |
9277 cannotAcceptDueToOutdatedClass ifTrue:[ |
9278 codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' colorizeAllWith:Color red),Character cr,Character cr,code asString). |
9278 codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' withColor:Color red),Character cr,Character cr,code asString). |
9279 ] ifFalse:[ |
9279 ] ifFalse:[ |
9280 codeView setContents:code. |
9280 codeView setContents:code. |
9281 ]. |
9281 ]. |
9282 "/ ]. |
9282 "/ ]. |
9283 ]. |
9283 ]. |