--- a/Tools__DiffCodeView2.st Tue Jul 19 14:32:31 2011 +0200
+++ b/Tools__DiffCodeView2.st Tue Jul 19 14:32:44 2011 +0200
@@ -84,6 +84,20 @@
!DiffCodeView2 methodsFor:'accessing'!
+classHolder: aValueModel
+
+ textViews do:[:each|each classHolder: aValueModel].
+
+ "Created: / 19-07-2011 / 12:55:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+languageHolder: aValueModel
+
+ textViews do:[:each|each languageHolder: aValueModel].
+
+ "Created: / 19-07-2011 / 12:55:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
text1:t1 text2:t2
|data|
@@ -256,30 +270,26 @@
!
createArray:text1
- "Creates array from string where every row is one item"
- "^text1 asStringCollection"
-
- |helperText i item char array|
-
- item := ''.
- helperText := text1.
- array := OrderedCollection new.
- i := 1.
- [ i <= text1 size ] whileTrue:[
- char := helperText at:i.
- item := item , char.
- (char == Character cr) ifTrue:[
- array add:item.
- item := ''.
- ].
- i := i + 1.
+ | 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.
+ ]
].
-
- ^ array.
+ line position ~~ 0 ifTrue:[
+ array add: line contents
+ ].
+ ^array
"Created: / 22-03-2010 / 14:48:27 / Jakub <zelenja7@fel.cvut.cz>"
- "Modified: / 24-06-2010 / 13:40:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 19-07-2011 / 11:14:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!DiffCodeView2::DiffData methodsFor:'accessing'!
@@ -331,7 +341,7 @@
!DiffCodeView2 class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.2 2011-07-03 17:50:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.3 2011-07-19 12:32:44 vrany Exp $'
!
version_SVN