class: Tools::ClassCategoryList
class definition
changed:
#listOfCategories
#update:with:from:
#updateList
--- a/Tools__ClassCategoryList.st Sat Jan 31 02:02:35 2015 +0100
+++ b/Tools__ClassCategoryList.st Sat Jan 31 02:08:49 2015 +0100
@@ -741,7 +741,7 @@
|categories categoriesBag hideUnloadedClassesValue generator nameSpaceFilterValue packageFilterValue allName
categoriesWithExtensions categoriesWithChangedCode categoriesWithRemoteChangedCode
classesInChangeSet classesInRemoteChangeSet classesWithExtensions
- numClassesInChangeSet numClasses numUnloaded numUndocumented numExtendedClasses
+ numClassesInChangeSet numUnloaded numUndocumented
pseudoEntryColor showCounts|
showCounts := true.
@@ -758,7 +758,7 @@
(packageFilterValue includes:allName) ifTrue:[packageFilterValue := nil].
].
- numClasses := numUndocumented := numUnloaded := numClassesInChangeSet := numExtendedClasses := 0.
+ numUndocumented := numUnloaded := numClassesInChangeSet := 0.
categories := Set new.
categoriesBag := Bag new.
@@ -768,6 +768,7 @@
classesInChangeSet := ChangeSet current changedClasses.
classesInChangeSet := classesInChangeSet collect:[:eachClass | eachClass theNonMetaclass].
+ numClassesInChangeSet := classesInChangeSet size.
classesInRemoteChangeSet := SmallTeam isNil ifTrue:[#()] ifFalse:[ SmallTeam changedClasses ].
classesInRemoteChangeSet := classesInRemoteChangeSet collect:[:each | each theNonMetaclass].
@@ -798,8 +799,6 @@
(hideUnloadedClassesValue not or:[isLoaded])
ifTrue:[
- numClasses := numClasses + 1.
-
cat := cls category ? '* no category *'.
cat isString ifFalse:[self halt:'oops - strange category'].
categories add:cat.
@@ -815,7 +814,6 @@
cls hasExtensions ifTrue:[
categoriesWithExtensions add:cat.
classesWithExtensions add:cls.
- numExtendedClasses := numExtendedClasses + 1.
].
]
]
@@ -874,11 +872,10 @@
rawCategoryList add:self class nameListEntryForUnloaded.
categories add:((self class nameListEntryForUnloadedWithCount bindWith:numUnloaded) allItalic colorizeAllWith:pseudoEntryColor).
].
- numExtendedClasses > 0 ifTrue:[
+ (classesWithExtensions size > 0) ifTrue:[
rawCategoryList add:self class nameListEntryForExtendedClasses.
- categories add:((self class nameListEntryForExtendedClassesWithCount bindWith:numExtendedClasses) allItalic colorizeAllWith:pseudoEntryColor).
+ categories add:((self class nameListEntryForExtendedClassesWithCount bindWith:(classesWithExtensions size)) allItalic colorizeAllWith:pseudoEntryColor).
].
- numClassesInChangeSet := (ChangeSet current changedClasses collect:[:c | c theNonMetaclass] as:Set) size.
numClassesInChangeSet > 0 ifTrue:[
rawCategoryList addFirst:self class nameListEntryForChanged.
categories addFirst:((self class nameListEntryForChangedWithCount bindWith:numClassesInChangeSet) allItalic colorizeAllWith:pseudoEntryColor).
@@ -889,7 +886,7 @@
self classCategoryLabelHolder value:(categories first)
].
rawCategoryList addFirst:self class nameListEntryForALL.
- categories addFirst:((self class nameListEntryForALLWithCount bindWith:numClasses) allItalic colorizeAllWith:pseudoEntryColor).
+ categories addFirst:((self class nameListEntryForALLWithCount bindWith:(classes size)) allItalic colorizeAllWith:pseudoEntryColor).
].
cookedCategoryList := categories.
@@ -975,7 +972,7 @@
selectedCategoriesHolder := self selectedCategories.
oldSelection := selectedCategoriesHolder value ? #().
- prevClasses := classes copy.
+ prevClasses := classes "copy".
newList := self listOfCategories. "/ sigh - sideeffect of setting rawList
oldList := (self categoryList value) ? #().
@@ -983,15 +980,17 @@
ifFalse:[
"/ a real change, or only emphasis ?
(newList sameContentsAs:oldList whenComparedWith:[:a :b | a asString string = b asString string]) ifTrue:[
- "/ only emphasis
- oldSelection size > 0 ifTrue:[
+ "/ only emphasis
+
+ oldSelection notEmpty ifTrue:[
selectedCategoriesHolder removeDependent:self.
selectedCategoriesHolder value:#().
selectedCategoriesHolder addDependent:self.
].
+
categoryList value:newList.
- oldSelection size > 0 ifTrue:[
+ oldSelection notEmpty ifTrue:[
newSelection := oldSelection select:[:cat | newList includes:cat].
selectedCategoriesHolder value:newSelection.
]
@@ -1006,7 +1005,8 @@
]
]
] ifTrue:[
- "/ in case the same categories are present, but classes have changed ...
+ "/ in case the same categories are present, but classes have changed,
+ "/ we still have to update the outputGenerator, to get a new classList...
(prevClasses isNil or:[(classes identicalContentsAs:prevClasses) not]) ifTrue:[
self updateOutputGenerator.
]
@@ -1169,10 +1169,10 @@
!ClassCategoryList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ClassCategoryList.st,v 1.60 2014-12-24 11:36:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ClassCategoryList.st,v 1.61 2015-01-31 01:08:49 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ClassCategoryList.st,v 1.60 2014-12-24 11:36:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ClassCategoryList.st,v 1.61 2015-01-31 01:08:49 cg Exp $'
! !