Tools_ClassGeneratorList.st
changeset 8698 05d8a9b0afd3
parent 6961 cc6a3682286b
child 9031 24c5fa4d53af
equal deleted inserted replaced
8697:36392f42d8e6 8698:05d8a9b0afd3
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
       
    13 "{ Package: 'stx:libtool' }"
    12 "{ Package: 'stx:libtool' }"
    14 
    13 
    15 "{ NameSpace: Tools }"
    14 "{ NameSpace: Tools }"
    16 
    15 
    17 BrowserList subclass:#ClassGeneratorList
    16 BrowserList subclass:#ClassGeneratorList
   328     theList := Set new.
   327     theList := Set new.
   329     generator := inGeneratorHolder value.
   328     generator := inGeneratorHolder value.
   330     generator isNil ifTrue:[^ #() ].
   329     generator isNil ifTrue:[^ #() ].
   331     generator do:[:prj | theList add:prj].
   330     generator do:[:prj | theList add:prj].
   332     theList := theList asOrderedCollection sort.
   331     theList := theList asOrderedCollection sort.
   333     theList addFirst:(self class nameListEntryForALL).
   332     theList addFirst:(self class nameListEntryForALL asText allItalic).
   334     ^ theList
   333     ^ theList
   335 
   334 
   336     "Created: / 25.2.2000 / 21:24:26 / cg"
   335     "Created: / 25.2.2000 / 21:24:26 / cg"
   337 !
   336 !
   338 
   337 
   339 listOfCategories
   338 listOfCategories
   340     |categories hideUnloadedClasses|
   339     |categories hideUnloadedClasses|
   341 
   340 
   342     inGeneratorHolder notNil ifTrue:[
   341     inGeneratorHolder notNil ifTrue:[
   343 	^ self listFromInGenerator
   342         ^ self listFromInGenerator
   344     ].
   343     ].
   345 
   344 
   346     hideUnloadedClasses := self hideUnloadedClasses value.
   345     hideUnloadedClasses := self hideUnloadedClasses value.
   347 
   346 
   348     categories := Set new.
   347     categories := Set new.
   349     Smalltalk allClassesDo:[:cls |
   348     Smalltalk allClassesDo:[:cls |
   350 	(hideUnloadedClasses not or:[cls isLoaded])
   349         (hideUnloadedClasses not or:[cls isLoaded])
   351 	ifTrue:[
   350         ifTrue:[
   352 	    categories add:cls category.
   351             categories add:cls category.
   353 	]
   352         ]
   354     ].
   353     ].
   355 
   354 
   356     "/ those are simulated - in ST/X, empty categories do not
   355     "/ those are simulated - in ST/X, empty categories do not
   357     "/ really exist; however, during browsing, it makes sense.
   356     "/ really exist; however, during browsing, it makes sense.
   358     AdditionalEmptyCategories size > 0 ifTrue:[
   357     AdditionalEmptyCategories size > 0 ifTrue:[
   359 	"/ remove those that are present ...
   358         "/ remove those that are present ...
   360 	AdditionalEmptyCategories := AdditionalEmptyCategories select:[:cat | (categories includes:cat) not].
   359         AdditionalEmptyCategories := AdditionalEmptyCategories select:[:cat | (categories includes:cat) not].
   361 	categories addAll:AdditionalEmptyCategories.
   360         categories addAll:AdditionalEmptyCategories.
   362     ].
   361     ].
   363     categories := categories asOrderedCollection.
   362     categories := categories asOrderedCollection.
   364     categories sort.
   363     categories sort.
   365     categories addFirst:(self class nameListEntryForALL).
   364     categories addFirst:(self class nameListEntryForALL asText allItalic).
   366     ^ categories
   365     ^ categories
   367 
   366 
   368     "Created: / 5.2.2000 / 13:42:12 / cg"
   367     "Created: / 5.2.2000 / 13:42:12 / cg"
   369     "Modified: / 25.2.2000 / 21:26:04 / cg"
   368     "Modified: / 25.2.2000 / 21:26:04 / cg"
   370 !
   369 !
   397         allNamespaces := allNamespaces select:[:ns | ns isTopLevelNameSpace].
   396         allNamespaces := allNamespaces select:[:ns | ns isTopLevelNameSpace].
   398     ].
   397     ].
   399     allNamespaces := allNamespaces collect:[:ns | ns name].
   398     allNamespaces := allNamespaces collect:[:ns | ns name].
   400     allNamespaces := allNamespaces asOrderedCollection.
   399     allNamespaces := allNamespaces asOrderedCollection.
   401     allNamespaces sort.
   400     allNamespaces sort.
   402     allNamespaces addFirst:(self class nameListEntryForALL).
   401     allNamespaces addFirst:(self class nameListEntryForALL asText allItalic).
   403     ^ allNamespaces
   402     ^ allNamespaces
   404 
   403 
   405     "Created: / 25.2.2000 / 21:21:14 / cg"
   404     "Created: / 25.2.2000 / 21:21:14 / cg"
   406     "Modified: / 25.2.2000 / 21:26:41 / cg"
   405     "Modified: / 25.2.2000 / 21:26:41 / cg"
   407 !
   406 !
   449         "/ remove those that are present ...
   448         "/ remove those that are present ...
   450         AdditionalEmptyProjects := AdditionalEmptyProjects select:[:pkg | (allProjects includes:pkg) not].
   449         AdditionalEmptyProjects := AdditionalEmptyProjects select:[:pkg | (allProjects includes:pkg) not].
   451         allProjects addAll:AdditionalEmptyProjects.
   450         allProjects addAll:AdditionalEmptyProjects.
   452     ].
   451     ].
   453     allProjects sort.
   452     allProjects sort.
   454     allProjects addFirst:(self class nameListEntryForALL).
   453     allProjects addFirst:(self class nameListEntryForALL asText allItalic).
   455     ^ allProjects
   454     ^ allProjects
   456 
   455 
   457     "Created: / 25.2.2000 / 21:22:06 / cg"
   456     "Created: / 25.2.2000 / 21:22:06 / cg"
   458     "Modified: / 25.2.2000 / 21:27:27 / cg"
   457     "Modified: / 25.2.2000 / 21:27:27 / cg"
   459 !
   458 !
   535 ! !
   534 ! !
   536 
   535 
   537 !ClassGeneratorList class methodsFor:'documentation'!
   536 !ClassGeneratorList class methodsFor:'documentation'!
   538 
   537 
   539 version
   538 version
   540     ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassGeneratorList.st,v 1.7 2006-08-23 17:33:29 cg Exp $'
   539     ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassGeneratorList.st,v 1.8 2009-09-14 18:16:21 cg Exp $'
   541 ! !
   540 ! !