Tools__DiffCodeView2.st
branchjv
changeset 12287 400a99059170
parent 12269 79f87eee62e5
child 12401 4714b9640528
--- a/Tools__DiffCodeView2.st	Fri Sep 07 12:37:19 2012 +0100
+++ b/Tools__DiffCodeView2.st	Fri Sep 07 18:28:09 2012 +0100
@@ -91,6 +91,12 @@
     "Created: / 19-07-2011 / 12:55:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+codeAspect:aSymbol
+    textViews do:[:each|each codeAspect:aSymbol].
+
+    "Created: / 27-07-2012 / 23:24:46 / cg"
+!
+
 languageHolder: aValueModel
 
     textViews do:[:each|each languageHolder: aValueModel].
@@ -281,28 +287,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 <zelenja7@fel.cvut.cz>"
-    "Modified (comment): / 19-07-2011 / 11:14:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 17-07-2012 / 18:55:21 / cg"
+    "Modified (comment): / 26-07-2012 / 21:45:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !DiffCodeView2::DiffData methodsFor:'accessing'!
@@ -354,9 +365,9 @@
 !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.6 2012/07/27 22:05:42 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: Tools__DiffCodeView2.st 8027 2012-07-26 18:46:57Z vranyj1 $'
+    ^ '$Id: Tools__DiffCodeView2.st 8048 2012-09-07 17:28:09Z vranyj1 $'
 ! !