equal
deleted
inserted
replaced
69 ^ listInfos |
69 ^ listInfos |
70 ! |
70 ! |
71 |
71 |
72 text |
72 text |
73 ^String streamContents:[:s| |
73 ^String streamContents:[:s| |
74 1 to: list size do:[:i| |
74 list withIndexDo:[:ln :i| |
75 (listInfos at: i) offset ~~ -1 ifTrue:[ |
75 | info | |
76 s nextPutLine: (list at: i) |
76 |
|
77 info := listInfos at: i ifAbsent:[nil]. |
|
78 (info isNil or:[info offset ~~ -1]) ifTrue:[ |
|
79 ln notNil ifTrue:[ |
|
80 s nextPutLine: (list at: i) |
|
81 ]. |
77 ] |
82 ] |
78 ]. |
83 ]. |
79 ]. |
84 ]. |
80 |
85 |
81 "Created: / 19-03-2012 / 14:58:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
86 "Created: / 19-03-2012 / 14:58:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
167 mergeUsingA: textA interval: interval |
172 mergeUsingA: textA interval: interval |
168 "Given textA and section interval, merges the section |
173 "Given textA and section interval, merges the section |
169 using textA." |
174 using textA." |
170 |
175 |
171 | listA offset | |
176 | listA offset | |
172 listA := textA asStringCollection. |
177 listA := (textA ? '') asStringCollection. |
173 offset := 0. |
178 offset := 0. |
174 interval do:[:lineNr| |
179 interval do:[:lineNr| |
175 | info chunk line | |
180 | info chunk line | |
176 info := listInfos at: lineNr. |
181 info := listInfos at: lineNr. |
177 chunk := info conflict left. |
182 chunk := info conflict left. |
207 mergeUsingB: textA interval: interval |
212 mergeUsingB: textA interval: interval |
208 "Given textA and section interval, merges the section |
213 "Given textA and section interval, merges the section |
209 using textA." |
214 using textA." |
210 |
215 |
211 | listA offset | |
216 | listA offset | |
212 listA := textA asStringCollection. |
217 listA := (textA ? #()) asStringCollection. |
213 offset := 0. |
218 offset := 0. |
214 interval do:[:lineNr| |
219 interval do:[:lineNr| |
215 | info chunk line | |
220 | info chunk line | |
216 info := listInfos at: lineNr. |
221 info := listInfos at: lineNr. |
217 chunk := info conflict right. |
222 chunk := info conflict right. |
439 ! ! |
444 ! ! |
440 |
445 |
441 !TextMergeInfo class methodsFor:'documentation'! |
446 !TextMergeInfo class methodsFor:'documentation'! |
442 |
447 |
443 version_SVN |
448 version_SVN |
444 ^ '$Id: Tools__TextMergeInfo.st 7975 2012-04-09 18:34:24Z vranyj1 $' |
449 ^ '$Id: Tools__TextMergeInfo.st 8049 2012-09-07 17:30:05Z vranyj1 $' |
445 ! ! |
450 ! ! |