--- a/Tools__ProjectList.st Sun May 17 06:38:47 2015 +0200
+++ b/Tools__ProjectList.st Wed May 20 11:22:14 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2000 by eXept Software AG
All Rights Reserved
@@ -272,7 +274,7 @@
changedObject value == 0 ifTrue:[
self selectionIndexHolder value:#()
].
- newSel := changedObject value collect:[:idx | projectList value at:idx].
+ newSel := changedObject value collect:[:idx | (projectList value at:idx) withoutSeparators].
newSel ~= self selectedProjects value ifTrue:[
self selectedProjects value:newSel.
].
@@ -418,9 +420,10 @@
!
updateSelectionIndexFromSelection
- |newSel allIdx|
+ |newSel allIdx selection selectionIndex |
- self selectionHolder value isNil ifTrue:[
+ selection := self selectionHolder value.
+ selection isNil ifTrue:[
self selectionIndexHolder value:0.
^ self.
].
@@ -430,13 +433,14 @@
].
allIdx := projectList value indexOf:(self class nameListEntryForALL).
- newSel := self selectionHolder value
+ newSel := selection
collect:[:val | |i|
- i := projectList value indexOf:val.
+ i := projectList value findFirst:[:entry | entry string withoutSeparators = val].
i == 0 ifTrue:[allIdx] ifFalse:[i]]
thenSelect:[:idx | idx ~~ 0].
- (newSel ~= self selectionIndexHolder value
- or:[ self selectionIndexHolder value == 0]) ifTrue:[
+
+ selectionIndex := self selectionIndexHolder value.
+ (newSel ~= selectionIndex or:[ selectionIndex == 0]) ifTrue:[
self selectionIndexHolder value:newSel
].
@@ -710,7 +714,11 @@
hideModules := HideModules ? true.
hideModules := HideModules ? false.
- allProjects := IdentitySet new.
+ sortBy value == #keep ifTrue:[
+ allProjects := OrderedCollection new.
+ ] ifFalse:[
+ allProjects := IdentitySet new.
+ ].
projectBag := Bag new.
inGeneratorHolder isNil ifTrue:[
@@ -813,23 +821,27 @@
|allProjects numClassesInChangeSet|
allProjects := self allShownProjects copyAsOrderedCollection.
- allProjects sort.
+ sortBy value ~~ #keep ifTrue:[
+ allProjects sort
+ ].
allProjects size == 1 ifTrue:[
"/ self projectLabelHolder value:(allProjects first , ' [Project]').
self projectLabelHolder value:(LabelAndIcon icon:(self class packageIcon) string:allProjects first).
].
- includedPseudoEntryForChanged ifTrue:[
- numClassesInChangeSet := ChangeSet current changedClasses size.
- numClassesInChangeSet > 0 ifTrue:[
- "/ don't include count - makeGenerator compares against the un-expanded nameListEntry (sigh - need two lists)
- allProjects addFirst:((self class nameListEntryForChanged "bindWith:numClassesInChangeSet") allItalic).
+ sortBy value ~~ #keep ifTrue:[
+ includedPseudoEntryForChanged ifTrue:[
+ numClassesInChangeSet := ChangeSet current changedClasses size.
+ numClassesInChangeSet > 0 ifTrue:[
+ "/ don't include count - makeGenerator compares against the un-expanded nameListEntry (sigh - need two lists)
+ allProjects addFirst:((self class nameListEntryForChanged "bindWith:numClassesInChangeSet") allItalic).
+ ].
].
- ].
- allProjects size > 1 ifTrue:[
- allProjects addFirst:(self class nameListEntryForALL allItalic).
+ allProjects size > 1 ifTrue:[
+ allProjects addFirst:(self class nameListEntryForALL allItalic).
+ ].
].
^ allProjects
@@ -1045,10 +1057,10 @@
!ProjectList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectList.st,v 1.74 2015-02-04 23:15:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectList.st,v 1.75 2015-05-19 16:21:53 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectList.st,v 1.74 2015-02-04 23:15:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectList.st,v 1.75 2015-05-19 16:21:53 cg Exp $'
! !