'From Squeak3.7beta of ''1 April 2004'' [latest update: #5878] on 24 April 2004 at 8:51:53 am'! "Change Set: TextDiffWithColors-nk (v2) Date: 24 April 2004 Author: Ned Konz If you use a font that can't do struck-out forms, you won't see the text diffs correctly. This change set makes the diffs appear as blue for old (also struck-out if possible) and red for new (which is the same as it was). v2 changes from blue only to blue/struck-out "! !TextDiffBuilder methodsFor: 'printing' stamp: 'nk 4/24/2004 08:48'! printPatchSequence: seq on: aStream seq do: [:assoc | aStream withAttributes: (self attributesOf: assoc key) do: [aStream nextPutAll: assoc value; cr]]! ! !TextDiffBuilder methodsFor: 'private' stamp: 'nk 4/24/2004 08:48'! attributesOf: type "Private. Answer the TextAttributes that are used to display text of the given type." ^type caseOf: { [#insert] -> [ {TextColor red} ]. [#remove] -> [ {TextEmphasis struckOut. TextColor blue}]. } otherwise: [ {TextEmphasis normal} ]. ! ! !ClassDiffBuilder methodsFor: 'printing' stamp: 'nk 4/24/2004 08:49'! printPatchSequence: ps on: aStream | type line | ps do: [:assoc | type := assoc key. line := assoc value. aStream withAttributes: (self attributesOf: type) do: [aStream nextPutAll: line]]! ! TextDiffBuilder removeSelector: #attributeOf:!