diff -r 335b57d35f23 -r 4681092d0ff8 Tools__DiffCodeView2.st --- a/Tools__DiffCodeView2.st Thu Jul 26 20:54:28 2012 +0200 +++ b/Tools__DiffCodeView2.st Thu Jul 26 22:45:37 2012 +0200 @@ -274,28 +274,33 @@ createArray:text1 "cg: isn't that an obfuscated variation of #asCollectionOfLines ?" - ^ text1 asStringCollection. "/ yes, it looks like !! -"/ | array src line c | -"/ -"/ array := StringCollection new. -"/ src := text1 readStream. -"/ line := (String new: 80) writeStream. -"/ [ src atEnd ] whileFalse:[ -"/ c := src next. -"/ line nextPut: c. -"/ c == Character cr ifTrue:[ -"/ array add: line contents. -"/ line reset. -"/ ] -"/ ]. -"/ line position ~~ 0 ifTrue:[ -"/ array add: line contents -"/ ]. -"/ ^array + "/ ^ text1 asStringCollection. "/ yes, it looks like !! + + "/ JV@2012-07-26: Yes, looks like but it is not!! This version + "/ keeps CRs in lines. Do not change it back - if you do, DoffCodeView2 + "/ will show whole source in a single line. + + | array src line c | + + array := StringCollection new. + src := text1 readStream. + line := (String new: 80) writeStream. + [ src atEnd ] whileFalse:[ + c := src next. + line nextPut: c. + c == Character cr ifTrue:[ + array add: line contents. + line reset. + ] + ]. + line position ~~ 0 ifTrue:[ + array add: line contents + ]. + ^array "Created: / 22-03-2010 / 14:48:27 / Jakub " - "Modified (comment): / 19-07-2011 / 11:14:48 / Jan Vrany " "Modified: / 17-07-2012 / 18:55:21 / cg" + "Modified (comment): / 26-07-2012 / 21:45:05 / Jan Vrany " ! ! !DiffCodeView2::DiffData methodsFor:'accessing'! @@ -347,7 +352,7 @@ !DiffCodeView2 class methodsFor:'documentation'! version_CVS - ^ '$Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.4 2012-07-17 17:03:25 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.5 2012-07-26 20:45:37 vrany Exp $' ! version_SVN