class: Tools::DiffCodeView2
authorClaus Gittinger <cg@exept.de>
Thu, 15 May 2014 19:21:17 +0200
changeset 14370 bb3f3eec9f1b
parent 14369 0c65610024eb
child 14371 491ec9ff2c09
class: Tools::DiffCodeView2 changed: #computeDiffDataForText1:text2:
Tools__DiffCodeView2.st
--- a/Tools__DiffCodeView2.st	Thu May 15 19:21:09 2014 +0200
+++ b/Tools__DiffCodeView2.st	Thu May 15 19:21:17 2014 +0200
@@ -162,7 +162,12 @@
     "created diffText object from two strings
      This processes the DiffData as returned by the (now internal) Diff-tool"
     
-    |array1 array2 diff change index1 index2 text1 text2 i diffData deleted inserted helperText addConstant1 addConstant2 changed helper ins del pom|
+    "/ cg: same code as in Diff2CodeView2!!!!!!
+    "/ please refactor and make this a utility method on the class side
+
+    |array1 array2 diff change index1 index2 text1 text2 i 
+     diffData deleted inserted helperText addConstant1 addConstant2 changed helper ins del pom
+     array1Size array2Size|
 
     "create line arrays from origin text(1 item/row)"
     array1 := self createArray:t1.
@@ -254,19 +259,17 @@
         change := change nextLink.
     ].
      "kontrola zda nam nechybi posledni znaky"
-    (index1 <= (array1 size)) ifTrue:[
-        [
-            index1 <= (array1 size)
-        ] whileTrue:[
+    array1Size := array1 size.
+    (index1 <= array1Size) ifTrue:[
+        [ index1 <= array1Size ] whileTrue:[
             helperText := (array1 at:index1) asText.
             text1 := text1 , helperText.
             index1 := index1 + 1.
         ].
     ].
-    (index2 <= (array2 size)) ifTrue:[
-        [
-            index2 <= (array2 size)
-        ] whileTrue:[
+    array2Size := array2 size.
+    (index2 <= array2Size) ifTrue:[
+        [ index2 <= array2Size ] whileTrue:[
             helperText := (array2 at:index2) asText.
             text2 := text2 , helperText.
             index2 := index2 + 1.
@@ -365,10 +368,10 @@
 !DiffCodeView2 class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.7 2014-02-05 18:56:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.8 2014-05-15 17:21:17 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: Tools__DiffCodeView2.st,v 1.7 2014-02-05 18:56:22 cg Exp $'
+    ^ '$Id: Tools__DiffCodeView2.st,v 1.8 2014-05-15 17:21:17 cg Exp $'
 ! !