SystemOrganizer.st
author Claus Gittinger <cg@exept.de>
Thu, 05 Mar 2020 11:17:28 +0100
changeset 4561 eace75531554
parent 4408 c80555d631e2
permissions -rw-r--r--
#UI_ENHANCEMENT by cg class: SourceCodeManagerUtilities changed: #compareClassWithRepository:askForRevision: typos: genitive of class is class's - not classes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4408
c80555d631e2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
     1
"{ Encoding: utf8 }"
c80555d631e2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
     2
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     3
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     4
 COPYRIGHT (c) 1998 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     5
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     6
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     7
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     8
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    10
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    11
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    12
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    13
"
969
3f3e9552e78b allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
    14
"{ Package: 'stx:libbasic3' }"
3f3e9552e78b allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
    15
4066
9087a9dc0946 #OTHER by mawalch
mawalch
parents: 3437
diff changeset
    16
"{ NameSpace: Smalltalk }"
9087a9dc0946 #OTHER by mawalch
mawalch
parents: 3437
diff changeset
    17
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
Object subclass:#SystemOrganizer
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    19
	instanceVariableNames:'categoryArray nameSpace'
994
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
    20
	classVariableNames:'AllCategories CachedOrganizerForSmalltalk'
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	category:'Kernel-Support'
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    25
!SystemOrganizer class methodsFor:'documentation'!
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    26
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    27
copyright
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    28
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    29
 COPYRIGHT (c) 1998 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    30
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    31
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    32
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    33
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    35
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    36
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    37
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    38
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    39
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    40
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    41
!
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
    42
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    43
documentation
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    44
"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    45
     In ST80, there is a systemOrganization, which groups classes
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    46
     to categories.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    47
     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
    48
     This class simulates the ST80 behavior.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    49
"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    50
! !
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
!SystemOrganizer class methodsFor:'instance creation'!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
1061
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
    54
for:aNameSpaceOrNil
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    55
    "create & return a new instance of myself, to organize aNameSpace.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    56
     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
    57
1061
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
    58
    (aNameSpaceOrNil isNil or:[aNameSpaceOrNil == Smalltalk]) ifTrue:[
994
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
    59
        CachedOrganizerForSmalltalk isNil ifTrue:[
1061
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
    60
            CachedOrganizerForSmalltalk := self new nameSpace:aNameSpaceOrNil.
994
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
    61
        ].
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
    62
        ^ CachedOrganizerForSmalltalk
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
    63
    ].
1061
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
    64
    ^ self new nameSpace:aNameSpaceOrNil.
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
1061
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
    66
    "Modified: / 21.8.2001 / 15:22:20 / cg"
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
! !
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
!SystemOrganizer methodsFor:'accessing'!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    71
addCategory:aCategory before:someOtherCategory
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    72
    (categoryArray isNil
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    73
    or:[(categoryArray includes:aCategory) not]) ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    74
        categoryArray := nil.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    75
        AllCategories add:aCategory.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    76
    ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    77
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    78
    "Created: / 6.2.2000 / 20:42:20 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    79
    "Modified: / 6.2.2000 / 20:44:34 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    80
!
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    81
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
categories
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
    "return a collection of my classes class-categories.
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
     If my nameSpace is nil, all classes' categories are included;
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
     otherwise, only the categories of that particular namespace."
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
    |addClassAction categorySet searchedNamespace allNames|
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    89
    categoryArray notNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    90
        ^ categoryArray
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    91
    ].
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    93
    addClassAction := [:aClass |
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    94
        |cat|
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    96
        aClass isMeta ifFalse:[
2251
a0e1f185ee33 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
    97
            aClass isNameSpace ifFalse:[
4408
c80555d631e2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
    98
                cat := aClass category ? '* no category *'.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
    99
                cat ~= 'obsolete' ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   100
                    categorySet add:cat
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
                ]
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
            ]
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
        ].
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   104
    ].
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
    AllCategories isNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   107
        categorySet := Set new.
969
3f3e9552e78b allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
   108
        Smalltalk allClassesDo:addClassAction.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   109
        AllCategories := categorySet.
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
    ].
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   111
        
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   112
    (searchedNamespace := nameSpace) isNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   113
        searchedNamespace := Smalltalk.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   114
    ].
1061
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
   115
    allNames := (searchedNamespace == Smalltalk).
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   116
    searchedNamespace == Smalltalk ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   117
        categorySet := AllCategories.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   118
    ] ifFalse:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   119
        categorySet := Set new.
969
3f3e9552e78b allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
   120
        searchedNamespace allClassesDo:addClassAction.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   121
    ].
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   122
    categoryArray := categorySet asArray sort.
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
    ^ categoryArray
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
     (SystemOrganizer for:nil) categories 
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
     (SystemOrganizer for:Smalltalk) categories 
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
     (SystemOrganizer for:Demos) categories 
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
4408
c80555d631e2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   131
    "Modified: / 21-08-2001 / 15:24:10 / cg"
c80555d631e2 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4066
diff changeset
   132
    "Modified: / 03-03-2019 / 22:31:26 / Claus Gittinger"
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   133
!
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   134
895
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   135
categoryOfElement:aClassName
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   136
    "return a classes category;
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   137
     the argument is the classes name"
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   138
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   139
    |cls|
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   140
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   141
    cls := Smalltalk at:aClassName ifAbsent:nil.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   142
    cls notNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   143
        ^ cls category
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   144
    ].
895
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   145
    self error:'no such class'.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   146
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   147
    "Modified: / 6.2.2000 / 20:12:10 / cg"
895
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   148
!
f8702324cc12 added #categoryOfElement - for RB
Claus Gittinger <cg@exept.de>
parents: 689
diff changeset
   149
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   150
classify:aClassName under:newCategory
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   151
    "change a classes category;
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   152
     the argument is the classes name"
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   153
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   154
    |cls cats|
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   155
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   156
    cls := Smalltalk at:aClassName ifAbsent:nil.
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   157
    cls notNil ifTrue:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   158
        (AllCategories includes:newCategory) ifFalse:[
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   159
            cats := AllCategories asOrderedCollection.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   160
            cats add:newCategory.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   161
            cats sort.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   162
            AllCategories := cats.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   163
        ].
2251
a0e1f185ee33 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   164
        (categoryArray notNil and:[categoryArray includes:newCategory])
a0e1f185ee33 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   165
        ifFalse:[
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   166
            categoryArray := nil.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   167
        ].
3437
7a231b62ca7d class: SystemOrganizer
Claus Gittinger <cg@exept.de>
parents: 2488
diff changeset
   168
        cls category:newCategory.
7a231b62ca7d class: SystemOrganizer
Claus Gittinger <cg@exept.de>
parents: 2488
diff changeset
   169
        ^ self
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   170
    ].
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   171
    self error:'no such class'.
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   172
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   173
    "Created: / 4.2.2000 / 18:30:11 / cg"
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   174
    "Modified: / 6.2.2000 / 20:36:30 / cg"
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   175
!
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 895
diff changeset
   176
2488
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
   177
environment
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
   178
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
   179
	^Smalltalk
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
   180
!
Claus Gittinger <cg@exept.de>
parents: 2251
diff changeset
   181
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   182
listAtCategoryNamed:aCategory
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   183
    "return a collection of classes in aCategory."
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   184
1670
99282e024c51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1061
diff changeset
   185
    |classSet searchedNamespace allNames|
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   186
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   187
    classSet := IdentitySet new.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   188
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   189
    (searchedNamespace := nameSpace) isNil ifTrue:[
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   190
        searchedNamespace := Smalltalk.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   191
    ].
1061
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
   192
    "/ hack to enable ported tools (RefactoryBrowser) to see all classes
b48afe9c91b1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 994
diff changeset
   193
    allNames := (searchedNamespace == Smalltalk).
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   194
969
3f3e9552e78b allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 925
diff changeset
   195
    searchedNamespace allClassesDo:[:aClass |
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   196
        |cat|
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   197
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   198
        aClass isMeta ifFalse:[
2251
a0e1f185ee33 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   199
            aClass isRealNameSpace ifFalse:[
689
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   200
                (allNames or:[aClass nameSpace == nameSpace]) ifTrue:[
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   201
                    cat := aClass category.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   202
                    cat = aCategory ifTrue:[
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   203
                        classSet add:aClass name
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
                ]
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   206
            ]
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   207
        ]
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   208
    ].
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   209
    ^ classSet asArray sort.
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   210
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   211
    "
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   212
     (SystemOrganizer for:nil) listAtCategoryNamed:'Collections-Abstract' 
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   213
     (SystemOrganizer for:Smalltalk) listAtCategoryNamed:'Collections-Abstract' 
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   214
     (SystemOrganizer for:Demos) listAtCategoryNamed:'Collections-Abstract' 
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   215
    "
1d4a311dd765 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 688
diff changeset
   216
1895
c3b43165a0cc changed #listAtCategoryNamed:
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   217
    "Modified: / 10-11-2006 / 17:12:56 / cg"
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
4066
9087a9dc0946 #OTHER by mawalch
mawalch
parents: 3437
diff changeset
   220
!SystemOrganizer methodsFor:'change & update'!
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   221
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   222
update:something with:anArgument from:changedObject
994
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
   223
    "/ flush cached categories ...
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   224
    categoryArray := nil.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   225
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   226
    "Created: / 6.2.2000 / 20:08:52 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   227
    "Modified: / 6.2.2000 / 20:10:21 / cg"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   228
! !
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   229
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   230
!SystemOrganizer methodsFor:'private accessing'!
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
nameSpace:aNameSpace
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
    "set the nameSpace - nil is allowed and stands for: any"
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
994
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
   235
    nameSpace := aNameSpace ? Smalltalk.
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
   236
    nameSpace addDependent:self.
fdfd49f4dc25 caching
Claus Gittinger <cg@exept.de>
parents: 969
diff changeset
   237
    nameSpace ~~ Smalltalk ifTrue:[Smalltalk addDependent:self].
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
     (SystemOrganizer for:nil) organization
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
     (SystemOrganizer for:Demos) organization
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
    "
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
    "Modified: / 20.6.1998 / 12:35:34 / cg"
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
! !
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
!SystemOrganizer class methodsFor:'documentation'!
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
version
4066
9087a9dc0946 #OTHER by mawalch
mawalch
parents: 3437
diff changeset
   250
    ^ '$Header$'
2251
a0e1f185ee33 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   251
!
a0e1f185ee33 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   252
a0e1f185ee33 code deobfuscated:
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   253
version_CVS
4066
9087a9dc0946 #OTHER by mawalch
mawalch
parents: 3437
diff changeset
   254
    ^ '$Header$'
688
5d925b1c32c1 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
! !
3437
7a231b62ca7d class: SystemOrganizer
Claus Gittinger <cg@exept.de>
parents: 2488
diff changeset
   256