MCVersionList.st
author Claus Gittinger <cg@exept.de>
Sat, 20 Aug 2011 16:26:27 +0200
changeset 399 1ff4e17c298e
parent 397 dc0e74d097dc
child 606 adcb977a22f8
permissions -rw-r--r--
changed: #updateList

"{ Package: 'stx:goodies/monticello' }"

MCBrowserList subclass:#MCVersionList
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Monticello-St/X UI'
!


!MCVersionList methodsFor:'generators'!

makeGenerator
    "superclass Tools::BrowserList says that I am responsible to implement this method"

     ^Iterator on:
        [:whatToDo| | selection |
        selection := self selectionHolder value.
        selection ifNotNil:[whatToDo value: selection]].

    "Modified: / 17-09-2010 / 09:53:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!MCVersionList methodsFor:'private'!

makeDependent
    "superclass Tools::BrowserList says that I am responsible to implement this method"

    "^ self shouldImplement"

    "Modified: / 16-09-2010 / 19:03:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

makeIndependent
    "superclass Tools::BrowserList says that I am responsible to implement this method"

    "^ self shouldImplement"

    "Modified: / 16-09-2010 / 19:03:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

updateList
    | generator list |

    self withWaitCursorDo:[
        generator := self inGeneratorHolder value ? #().
        list := SortedCollection sortBlock:
            [:v1 :v2| | vn1 vn2 |
            vn1 := v1 versionNumber.
            vn2 := v2 versionNumber.
            (vn1 notNil and:[vn2 notNil]) 
                ifTrue:[vn1 > vn2]
                ifFalse:[v1 name > v2 name]].
        generator do:[:verentry|list add: verentry].
        listHolder value: list.
        listValid := true.
    ].

    "Modified: / 13-10-2010 / 15:32:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 20-08-2011 / 16:24:11 / cg"
! !

!MCVersionList class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCVersionList.st,v 1.3 2011-08-20 14:26:27 cg Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCVersionList.st,v 1.3 2011-08-20 14:26:27 cg Exp $'
!

version_SVN
    ^ '§Id: MCVersionList.st 19 2010-10-14 10:51:48Z vranyj1 §'
! !