AbstractVersionDiffBrowserItem subclass:#ClassItem
instanceVariableNames:'myClass childrensComputed'
classVariableNames:''
poolDictionaries:''
category:'Interface-Browsers'
!
!ClassItem methodsFor:'accessing'!
myClass
"return the value of the instance variable 'myClass' (automatically generated)"
^ myClass!
myClass:something
"set the value of the instance variable 'myClass' (automatically generated)"
myClass := something.!
setChildrensForRevisionInfo:aRevisionInfo
|theChildrens|
aRevisionInfo isNil
ifTrue: [theChildrens := Array with:(SourceRevisionItem newForRevision:nil)]
ifFalse:[theChildrens := (aRevisionInfo at:#revisions) collect:[:eachRevision|
|theRevisionItem|
theRevisionItem := VersionRevisionItem newForRevision:eachRevision.
theRevisionItem].
self isMyClassChanged
ifTrue:[theChildrens addFirst:(SourceRevisionItem newForRevision:myClass revisionInfo)]].
theChildrens do:[:aChild | aChild parent:self].
childrensComputed:=true.
self addAll:theChildrens
! !
!ClassItem methodsFor:'initialization'!
initialize
"
initialize necessary things
<return: self>
"
childrensComputed := false
! !
!ClassItem methodsFor:'protocol'!
children
"returns list of children. The revision for the class myClass
are computed via the sourcecode manager. Only when the childrens
are needed, they are calculated.
<return: nil|List>
"
childrensComputed ifFalse:[
self application getRevisionInfoForClassItem:self.
].
^children
!
hasChildren
"a class items has always childs
<return: Boolean>
"
^true
!
label
^myClass name
! !
!ClassItem methodsFor:'testing'!
isClassItem
^true
!
isMyClassChanged
^Project isClassChanged: myClass
! !
!ClassItem class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/libtool/ClassItem.st,v 1.2 1999-12-29 15:24:33 ps Exp $'
! !