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

"
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
              All Rights Reserved

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the 'Software'), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"
"{ Package: 'stx:libtool' }"

"{ NameSpace: Tools }"

SyncedMultiColumnTextView subclass:#DiffCodeView2
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-CodeView'
!

!DiffCodeView2 class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
              All Rights Reserved

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the 'Software'), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"
! !

!DiffCodeView2 class methodsFor:'defaults'!

textViewClass
    "return the type of the synced subViews.
     Can be redefined in subclasses"

    ^ Tools::CodeView2

    "Created: / 06-03-2010 / 10:40:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!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>"
!

synchronizeWith: aCodeView

    textViews do:[:each|each synchronizeWith: aCodeView].

    "Created: / 19-03-2012 / 14:26:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

textViews
    ^ textViews
!

unsynchronizeWith: aCodeView

    textViews do:[:each|each unsynchronizeWith: aCodeView].

    "Created: / 19-03-2012 / 14:26:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!DiffCodeView2 methodsFor:'initialization'!

initialize

    super initialize.
    textViews do:
        [:thisView|
        thisView diffMode: true.
        thisView ~= textViews first ifTrue:
            [thisView showGutterChannel value: false].
        textViews do:
            [:otherView|
            thisView == otherView ifFalse:
                [thisView synchronizeWith: otherView]]].

    "Created: / 06-04-2010 / 14:15:03 / Jakub <zelenja7@fel.cvut.cz>"
    "Modified: / 23-06-2010 / 19:36:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!DiffCodeView2 class methodsFor:'documentation'!

version_CVS
    ^ '§Header: /cvs/stx/stx/libtool/Tools__DiffCodeView2.st,v 1.3 2011/07/19 12:32:44 vrany Exp §'
!

version_SVN
    ^ '$Id: Tools__DiffCodeView2.st 7944 2012-03-19 15:32:45Z vranyj1 $'
! !