Tools__TextDiffTool.st
branchjv
changeset 12179 47f98e7d6de1
parent 12128 a7ff7d66ee85
child 12180 8ff612c17953
--- a/Tools__TextDiffTool.st	Fri Mar 09 23:06:58 2012 +0000
+++ b/Tools__TextDiffTool.st	Fri Mar 16 17:08:17 2012 +0000
@@ -14,9 +14,10 @@
 "{ NameSpace: Tools }"
 
 ApplicationModel subclass:#TextDiffTool
-	instanceVariableNames:'titleHolder labelAHolder textAHolder labelBHolder textBHolder
-		classHolder languageHolder codeAspectHolder showDiffHolder
-		diffSpecHolder diffView textAChanged textBChanged codeView'
+	instanceVariableNames:'labelHolder labelAHolder textAHolder labelBHolder textBHolder
+		labelCHolder textCHolder languageHolder codeAspectHolder
+		textAChanged textBChanged textCChanged contentSpecHolder diffView
+		classHolder'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Diff'
@@ -36,6 +37,30 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
+!
+
+documentation
+"
+    documentation to be added.
+
+    [author:]
+        Jan Vrany <jan.vrany@fit.cvut.cz>
+
+    [instance variables:]
+
+    [class variables:]
+
+    [see also:]
+
+"
+!
+
+examples
+"
+    See
+        - TextDiff2Tool examples
+        - TextDiff3Tool examples
+"
 ! !
 
 !TextDiffTool class methodsFor:'image specs'!
@@ -63,239 +88,6 @@
 
 !TextDiffTool class methodsFor:'interface specs'!
 
-diffSpec
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:Tools::TextDiffTool andSelector:#diffSpec
-     Tools::TextDiffTool new openInterface:#diffSpec
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(FullSpec
-        name: diffSpec
-        window: 
-       (WindowSpec
-          label: 'Text Diff Tool (for embedding)'
-          name: 'Text Diff Tool (for embedding)'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 782 506)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (ViewSpec
-              name: '2Labels'
-              layout: (LayoutFrame 0 0 0 0 -16 1 30 0)
-              component: 
-             (SpecCollection
-                collection: (
-                 (UISubSpecification
-                    name: 'VersionA'
-                    layout: (LayoutFrame 0 0 0 0 0 0.5 30 0)
-                    minorKey: versionALabelSpec
-                  )
-                 (UISubSpecification
-                    name: 'VersionB'
-                    layout: (LayoutFrame 5 0.5 0 0 0 1 30 0)
-                    minorKey: versionBLabelSpec
-                  )
-                 )
-               
-              )
-            )
-           (ArbitraryComponentSpec
-              name: 'Diff2TextView'
-              layout: (LayoutFrame 0 0 30 0 0 1 0 1)
-              hasHorizontalScrollBar: false
-              hasVerticalScrollBar: false
-              autoHideScrollBars: false
-              hasBorder: false
-              component: #'Tools::DiffCodeView2'
-              postBuildCallback: postBuildDiffView:
-            )
-           )
-         
-        )
-      )
-!
-
-nothingSpec
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:Tools::TextDiffTool andSelector:#nothingSpec
-     Tools::TextDiffTool new openInterface:#nothingSpec
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(FullSpec
-        name: nothingSpec
-        window: 
-       (WindowSpec
-          label: 'NewApplication'
-          name: 'NewApplication'
-          bounds: (Rectangle 0 0 300 300)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (LabelSpec
-              label: 'Nothing selected...'
-              name: 'Label1'
-              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
-              translateLabel: true
-            )
-           )
-         
-        )
-      )
-!
-
-textViewSpec
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:Tools::TextDiffTool andSelector:#textViewSpec
-     Tools::TextDiffTool new openInterface:#textViewSpec
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(FullSpec
-        name: 'textViewSpec'
-        window: 
-       (WindowSpec
-          label: 'Text Only'
-          name: 'Text Only'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 782 506)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (ArbitraryComponentSpec
-              name: 'CodeView'
-              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
-              model: textAHolder
-              hasHorizontalScrollBar: false
-              hasVerticalScrollBar: false
-              autoHideScrollBars: false
-              hasBorder: false
-              component: #'Tools::CodeView2'
-              postBuildCallback: postBuildCodeView:
-            )
-           )
-         
-        )
-      )
-!
-
-versionAOnlySpec
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:Tools::TextDiffTool andSelector:#versionAOnlySpec
-     Tools::TextDiffTool new openInterface:#versionAOnlySpec
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(FullSpec
-        name: versionAOnlySpec
-        window: 
-       (WindowSpec
-          label: 'Version A Only'
-          name: 'Version A Only'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 782 506)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (UISubSpecification
-              name: 'VersionA'
-              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
-              minorKey: versionALabelSpec
-            )
-           (UISubSpecification
-              name: 'Text'
-              layout: (LayoutFrame 0 0 30 0 0 1 0 1)
-              minorKey: textViewSpec
-            )
-           )
-         
-        )
-      )
-!
-
-versionBOnlySpec
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:Tools::TextDiffTool andSelector:#versionBOnlySpec
-     Tools::TextDiffTool new openInterface:#versionBOnlySpec
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(FullSpec
-        name: 'versionBOnlySpec'
-        window: 
-       (WindowSpec
-          label: 'Version B Only'
-          name: 'Version B Only'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 782 506)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (UISubSpecification
-              name: 'VersionB'
-              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
-              minorKey: versionBLabelSpec
-            )
-          (UISubSpecification
-              name: 'Text'
-              layout: (LayoutFrame 0 0 30 0 0 1 0 1)
-              minorKey: textViewSpec
-            )
-           )
-         
-        )
-      )
-
-    "Created: / 19-07-2011 / 10:06:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
 windowSpec
     "This resource specification was automatically generated
      by the UIPainter of ST/X."
@@ -304,9 +96,9 @@
      the UIPainter may not be able to read the specification."
 
     "
-     UIPainter new openOnClass:Tools::TextDiffTool andSelector:#windowSpec
-     Tools::TextDiffTool new openInterface:#windowSpec
-     Tools::TextDiffTool open
+     UIPainter new openOnClass:Tools::TextDiff2Tool andSelector:#windowSpec
+     Tools::TextDiff2Tool new openInterface:#windowSpec
+     Tools::TextDiff2Tool open
     "
 
     <resource: #canvas>
@@ -325,9 +117,16 @@
         component: 
        (SpecCollection
           collection: (
+           (LabelSpec
+              label: 'Label'
+              name: 'Label1'
+              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
+              translateLabel: true
+              labelChannel: labelHolder
+            )
            (UISubSpecification
               name: 'Contents'
-              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+              layout: (LayoutFrame 0 0 30 0 0 1 0 1)
               minorKey: windowSpecForEmbedding
             )
            )
@@ -344,8 +143,8 @@
      the UIPainter may not be able to read the specification."
 
     "
-     UIPainter new openOnClass:Tools::TextDiffTool andSelector:#windowSpecForEmbedding
-     Tools::TextDiffTool new openInterface:#windowSpecForEmbedding
+     UIPainter new openOnClass:Tools::TextDiff2Tool andSelector:#windowSpecForEmbedding
+     Tools::TextDiff2Tool new openInterface:#windowSpecForEmbedding
     "
 
     <resource: #canvas>
@@ -368,7 +167,7 @@
               layout: (LayoutFrame 0 0 0 0 0 1 0 1)
               hasHorizontalScrollBar: false
               hasVerticalScrollBar: false
-              specHolder: diffSpecHolder
+              specHolder: contentSpecHolder
               createNewBuilder: false
             )
            )
@@ -483,7 +282,7 @@
     "Modified: / 30-06-2011 / 20:53:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-versionBaseLabelSpec
+versionCLabelSpec
     "This resource specification was automatically generated
      by the UIPainter of ST/X."
 
@@ -499,11 +298,11 @@
 
     ^ 
      #(FullSpec
-        name: versionBaseLabelSpec
+        name: versionCLabelSpec
         window: 
        (WindowSpec
-          label: 'Version Base'
-          name: 'Version Base'
+          label: 'Version C'
+          name: 'Version C'
           min: (Point 10 10)
           bounds: (Rectangle 0 0 300 30)
         )
@@ -518,11 +317,11 @@
               translateLabel: true
             )
            (LabelSpec
-              label: 'Version Base'
-              name: 'VersionBaseLabel'
+              label: 'Version C'
+              name: 'VersionCLabel'
               layout: (LayoutFrame 30 0 5 0 191 0 0 1)
               translateLabel: true
-              labelChannel: versionBaseLabelAspect
+              labelChannel: versionCLabelAspect
               resizeForLabel: true
               adjust: left
               useDynamicPreferredWidth: true
@@ -534,42 +333,45 @@
       )
 
     "Modified: / 24-03-2010 / 20:51:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 16-03-2012 / 12:16:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool class methodsFor:'plugIn spec'!
 
 aspectSelectors
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
 
-    "Do not manually edit this. If it is corrupted,
-     the UIPainter may not be able to read the specification."
+    ^#( 
+        #labelHolder
 
-    "Return a description of exported aspects;
-     these can be connected to aspects of an embedding application
-     (if this app is embedded in a subCanvas)."
+        #labelAHolder
+        #labelBHolde
+        #labelCHolder
 
-    ^ #(
-        #classHolder
-        #codeAspectHolder
-        #labelAHolder
-        #labelBHolder
-        #languageHolder
-        #showDiffHolder
         #textAHolder
         #textBHolder
-      ).
+        #textCHolder
 
+        #languageHolder
+        #codeAspectHolder
+    )
+
+    "Created: / 16-03-2012 / 12:18:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool methodsFor:'accessing'!
 
+label: aString
+
+    ^self labelHolder value: aString
+
+    "Created: / 16-03-2012 / 13:07:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 labelA: aString
 
     ^self labelAHolder value: aString
 
-    "Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Created: / 30-08-2011 / 09:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 16-03-2012 / 13:05:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 labelB: aString
@@ -580,6 +382,14 @@
     "Created: / 30-08-2011 / 09:42:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+labelC: aString
+
+    ^self labelCHolder value: aString
+
+    "Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 16-03-2012 / 13:05:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 textA: aString
 
     ^self textAHolder value: aString
@@ -594,12 +404,11 @@
     "Created: / 30-08-2011 / 09:43:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-title: aString
+textC: aString
 
-    ^self titleHolder value: aString
+    ^self textCHolder value: aString
 
-    "Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Created: / 30-08-2011 / 09:45:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 16-03-2012 / 13:05:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool methodsFor:'aspects'!
@@ -639,37 +448,67 @@
     codeAspectHolder := something.
 !
 
-diffSpecHolder
-    "return/create the 'diffSpecHolder' value holder (automatically generated)"
+contentSpecHolder
+    "return/create the 'contentSpecHolder' value holder (automatically generated)"
 
-    diffSpecHolder isNil ifTrue:[
-        diffSpecHolder := ValueHolder with: #diffSpec.
-        diffSpecHolder addDependent:self.
+    contentSpecHolder isNil ifTrue:[
+        contentSpecHolder := ValueHolder new.
+        contentSpecHolder addDependent:self.
     ].
-    ^ diffSpecHolder
-
-    "Modified: / 06-07-2011 / 11:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    ^ contentSpecHolder
 !
 
-diffSpecHolder:something
-    "set the 'diffSpecHolder' value holder (automatically generated)"
+contentSpecHolder:something
+    "set the 'contentSpecHolder' value holder (automatically generated)"
 
     |oldValue newValue|
 
-    diffSpecHolder notNil ifTrue:[
-        oldValue := diffSpecHolder value.
-        diffSpecHolder removeDependent:self.
+    contentSpecHolder notNil ifTrue:[
+        oldValue := contentSpecHolder value.
+        contentSpecHolder removeDependent:self.
     ].
-    diffSpecHolder := something.
-    diffSpecHolder notNil ifTrue:[
-        diffSpecHolder addDependent:self.
+    contentSpecHolder := something.
+    contentSpecHolder notNil ifTrue:[
+        contentSpecHolder addDependent:self.
     ].
-    newValue := diffSpecHolder value.
+    newValue := contentSpecHolder value.
     oldValue ~~ newValue ifTrue:[
-        self update:#value with:newValue from:diffSpecHolder.
+        self update:#value with:newValue from:contentSpecHolder.
     ].
 !
 
+labelHolder
+    "return/create the 'labelAHolder' value holder (automatically generated)"
+
+    labelHolder isNil ifTrue:[
+        labelHolder := ValueHolder with:'Text diff'.
+        "/titleHolder addDependent:self.
+    ].
+    ^ labelHolder
+
+    "Created: / 16-03-2012 / 13:06:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+languageHolder
+    "return/create the 'languageHolder' value holder (automatically generated)"
+
+    languageHolder isNil ifTrue:[
+        languageHolder := ValueHolder new.
+    ].
+    ^ languageHolder
+!
+
+languageHolder:aValueHolder
+
+    languageHolder := aValueHolder.
+    codeView notNil ifTrue:[codeView languageHolder: aValueHolder].
+    diffView notNil ifTrue:[diffView languageHolder: aValueHolder].
+
+    "Modified: / 19-07-2011 / 12:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TextDiffTool methodsFor:'aspects-versions'!
+
 labelAHolder
     "return/create the 'labelAHolder' value holder (automatically generated)"
 
@@ -732,53 +571,37 @@
     ].
 !
 
-languageHolder
-    "return/create the 'languageHolder' value holder (automatically generated)"
+labelCHolder
+    "return/create the 'labelBHolder' value holder (automatically generated)"
 
-    languageHolder isNil ifTrue:[
-        languageHolder := ValueHolder new.
+    labelCHolder isNil ifTrue:[
+        labelCHolder := ValueHolder with:'Version Base'.
+        labelCHolder addDependent:self.
     ].
-    ^ languageHolder
+    ^ labelCHolder
+
+    "Created: / 16-03-2012 / 12:14:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-languageHolder:aValueHolder
-
-    languageHolder := aValueHolder.
-    codeView notNil ifTrue:[codeView languageHolder: aValueHolder].
-    diffView notNil ifTrue:[diffView languageHolder: aValueHolder].
-
-    "Modified: / 19-07-2011 / 12:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-showDiffHolder
-    "return/create the 'showDiffHolder' value holder (automatically generated)"
-
-    showDiffHolder isNil ifTrue:[
-        showDiffHolder := ValueHolder with: true.
-        showDiffHolder addDependent:self.
-    ].
-    ^ showDiffHolder
-
-    "Modified: / 30-06-2011 / 20:59:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-showDiffHolder:something
-    "set the 'showDiffHolder' value holder (automatically generated)"
+labelCHolder:something
+    "set the 'labelBHolder' value holder (automatically generated)"
 
     |oldValue newValue|
 
-    showDiffHolder notNil ifTrue:[
-        oldValue := showDiffHolder value.
-        showDiffHolder removeDependent:self.
+    labelCHolder notNil ifTrue:[
+        oldValue := labelCHolder value.
+        labelCHolder removeDependent:self.
     ].
-    showDiffHolder := something.
-    showDiffHolder notNil ifTrue:[
-        showDiffHolder addDependent:self.
+    labelCHolder := something.
+    labelCHolder notNil ifTrue:[
+        labelCHolder addDependent:self.
     ].
-    newValue := showDiffHolder value.
+    newValue := labelCHolder value.
     oldValue ~~ newValue ifTrue:[
-        self update:#value with:newValue from:showDiffHolder.
+        self update:#value with:newValue from:labelCHolder.
     ].
+
+    "Created: / 16-03-2012 / 12:15:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 textAHolder
@@ -839,101 +662,76 @@
     ].
 !
 
-titleHolder
-    "return/create the 'labelAHolder' value holder (automatically generated)"
+textCHolder
+    "return/create the 'textBHolder' value holder (automatically generated)"
+
+    textCHolder isNil ifTrue:[
+        textCHolder := ValueHolder new.
+        textCHolder addDependent:self.
+    ].
+    ^ textCHolder
+
+    "Created: / 16-03-2012 / 12:13:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+textCHolder:something
+    "set the 'textBHolder' value holder (automatically generated)"
 
-    titleHolder isNil ifTrue:[
-        titleHolder := ValueHolder with:'Text diff'.
-        "/titleHolder addDependent:self.
+    |oldValue newValue|
+
+    textCHolder notNil ifTrue:[
+        oldValue := textCHolder value.
+        textCHolder removeDependent:self.
     ].
-    ^ titleHolder
+    textCHolder := something.
+    textCHolder notNil ifTrue:[
+        textCHolder addDependent:self.
+    ].
+    newValue := textCHolder value.
+    oldValue ~~ newValue ifTrue:[
+        self update:#value with:newValue from:textCHolder.
+    ].
 
-    "Created: / 30-08-2011 / 09:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 16-03-2012 / 12:14:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool methodsFor:'change & update'!
 
-codeAspect
-
-    ^self codeAspectHolder value
-
-    "Created: / 19-07-2011 / 19:07:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
 update:something with:aParameter from:changedObject
     "Invoked when an object that I depend upon sends a change notification."
 
 
     changedObject == textAHolder ifTrue:[
         textAChanged := true.
-        self updateAfterAorBChanged.
+        self updateAfterAorBorCChanged.
         ^ self.
     ].
     changedObject == textBHolder ifTrue:[
         textBChanged := true.
-        self updateAfterAorBChanged.
+        self updateAfterAorBorCChanged.
+        ^ self.
+    ].
+    changedObject == textCHolder ifTrue:[
+        textCChanged := true.
+        self updateAfterAorBorCChanged.
         ^ self.
     ].
 
-    (changedObject == showDiffHolder) ifTrue:[
-        self updateViews.            
-        ^self.
-    ].
-    super update:something with:aParameter from:changedObject
-
-    "Modified: / 19-07-2011 / 19:44:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
+    ^super update:something with:aParameter from:changedObject
 
-updateAfterAorBChanged
-
-    (textAChanged & textBChanged) ifTrue:[
-        textAChanged := textBChanged := false.
-        self updateViews
-    ].
-
-    "Created: / 06-07-2011 / 12:12:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 16-03-2012 / 12:36:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-updateViews
-
-    | a b |
-    a := self textAHolder value.
-    b := self textBHolder value.
-
-    self showDiffHolder value ifFalse:[
-        self showTextOnly.
-        ^ self
-    ].
+updateAfterAorBorCChanged
+    "Called whenever one of the texts changes"
 
-    (a notNil and:[b notNil]) ifTrue:[
-        self showDiff.
-        ^self
-    ].
-    a notNil ifTrue:[
-        self showVersionA.
-        ^self
-    ].
-    b notNil ifTrue:[
-        self showVersionB.
-        ^self
-    ].
+    ^ self subclassResponsibility
 
-   self showNothing.
-
-    "Created: / 19-07-2011 / 11:29:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 16-03-2012 / 12:39:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool methodsFor:'hooks'!
 
-postBuildCodeView:aScrollableView
-
-    codeView := aScrollableView.
-    codeView notNil ifTrue:[codeView languageHolder: self languageHolder].
-    codeView notNil ifTrue:[codeView classHolder: self classHolder].
-
-    "Created: / 19-07-2011 / 10:17:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
 postBuildDiffView:aScrollableView
 
     diffView := aScrollableView.
@@ -941,11 +739,6 @@
         diffView languageHolder: self languageHolder.
         diffView classHolder: self classHolder.
 
-        (self textAHolder value notNil and:[self textBHolder value notNil]) ifTrue:[
-            diffView scrolledView
-                text1: self textAHolder value
-                text2: self textBHolder value
-        ]
     ].
 
     "Created: / 30-06-2011 / 20:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -956,66 +749,27 @@
 initialize
 
     super initialize.
-    textAChanged := textBChanged := false.
+    textAChanged := textBChanged := textBChanged := false.
 
-    "Modified: / 19-07-2011 / 19:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-03-2012 / 12:40:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-!TextDiffTool methodsFor:'private'!
-
-showDiff
-    |scrolledView|
+!TextDiffTool methodsFor:'testing'!
 
-    self diffSpecHolder value: #diffSpec.
-    
-    diffView isNil ifTrue:[^self].
-    (scrolledView := diffView scrolledView) isNil ifTrue:[^self].
-    scrolledView
-        text1: self textAHolder value
-        text2: self textBHolder value
+isDiff2
+    ^false
 
-    "Created: / 19-07-2011 / 10:22:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 18-11-2011 / 15:01:12 / cg"
+    "Created: / 16-03-2012 / 15:21:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-showNothing
-
-    self diffSpecHolder value: #nothingSpec
-
-    "Created: / 19-07-2011 / 19:34:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-showTextOnly
-
-    self diffSpecHolder value: #textViewSpec
+isDiff3
+    ^false
 
-    "Created: / 19-07-2011 / 11:39:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-showVersionA
-
-    self diffSpecHolder value: #versionAOnlySpec
-
-    "Created: / 19-07-2011 / 10:22:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-showVersionB
-
-    self diffSpecHolder value: #versionBOnlySpec
-
-    "Created: / 19-07-2011 / 10:22:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 16-03-2012 / 15:21:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool class methodsFor:'documentation'!
 
-version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__TextDiffTool.st,v 1.6 2011/11/18 14:05:39 cg Exp $'
-!
-
-version_CVS
-    ^ '§Header: /cvs/stx/stx/libtool/Tools__TextDiffTool.st,v 1.6 2011/11/18 14:05:39 cg Exp §'
-!
-
 version_SVN
-    ^ '$Id: Tools__TextDiffTool.st 7854 2012-01-30 17:49:41Z vranyj1 $'
+    ^ '$Id: Tools__TextDiffTool.st 7925 2012-03-16 17:08:17Z vranyj1 $'
 ! !