Tools__DiffCodeView2.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 19 Mar 2012 15:32:45 +0000
branchjv
changeset 12198 414e7b69ecda
parent 12179 47f98e7d6de1
child 12262 d25ef6bb0ef3
permissions -rw-r--r--
Text/ChangeSet diff improved
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
10074
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
     2
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
     3
              All Rights Reserved
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
10074
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
     5
Permission is hereby granted, free of charge, to any person
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
     6
obtaining a copy of this software and associated documentation
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
     7
files (the 'Software'), to deal in the Software without
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
     8
restriction, including without limitation the rights to use,
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
     9
copy, modify, merge, publish, distribute, sublicense, and/or sell
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    10
copies of the Software, and to permit persons to whom the
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    11
Software is furnished to do so, subject to the following
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    12
conditions:
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    13
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    14
The above copyright notice and this permission notice shall be
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    15
included in all copies or substantial portions of the Software.
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    16
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    17
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    18
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    19
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    20
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    21
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    22
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    23
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    24
OTHER DEALINGS IN THE SOFTWARE.
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"{ Package: 'stx:libtool' }"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
"{ NameSpace: Tools }"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
12179
47f98e7d6de1 Improvments towards merge tool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
    30
SyncedMultiColumnTextView subclass:#DiffCodeView2
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	instanceVariableNames:''
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	classVariableNames:''
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	poolDictionaries:''
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	category:'Interface-CodeView'
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
!DiffCodeView2 class methodsFor:'documentation'!
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
copyright
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
10074
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    41
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    42
              All Rights Reserved
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    43
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    44
Permission is hereby granted, free of charge, to any person
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    45
obtaining a copy of this software and associated documentation
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    46
files (the 'Software'), to deal in the Software without
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    47
restriction, including without limitation the rights to use,
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    48
copy, modify, merge, publish, distribute, sublicense, and/or sell
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    49
copies of the Software, and to permit persons to whom the
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    50
Software is furnished to do so, subject to the following
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    51
conditions:
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
10074
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    53
The above copyright notice and this permission notice shall be
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    54
included in all copies or substantial portions of the Software.
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    55
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    56
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    57
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    58
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    59
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    60
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    61
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    62
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
5c6c66fa40d1 changed: #copyright
Claus Gittinger <cg@exept.de>
parents: 9978
diff changeset
    63
OTHER DEALINGS IN THE SOFTWARE.
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
! !
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
!DiffCodeView2 class methodsFor:'defaults'!
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
textViewClass
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    "return the type of the synced subViews.
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
     Can be redefined in subclasses"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    ^ Tools::CodeView2
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
    "Created: / 06-03-2010 / 10:40:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
! !
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
!DiffCodeView2 methodsFor:'accessing'!
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
10331
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    80
classHolder: aValueModel
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    81
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    82
    textViews do:[:each|each classHolder: aValueModel].
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    83
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    84
    "Created: / 19-07-2011 / 12:55:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    85
!
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    86
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    87
languageHolder: aValueModel
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    88
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    89
    textViews do:[:each|each languageHolder: aValueModel].
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    90
395bdb2d4575 Improvements in diffing tools
vrany
parents: 10074
diff changeset
    91
    "Created: / 19-07-2011 / 12:55:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
12198
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    92
!
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    93
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    94
synchronizeWith: aCodeView
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    95
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    96
    textViews do:[:each|each synchronizeWith: aCodeView].
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    97
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    98
    "Created: / 19-03-2012 / 14:26:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
    99
!
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   100
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   101
textViews
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   102
    ^ textViews
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   103
!
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   104
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   105
unsynchronizeWith: aCodeView
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   106
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   107
    textViews do:[:each|each unsynchronizeWith: aCodeView].
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   108
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   109
    "Created: / 19-03-2012 / 14:26:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
! !
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
!DiffCodeView2 methodsFor:'initialization'!
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
initialize
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
    super initialize.
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
    textViews do:
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
        [:thisView|
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
        thisView diffMode: true.
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
        thisView ~= textViews first ifTrue:
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
            [thisView showGutterChannel value: false].
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
        textViews do:
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
            [:otherView|
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
            thisView == otherView ifFalse:
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
                [thisView synchronizeWith: otherView]]].
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
    "Created: / 06-04-2010 / 14:15:03 / Jakub <zelenja7@fel.cvut.cz>"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    "Modified: / 23-06-2010 / 19:36:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
! !
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
!DiffCodeView2 class methodsFor:'documentation'!
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
version_CVS
12123
4bde08cebd48 trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10331
diff changeset
   134
    ^ '§Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.3 2011/07/19 12:32:44 vrany Exp §'
9978
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
!
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
4c863461e5a2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
version_SVN
12198
414e7b69ecda Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12179
diff changeset
   138
    ^ '$Id: Tools__DiffCodeView2.st 7944 2012-03-19 15:32:45Z vranyj1 $'
12179
47f98e7d6de1 Improvments towards merge tool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   139
! !