# HG changeset patch # User Claus Gittinger # Date 1462781039 -7200 # Node ID c0c0c5382c15898954980576d4c0b4d2bff4c48e # Parent 34f9ad93c51cdfa93b5f2cc648aabe47b898084d #REFACTORING by cg class: DebugView colorizeAllWith -> withColor changed: #contextListEntryFor: #setLabelFor:in: #updateForContext: (send #withColor: instead of #colorizeAllWith:) diff -r 34f9ad93c51c -r c0c0c5382c15 DebugView.st --- a/DebugView.st Mon May 09 10:03:47 2016 +0200 +++ b/DebugView.st Mon May 09 10:03:59 2016 +0200 @@ -3723,37 +3723,37 @@ lines := aMessage asStringCollection. lines size > 1 ifTrue:[ - l := lines first + l := lines first ] ifFalse:[ - l := aMessage. + l := aMessage. ]. l := l , ' ('. Error handle:[:ex | - l := l , '???' + l := l , '???' ] do:[ - processNameOrNil := aProcess name. - processNameOrNil notNil ifTrue:[ - l := l , (processNameOrNil contractTo:20) , ''. - ]. - pidOrNil := aProcess id printString. - l := l , '[' , pidOrNil , ']'. + processNameOrNil := aProcess name. + processNameOrNil notNil ifTrue:[ + l := l , (processNameOrNil contractTo:20) , ''. + ]. + pidOrNil := aProcess id printString. + l := l , '[' , pidOrNil , ']'. ]. l := l , ')'. self label:l. ((ShowThreadID == true) and:[OperatingSystem isMSDOSlike]) ifTrue:[ - osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. + osPidString := ' {threadID: ',OperatingSystem getThreadId printString,'}'. ]. exceptionInfoLabel notNil ifTrue:[ - exceptionInfoLabel - label:(resources - string:'%1 in process %2 [%3]%4' - with:(lines first colorizeAllWith:Color red) - with:(processNameOrNil ? '') - with:(pidOrNil ? '') - with:(osPidString ? '')) + exceptionInfoLabel + label:(resources + string:'%1 in process %2 [%3]%4' + with:(lines first withColor:#red) + with:(processNameOrNil ? '') + with:(pidOrNil ? '') + with:(osPidString ? '')) ]. "Modified: / 06-07-2006 / 12:43:19 / cg" @@ -7380,24 +7380,24 @@ contextListEntryFor:aContext ^ Error - handle:[:ex | '???' ] - do:[ - |s| - - aContext selector == #doIt ifTrue:[ - aContext receiver isNil ifTrue:[ - s := 'doIt' allBold - ] - ]. - - s := Text streamContents:[:s | aContext printOn:s ]. - RememberedCallChain notNil ifTrue:[ - (RememberedCallChain includesIdentical:aContext) ifTrue:[ - s := s colorizeAllWith:(Color red). - ]. - ]. - s - ]. + handle:[:ex | '???' ] + do:[ + |s| + + aContext selector == #doIt ifTrue:[ + aContext receiver isNil ifTrue:[ + s := 'doIt' allBold + ] + ]. + + s := Text streamContents:[:s | aContext printOn:s ]. + RememberedCallChain notNil ifTrue:[ + (RememberedCallChain includesIdentical:aContext) ifTrue:[ + s := s withColor:#red. + ]. + ]. + s + ]. "Created: / 21-05-2007 / 13:30:24 / cg" ! @@ -9275,7 +9275,7 @@ "/ code ~= (codeView contents) ifTrue:[ cannotAcceptDueToOutdatedClass ifTrue:[ - codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' colorizeAllWith:Color red),Character cr,Character cr,code asString). + codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' withColor:Color red),Character cr,Character cr,code asString). ] ifFalse:[ codeView setContents:code. ].