SystemOrganizer.st
author Claus Gittinger <cg@exept.de>
Wed, 12 Apr 2000 23:41:37 +0200
changeset 925 95dda78c41a2
parent 906 862b6903fbf3
child 969 3f3e9552e78b
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     1
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     2
 COPYRIGHT (c) 1998 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     3
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     4
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     5
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     6
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     8
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     9
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    10
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    11
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    12
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    13
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    14
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
Object subclass:#SystemOrganizer
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    16
	instanceVariableNames:'categoryArray nameSpace'
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    17
	classVariableNames:'AllCategories'
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'Kernel-Support'
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    22
!SystemOrganizer class methodsFor:'documentation'!
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    23
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    24
copyright
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    25
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    26
 COPYRIGHT (c) 1998 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    27
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    28
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    29
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    30
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    32
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    33
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    34
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    35
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    36
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    37
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    38
!
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    39
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    40
documentation
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    41
"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    42
     In ST80, there is a systemOrganization, which groups classes
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    43
     to categories.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    44
     All of this here is mimicri - ST/X keeps the category in the class.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    45
     This class simulates the ST80 behavior.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    46
"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    47
! !
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
!SystemOrganizer class methodsFor:'instance creation'!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
for:aNameSpace
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    52
    "create & return a new instance of myself, to organize aNameSpace.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    53
     All of this here is mimicri - ST/X keeps the category in the class."
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    55
    ^ self new nameSpace:aNameSpace.
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    57
    "Modified: / 6.2.2000 / 20:25:50 / cg"
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
! !
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
!SystemOrganizer methodsFor:'accessing'!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    62
addCategory:aCategory before:someOtherCategory
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    63
    (categoryArray isNil
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    64
    or:[(categoryArray includes:aCategory) not]) ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    65
        categoryArray := nil.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    66
        AllCategories add:aCategory.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    67
    ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    68
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    69
    "Created: / 6.2.2000 / 20:42:20 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    70
    "Modified: / 6.2.2000 / 20:44:34 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    71
!
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    72
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
categories
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    "return a collection of my classes class-categories.
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
     If my nameSpace is nil, all classes' categories are included;
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
     otherwise, only the categories of that particular namespace."
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    78
    |addClassAction categorySet searchedNamespace allNames|
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    80
    categoryArray notNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    81
        ^ categoryArray
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    82
    ].
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    84
    addClassAction := [:aClass |
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    85
        |cat|
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    87
        aClass isMeta ifFalse:[
925
95dda78c41a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
    88
            (aClass isNameSpace not) ifTrue:[
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    89
                cat := aClass category.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    90
                cat isNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    91
                    cat := '* no category *'
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    92
                ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    93
                cat ~= 'obsolete' ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    94
                    categorySet add:cat
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
                ]
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
            ]
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
        ].
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    98
    ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    99
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   100
    AllCategories isNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   101
        categorySet := Set new.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   102
        Smalltalk allBehaviorsDo:addClassAction.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   103
        AllCategories := categorySet.
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    ].
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   105
        
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   106
    (searchedNamespace := nameSpace) isNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   107
        allNames := true.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   108
        searchedNamespace := Smalltalk.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   109
    ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   110
    searchedNamespace == Smalltalk ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   111
        categorySet := AllCategories.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   112
    ] ifFalse:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   113
        categorySet := Set new.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   114
        searchedNamespace allBehaviorsDo:addClassAction.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   115
    ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   116
    categoryArray := categorySet asArray sort.
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
    ^ categoryArray
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
     (SystemOrganizer for:nil) categories 
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
     (SystemOrganizer for:Smalltalk) categories 
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
     (SystemOrganizer for:Demos) categories 
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   125
    "Modified: / 6.2.2000 / 20:33:42 / cg"
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   126
!
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   127
895
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   128
categoryOfElement:aClassName
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   129
    "return a classes category;
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   130
     the argument is the classes name"
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   131
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   132
    |cls|
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   133
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   134
    cls := Smalltalk at:aClassName ifAbsent:nil.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   135
    cls notNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   136
        ^ cls category
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   137
    ].
895
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   138
    self error:'no such class'.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   139
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   140
    "Modified: / 6.2.2000 / 20:12:10 / cg"
895
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   141
!
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   142
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   143
classify:aClassName under:newCategory
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   144
    "change a classes category;
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   145
     the argument is the classes name"
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   146
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   147
    |cls cats|
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   148
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   149
    cls := Smalltalk at:aClassName ifAbsent:nil.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   150
    cls notNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   151
        (AllCategories includes:newCategory) ifFalse:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   152
            cats := AllCategories asOrderedCollection.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   153
            cats add:newCategory.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   154
            cats sort.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   155
            AllCategories := cats.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   156
        ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   157
        (categoryArray notNil and:[categoryArray includes:newCategory]) not
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   158
        ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   159
            categoryArray := nil.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   160
        ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   161
        ^ cls category:newCategory
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   162
    ].
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   163
    self error:'no such class'.
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   164
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   165
    "Created: / 4.2.2000 / 18:30:11 / cg"
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   166
    "Modified: / 6.2.2000 / 20:36:30 / cg"
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   167
!
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   168
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   169
listAtCategoryNamed:aCategory
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   170
    "return a collection of classes in aCategory."
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   171
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   172
    |set classSet searchedNamespace allNames|
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   173
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   174
    classSet := IdentitySet new.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   175
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   176
    (searchedNamespace := nameSpace) isNil ifTrue:[
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   177
        allNames := true.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   178
        searchedNamespace := Smalltalk.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   179
    ].
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   180
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   181
    searchedNamespace allBehaviorsDo:[:aClass |
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   182
        |cat|
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   183
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   184
        aClass isMeta ifFalse:[
925
95dda78c41a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
   185
            (aClass isNameSpace not 
95dda78c41a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
   186
            or:[aClass == NameSpace 
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   187
            or:[aClass == Smalltalk]]) ifTrue:[
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   188
                (allNames or:[aClass nameSpace == nameSpace]) ifTrue:[
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   189
                    cat := aClass category.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   190
                    cat = aCategory ifTrue:[
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   191
                        classSet add:aClass name
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   192
                    ]
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   193
                ]
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   194
            ]
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   195
        ]
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   196
    ].
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   197
    ^ classSet asArray sort.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   198
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   199
    "
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   200
     (SystemOrganizer for:nil) listAtCategoryNamed:'Collections-Abstract' 
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   201
     (SystemOrganizer for:Smalltalk) listAtCategoryNamed:'Collections-Abstract' 
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   202
     (SystemOrganizer for:Demos) listAtCategoryNamed:'Collections-Abstract' 
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   203
    "
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   204
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   205
    "Modified: / 20.6.1998 / 13:34:19 / cg"
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
! !
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   208
!SystemOrganizer methodsFor:'change and update'!
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   209
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   210
update:something with:anArgument from:changedObject
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   211
    categoryArray := nil.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   212
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   213
    "Created: / 6.2.2000 / 20:08:52 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   214
    "Modified: / 6.2.2000 / 20:10:21 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   215
! !
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   216
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   217
!SystemOrganizer methodsFor:'private accessing'!
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
nameSpace:aNameSpace
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
    "set the nameSpace - nil is allowed and stands for: any"
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
    nameSpace := aNameSpace.
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
    Smalltalk addDependent:self.
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
     (SystemOrganizer for:nil) organization
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
     (SystemOrganizer for:Demos) organization
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
    "Modified: / 20.6.1998 / 12:35:34 / cg"
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
! !
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
!SystemOrganizer class methodsFor:'documentation'!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
version
925
95dda78c41a2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
   236
    ^ '$Header: /cvs/stx/stx/libbasic3/SystemOrganizer.st,v 1.7 2000-04-12 21:41:37 cg Exp $'
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
! !