Tools__TextDiffTool.st
branchjv
changeset 12123 4bde08cebd48
parent 10870 b263e62a7ea1
child 12125 0c49a3b13e43
--- a/Tools__TextDiffTool.st	Fri Jan 27 22:18:53 2012 +0100
+++ b/Tools__TextDiffTool.st	Sun Jan 29 12:53:39 2012 +0000
@@ -14,9 +14,9 @@
 "{ NameSpace: Tools }"
 
 ApplicationModel subclass:#TextDiffTool
-	instanceVariableNames:'titleHolder labelAHolder textAHolder labelBHolder textBHolder
-		classHolder languageHolder codeAspectHolder showDiffHolder
-		diffSpecHolder diffView textAChanged textBChanged codeView'
+	instanceVariableNames:'labelAHolder textAHolder labelBHolder textBHolder classHolder
+		languageHolder codeAspectHolder showDiffHolder diffSpecHolder
+		diffView textAChanged textBChanged codeView'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Diff'
@@ -318,7 +318,6 @@
        (WindowSpec
           label: 'Text Diff Tool'
           name: 'Text Diff Tool'
-          labelChannel: titleHolder
           min: (Point 10 10)
           bounds: (Rectangle 0 0 640 480)
         )
@@ -334,6 +333,8 @@
          
         )
       )
+
+    "Modified: / 30-06-2011 / 20:45:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 windowSpecForEmbedding
@@ -550,56 +551,20 @@
      (if this app is embedded in a subCanvas)."
 
     ^ #(
-        #classHolder
-        #codeAspectHolder
         #labelAHolder
         #labelBHolder
-        #languageHolder
-        #showDiffHolder
+
         #textAHolder
         #textBHolder
+
+        #showDiffHolder
+
+        #classHolder
+        #languageHolder
+        #codeAspectHolder
       ).
 
-! !
-
-!TextDiffTool methodsFor:'accessing'!
-
-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>"
-!
-
-labelB: aString
-
-    ^self labelBHolder value: aString
-
-    "Modified: / 19-07-2011 / 11:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Created: / 30-08-2011 / 09:42:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-textA: aString
-
-    ^self textAHolder value: aString
-
-    "Created: / 30-08-2011 / 09:43:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-textB: aString
-
-    ^self textBHolder value: aString
-
-    "Created: / 30-08-2011 / 09:43:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-title: aString
-
-    ^self titleHolder 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>"
+    "Modified: / 19-07-2011 / 19:07:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool methodsFor:'aspects'!
@@ -837,18 +802,6 @@
     oldValue ~~ newValue ifTrue:[
         self update:#value with:newValue from:textBHolder.
     ].
-!
-
-titleHolder
-    "return/create the 'labelAHolder' value holder (automatically generated)"
-
-    titleHolder isNil ifTrue:[
-        titleHolder := ValueHolder with:'Text diff'.
-        "/titleHolder addDependent:self.
-    ].
-    ^ titleHolder
-
-    "Created: / 30-08-2011 / 09:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TextDiffTool methodsFor:'change & update'!
@@ -937,16 +890,8 @@
 postBuildDiffView:aScrollableView
 
     diffView := aScrollableView.
-    diffView notNil ifTrue:[
-        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
-        ]
-    ].
+    diffView notNil ifTrue:[diffView languageHolder: self languageHolder].
+    diffView notNil ifTrue:[diffView classHolder: self classHolder].
 
     "Created: / 30-06-2011 / 20:55:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -964,18 +909,16 @@
 !TextDiffTool methodsFor:'private'!
 
 showDiff
-    |scrolledView|
 
     self diffSpecHolder value: #diffSpec.
     
-    diffView isNil ifTrue:[^self].
-    (scrolledView := diffView scrolledView) isNil ifTrue:[^self].
-    scrolledView
+    diffView ifNil:[^self].
+    diffView scrolledView ifNil:[^self].
+    diffView scrolledView
         text1: self textAHolder value
         text2: self textBHolder value
 
     "Created: / 19-07-2011 / 10:22:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 18-11-2011 / 15:01:12 / cg"
 !
 
 showNothing
@@ -1008,14 +951,10 @@
 
 !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 $'
+    ^ '§Header: /cvs/stx/stx/libtool/Tools__TextDiffTool.st,v 1.3 2011/07/19 19:25:25 vrany Exp §'
 !
 
 version_SVN
-    ^ '§Id§'
-! !
+    ^ '$Id: Tools__TextDiffTool.st 7810 2011-08-12 14:54:02Z vranyj1 $'
+! !
\ No newline at end of file