--- a/Diff3TextView.st Tue Jul 09 16:39:17 2002 +0200
+++ b/Diff3TextView.st Tue Jul 09 16:53:25 2002 +0200
@@ -109,7 +109,7 @@
CAVEAT: this is a highly specialized method - probably not the right place
for it here ..."
- |dIdx dEnd state s entry c list skip l1 l2 buffer
+ |dIdx dEnd state entry list skip l1 l2 buffer
sameAtStart sameAtEnd sepYourVersion sepOtherVersion sepLine|
sepYourVersion := '----- your version -----'.
@@ -214,7 +214,7 @@
].
l1 notNil ifTrue:[
- state ~~ #initial ifTrue:[self halt:'oops - should not happen ...'].
+ state ~~ #initial ifTrue:[self error:'oops - bad state should not happen ...'].
"/ diff3-output is sometimes stupid; fix some here
[l1 notEmpty and:[l2 notEmpty and:[l1 first = l2 first or:[l1 first withTabsExpanded = l2 first withTabsExpanded]]]] whileTrue:[l1 removeFirst. l2 removeFirst].
@@ -242,21 +242,21 @@
showSeparators := false.
- useColors := ColoredListEntry notNil.
+ useColors := true.
useColors ifTrue:[
- device hasColors ifTrue:[
- addedColor := Color black.
- addedBgColor := Color green.
+ device hasColors ifTrue:[
+ addedColor := Color black.
+ addedBgColor := Color green.
- removedColor := Color white.
- removedBgColor := Color red.
+ removedColor := Color white.
+ removedBgColor := Color red.
- changedColor := Color white.
- changedBgColor := Color blue.
- ] ifFalse:[
- addedBgColor := removedBgColor := changedBgColor := Color black.
- addedColor := removedColor := changedColor := Color white.
- ]
+ changedColor := Color white.
+ changedBgColor := Color blue.
+ ] ifFalse:[
+ addedBgColor := removedBgColor := changedBgColor := Color black.
+ addedColor := removedColor := changedColor := Color white.
+ ]
].
"Created: 16.11.1995 / 16:59:48 / cg"
@@ -269,7 +269,7 @@
"given the merge()/rcsmerge() merged output (as created by 'cvs update'),
update my views contents"
- |idx1 idx2 idx3 dIdx dEnd state s nr1 nr2 nr3 entry c l1 l2 l3
+ |idx1 idx2 idx3 dIdx dEnd state entry l1 l2 l3
textView1 textView2 textView3 skip max|
textView1 := textViews at:1.
@@ -352,21 +352,27 @@
skip ifFalse:[
(state == #initial or:[state == 1]) ifTrue:[
(useColors and:[state == 1]) ifTrue:[
- l1 add:(ColoredListEntry string:entry foregroundColor:changedColor backgroundColor:changedBgColor).
+ l1 add:(Text string:entry
+ emphasis:(Array with:(#color->changedColor)
+ with:(#backgroundColor->changedBgColor))).
] ifFalse:[
l1 add:entry
]
].
(state == #initial or:[state == 2 or:[state == 23]]) ifTrue:[
(useColors and:[state == 2 or:[state == 23]]) ifTrue:[
- l2 add:(ColoredListEntry string:entry foregroundColor:changedColor backgroundColor:changedBgColor).
+ l2 add:(Text string:entry
+ emphasis:(Array with:(#color->changedColor)
+ with:(#backgroundColor->changedBgColor))).
] ifFalse:[
l2 add:entry
]
].
(state == #initial or:[state == 3 or:[state == 23]]) ifTrue:[
(useColors and:[state == 3 or:[state == 23]]) ifTrue:[
- l3 add:(ColoredListEntry string:entry foregroundColor:changedColor backgroundColor:changedBgColor).
+ l3 add:(Text string:entry
+ emphasis:(Array with:(#color->changedColor)
+ with:(#backgroundColor->changedBgColor))).
] ifFalse:[
l3 add:entry
]
@@ -385,5 +391,5 @@
!Diff3TextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Diff3TextView.st,v 1.7 2000-11-16 17:35:09 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Diff3TextView.st,v 1.8 2002-07-09 14:53:25 stefan Exp $'
! !