MCDependentsWrapper.st
author Jan Vrany <jan.vrany@labware.com>
Sat, 04 Jul 2020 08:14:13 +0100
branchjv
changeset 1121 c5661215109c
parent 995 92bb466548a9
permissions -rw-r--r--
Tonel: various fixes here and there (part 2)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1121
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
     1
"
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
     2
COPYRIGHT (c) 2020 LabWare
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
     3
"
122
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
"{ Package: 'stx:goodies/monticello' }"
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
995
92bb466548a9 Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 620
diff changeset
     6
"{ NameSpace: Smalltalk }"
92bb466548a9 Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 620
diff changeset
     7
122
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
ListItemWrapper subclass:#MCDependentsWrapper
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	instanceVariableNames:''
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	classVariableNames:''
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	poolDictionaries:''
620
f924164d37c0 category change
Claus Gittinger <cg@exept.de>
parents: 122
diff changeset
    12
	category:'SCM-Monticello-UI'
122
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
1121
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    15
!MCDependentsWrapper class methodsFor:'documentation'!
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    16
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    17
copyright
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    18
"
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    19
COPYRIGHT (c) 2020 LabWare
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    20
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    21
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    22
"
c5661215109c Tonel: various fixes here and there (part 2)
Jan Vrany <jan.vrany@labware.com>
parents: 995
diff changeset
    23
! !
122
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
!MCDependentsWrapper methodsFor:'as yet unclassified'!
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
asString
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
	^item description
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
!
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
contents
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
	| list workingCopies |
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
	workingCopies := model unsortedWorkingCopies.
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	list := item requiredPackages collect: 
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
					[:each | 
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
					workingCopies detect: [:wc | wc package = each] ifNone: [nil]]
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
				thenSelect: [:x | x notNil].
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
	^list collect: [:each | self class with: each model: model]
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
!
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
hasContents
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
	^item requiredPackages isEmpty not
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
!
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
item
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
	^item
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
! !
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
!MCDependentsWrapper class methodsFor:'documentation'!
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
version
620
f924164d37c0 category change
Claus Gittinger <cg@exept.de>
parents: 122
diff changeset
    52
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCDependentsWrapper.st,v 1.2 2012-09-11 21:21:24 cg Exp $'
122
4452306c6887 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
! !
995
92bb466548a9 Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 620
diff changeset
    54