Tools_NamespaceList.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 19 Jul 2017 09:42:32 +0200
branchjv
changeset 17619 edb119820fcb
parent 14038 068df12180ca
permissions -rw-r--r--
Issue #154: Set window style using `#beToolWindow` to indicate that the minirunner window is kind of support tool rather than some X11 specific code (which does not work on Windows of course) See https://swing.fit.cvut.cz/projects/stx-jv/ticket/154
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2000 by eXept Software AG
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
	      All Rights Reserved
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    12
"{ Package: 'stx:libtool' }"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ NameSpace: Tools }"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
BrowserList subclass:#NamespaceList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	instanceVariableNames:'namespaceNameList namespaceList'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'Interface-Browsers-New'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!NamespaceList class methodsFor:'documentation'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 2000 by eXept Software AG
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
	      All Rights Reserved
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
11874
29fac41ec346 added: #documentation
Claus Gittinger <cg@exept.de>
parents: 10950
diff changeset
    37
!
29fac41ec346 added: #documentation
Claus Gittinger <cg@exept.de>
parents: 10950
diff changeset
    38
29fac41ec346 added: #documentation
Claus Gittinger <cg@exept.de>
parents: 10950
diff changeset
    39
documentation
29fac41ec346 added: #documentation
Claus Gittinger <cg@exept.de>
parents: 10950
diff changeset
    40
"
29fac41ec346 added: #documentation
Claus Gittinger <cg@exept.de>
parents: 10950
diff changeset
    41
    I implement the namespace list in the new system browser
29fac41ec346 added: #documentation
Claus Gittinger <cg@exept.de>
parents: 10950
diff changeset
    42
"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
!NamespaceList class methodsFor:'interface specs'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
singleNameSpaceWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    "This resource specification was automatically generated
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
     by the UIPainter of ST/X."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    "Do not manually edit this!! If it is corrupted,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
     the UIPainter may not be able to read the specification."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
     UIPainter new openOnClass:ClassCategoryList andSelector:#singleCategoryWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
     ClassCategoryList new openInterface:#singleCategoryWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
    <resource: #canvas>
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    ^ 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
     #(#FullSpec
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    63
	#name: #singleNameSpaceWindowSpec
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    64
	#window: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
       #(#WindowSpec
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    66
	  #label: 'NameSpaceList'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    67
	  #name: 'NameSpaceList'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    68
	  #min: #(#Point 0 0)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    69
	  #max: #(#Point 1024 721)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    70
	  #bounds: #(#Rectangle 218 175 518 475)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    71
	)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    72
	#component: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
       #(#SpecCollection
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    74
	  #collection: #(
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    75
	   #(#LabelSpec
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    76
	      #label: 'NameSpaceName'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    77
	      #name: 'NameSpaceLabel'
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    78
	      #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0)
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    79
	      #translateLabel: true
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    80
	      #labelChannel: #nameSpaceLabelHolder
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    81
	      #menu: #menuHolder
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    82
	    )
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    83
	   )
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
5592
d9730a8d7c52 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5591
diff changeset
    85
	)
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
      )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    "This resource specification was automatically generated
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
     by the UIPainter of ST/X."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    "Do not manually edit this!! If it is corrupted,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
     the UIPainter may not be able to read the specification."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
     UIPainter new openOnClass:ProjectList andSelector:#windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
     ProjectList new openInterface:#windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
     ProjectList open
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    <resource: #canvas>
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    ^ 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
     #(#FullSpec
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   106
        #name: #windowSpec
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   107
        #window: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
       #(#WindowSpec
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   109
          #label: 'NamespaceList'
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   110
          #name: 'NamespaceList'
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   111
          #min: #(#Point 0 0)
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   112
          #bounds: #(#Rectangle 13 23 313 323)
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   113
        )
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   114
        #component: 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
       #(#SpecCollection
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   116
          #collection: #(
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   117
           #(#SequenceViewSpec
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   118
              #name: 'List'
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   119
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   120
              #tabable: true
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   121
              #model: #selectedNamespaces
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   122
              #menu: #menuHolder
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   123
              #hasHorizontalScrollBar: true
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   124
              #hasVerticalScrollBar: true
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   125
              #miniScrollerHorizontal: true
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   126
              #isMultiSelect: true
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   127
              #valueChangeSelector: #selectionChangedByClick
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   128
              #useIndex: false
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   129
              #sequenceList: #nameSpaceList
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   130
              #doubleClickChannel: #doubleClickChannel
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   131
              #properties: 
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   132
             #(#PropertyListDictionary
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   133
                #dragArgument: nil
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   134
                #dropArgument: nil
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   135
                #canDropSelector: #canDropContext:
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   136
                #dropSelector: #doDropContext:
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   137
              )
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   138
            )
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   139
           )
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   141
        )
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
      )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
    "Created: / 18.2.2000 / 01:06:05 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
    "Modified: / 18.2.2000 / 01:24:50 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
!NamespaceList class methodsFor:'queries-plugin'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
aspectSelectors
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
    ^ #( 
14038
068df12180ca Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13498
diff changeset
   152
        environmentHolder
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   153
        #(#doubleClickChannel #action )
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   154
        immediateUpdate 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   155
        selectedNamespaces 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   156
        menuHolder 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   157
        inGeneratorHolder 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   158
        outGeneratorHolder 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   159
        selectionChangeCondition 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   160
        updateTrigger
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   161
        forceGeneratorTrigger
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   162
        hideUnloadedClasses
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   163
        showAllClassesInNameSpaceOrganisation
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   164
        organizerMode
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   165
        slaveMode
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
       )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   168
    "Created: / 18-02-2000 / 01:06:27 / cg"
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   169
    "Modified: / 05-03-2007 / 16:47:45 / cg"
14038
068df12180ca Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13498
diff changeset
   170
    "Modified: / 24-02-2014 / 10:37:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
!NamespaceList methodsFor:'aspects'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   174
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   175
itemList
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   176
    ^ self nameSpaceList value
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   177
!
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   178
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
nameSpaceLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
    ^ self pseudoListLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
nameSpaceList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
    namespaceList isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
	namespaceList := ValueHolder new
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    ^ namespaceList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
    "Created: / 18.2.2000 / 00:59:01 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
selectedNamespaces
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
    ^ self selectionHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
selectedNamespaces:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
    ^ self selectionHolder:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
!NamespaceList methodsFor:'change & update'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
delayedUpdate:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
    self inSlaveModeOrInvisible 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
    ifTrue:[
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   208
	changedObject == environment ifTrue:[
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
	    something == #classComment ifTrue:[^ self].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
	self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
	^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
    changedObject == slaveMode ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
	listValid ~~ true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
	    self enqueueDelayedUpdateList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
	"/ self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
	^  self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   223
    changedObject == environment ifTrue:[
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
	something == #newClass ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
	    listValid == true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
		aParameter isNameSpace ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
		    (namespaceList value includes:aParameter name) ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
			self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
		    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
		].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
	    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
	    ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
	something == #classRemove ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
	    listValid == true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
		aParameter isNameSpace ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
		    self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
		].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
	    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
	    ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
	^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
    super delayedUpdate:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
    "Created: / 18.2.2000 / 01:00:07 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
    "Modified: / 26.2.2000 / 01:10:46 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
selectionChangedByClick
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    "we are not interested in that - get another notification
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
     via the changed valueHolder"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
    "Created: / 18.2.2000 / 01:00:14 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
update:something with:aParameter from:changedObject
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   259
    changedObject == environment ifTrue:[
10369
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   260
        something == #methodDictionary ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   261
            ^ self 
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   262
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   263
        something == #methodTrap ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   264
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   265
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   266
        something == #methodCoverageInfo ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   267
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   268
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   269
        something == #methodInClass ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   270
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   271
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   272
        something == #classVariables ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   273
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   274
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   275
        something == #classComment ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   276
            ^ self.
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   277
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   278
        something == #methodInClassRemoved ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   279
            ^ self.
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   280
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
    super update:something with:aParameter from:changedObject
10369
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   283
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   284
    "Modified: / 20-07-2011 / 18:55:12 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   287
!NamespaceList methodsFor:'drag & drop'!
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   288
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   289
canDropContext:aDropContext
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   290
    |objects nameSpace|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   291
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   292
    objects := aDropContext dropObjects collect:[:obj | obj theObject].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   293
    (objects conform:[:aMethodOrClass | aMethodOrClass isClass ]) ifFalse:[^ false].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   294
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   295
    nameSpace := self nameSpaceAtTargetPointOf:aDropContext.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   296
    nameSpace isNil ifTrue:[^ false].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   297
    nameSpace = self class nameListEntryForALL ifTrue:[^ false].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   298
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   299
    ^ (objects contains:[:aClass | aClass nameSpace name ~= nameSpace]) 
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   300
!
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   301
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   302
doDropContext:aDropContext
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   303
    |nameSpaceName nameSpace objects|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   304
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   305
    objects := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   306
    (objects conform:[:something | something isClass]) ifTrue:[
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   307
        nameSpaceName := self nameSpaceAtTargetPointOf:aDropContext.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   308
        (nameSpaceName notNil
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   309
        and:[ nameSpaceName ~= self class nameListEntryForALL]) ifTrue:[
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   310
            nameSpace := NameSpace name:nameSpaceName.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   311
            objects do:[:eachClassToMove |
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   312
                |className|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   313
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   314
                className := eachClassToMove nameWithoutPrefix.
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   315
                nameSpace == environment ifTrue:[
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   316
                    environment renameClass:eachClassToMove to:className asSymbol.
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   317
                ] ifFalse:[
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   318
                    environment renameClass:eachClassToMove to:(nameSpace name , '::' , className) asSymbol.
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   319
                    nameSpace changed.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   320
                ].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   321
            ].
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   322
            environment changed.
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   323
        ].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   324
        ^ self
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   325
    ].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   326
!
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   327
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   328
nameSpaceAtTargetPointOf:aDropContext
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   329
    |p targetView lineNr item|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   330
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   331
    p := aDropContext targetPoint.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   332
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   333
    targetView := aDropContext targetWidget.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   334
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   335
    lineNr := targetView yVisibleToLineNr:p y.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   336
    lineNr isNil ifTrue:[^ nil].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   337
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   338
    item := self itemList at:lineNr.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   339
    item isNil ifTrue:[^ nil].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   340
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   341
    ^ item
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   342
! !
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   343
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
!NamespaceList methodsFor:'generators'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
makeGenerator
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   347
    "return a generator which enumerates the classes from the selected namespace(s)."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   349
    |spaceNames hideUnloadedClasses showAllClasses showChangedClasses|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
    spaceNames := self selectedNamespaces value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
    spaceNames size == 0 ifTrue:[
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   353
        ^ #()
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
    hideUnloadedClasses := self hideUnloadedClasses value.
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   357
    showAllClasses := self showAllClassesInNameSpaceOrganisation value.
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   358
    showChangedClasses := spaceNames includes:(self class nameListEntryForChanged).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   360
    (showAllClasses or:[spaceNames includes:(self class nameListEntryForALL)]) ifTrue:[
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   361
        hideUnloadedClasses ifTrue:[
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   362
            ^ Iterator on:[:whatToDo |
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   363
                               environment allClassesDo:[:cls |
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   364
                                   cls isLoaded ifTrue:[
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   365
                                       cls isRealNameSpace ifFalse:[
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   366
                                           whatToDo value:cls
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   367
                                       ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   368
                                   ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   369
                               ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   370
                          ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   371
        ].
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   372
        ^ Iterator on:[:whatToDo |
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   373
                           environment allClassesDo:whatToDo
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   374
                      ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
    (spaceNames size == 1 
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   378
     and:[spaceNames first = 'environment']) ifTrue:[
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   379
        "/ somewhat tuned - quick look if classes name includes colons ...
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   380
        ^ Iterator on:[:whatToDo |
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   381
                       environment allClassesDo:[:cls |
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   382
                           |includeIt|
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   383
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   384
                           includeIt := (cls name includes:$:) not.
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   385
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   386
                                        or:[(cls isPrivate not 
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   387
                                            and:[(cls nameSpace == environment)])].
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   388
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   389
                                        or:[(cls isPrivate  
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   390
                                            and:[(cls topOwningClass nameSpace == environment)])].
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   391
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   392
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   393
                                        and:[hideUnloadedClasses not or:[cls isLoaded]].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   395
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   396
                                        or:[ cls extensions 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   397
                                                contains:[:mthd | 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   398
                                                            |sel parts|
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   399
                                                            sel := mthd selector.
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   400
                                                            (sel isNameSpaceSelector
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   401
                                                            and:[ parts := sel nameSpaceSelectorParts.
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   402
                                                                  spaceNames includes:parts first])  
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   403
                                                         ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   404
                                           ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   406
                           includeIt ifTrue:[
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   407
                               cls isRealNameSpace ifFalse:[
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   408
                                   whatToDo value:cls
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   409
                               ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   410
                           ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   411
                       ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   412
                      ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
    ^ Iterator on:[:whatToDo |
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   416
                       |changedClasses|
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   417
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   418
                        showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses collect:[:cls | cls theNonMetaclass]].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   420
                        environment allClassesDo:[:cls |
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   421
                            |spaceOfClass spaceNameOfClass includeIt|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   423
                            spaceOfClass := cls isPrivate ifTrue:[cls topOwningClass nameSpace] ifFalse:[cls nameSpace].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   424
                            spaceNameOfClass := spaceOfClass name.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   426
                            includeIt := spaceNames contains:[:nm | nm = spaceNameOfClass
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   427
                                                                    or:[spaceNameOfClass startsWith:(nm , '::')]].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   428
                            includeIt ifFalse:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   429
                                (showChangedClasses and:[ (changedClasses includes:cls theNonMetaclass) ]) ifTrue:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   430
                                    includeIt := true
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   431
                                ].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   432
                            ].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   433
                            hideUnloadedClasses ifTrue:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   434
                                includeIt := includeIt and:[cls isLoaded].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   435
                            ].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   436
                            includeIt ifTrue:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   437
                                cls isRealNameSpace ifFalse:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   438
                                    whatToDo value:cls
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   439
                                ]
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   440
                            ]
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   441
                        ]
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   442
                  ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   444
    "Created: / 18-02-2000 / 01:01:58 / cg"
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   445
    "Modified: / 05-03-2007 / 23:01:21 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
!NamespaceList methodsFor:'private'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
defaultSlaveModeValue
6710
c08bfb25ebd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6679
diff changeset
   451
    |mode|
c08bfb25ebd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6679
diff changeset
   452
c08bfb25ebd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6679
diff changeset
   453
    mode := self topApplication perform:#initialOrganizerMode ifNotUnderstood:nil.
6735
72cb810a8786 magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents: 6710
diff changeset
   454
    mode == OrganizerCanvas organizerModeNamespace ifTrue:[^ false].
72cb810a8786 magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents: 6710
diff changeset
   455
"/    self organizerMode value == OrganizerCanvas organizerModeCategory ifTrue:[^ true].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
"/    ^ false
6745
8f0c86593679 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6735
diff changeset
   457
    mode isNil ifTrue:[^ false].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
    ^ true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
initialOrganizerMode
6735
72cb810a8786 magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents: 6710
diff changeset
   462
    ^ OrganizerCanvas organizerModeNamespace
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
listOfNamespaces
10950
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   466
    |allNamespaces showAllNamespaces generator|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   468
    showAllNamespaces := false.    "/ only topLevel namespaces are shown
10138
5b9f6b826048 changed: #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 9460
diff changeset
   469
    showAllNamespaces := true.
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   470
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
    allNamespaces := IdentitySet new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
    inGeneratorHolder isNil ifTrue:[
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   474
        (self hideUnloadedClasses value) ifTrue:[
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   475
            environment allClassesDo:[:eachClass |
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   476
                eachClass isLoaded ifTrue:[
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   477
                    allNamespaces add:(eachClass theNonMetaclass topNameSpace)
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   478
                ].
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   479
            ]
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   480
        ] ifFalse:[
6794
c55a036a249e Do not use obsolete selector
Stefan Vogel <sv@exept.de>
parents: 6765
diff changeset
   481
            allNamespaces := NameSpace allNameSpaces.
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   482
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   484
        showAllNamespaces ifFalse:[
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   485
            "/ only topLevel namespaces are shown
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   486
            "/ i.e. ignore subspaces 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   488
            allNamespaces := allNamespaces select:[:ns | ns isTopLevelNameSpace].
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   489
        ].
10950
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   490
        "/JV@2011-12-04: Do not show java packages, they are all shown
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   491
        "/when JAVA namespace is shown. Use #askFor: here, as eXept's libbasic
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   492
        "/does not have #isJavaPackage
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   493
        allNamespaces := allNamespaces reject:[:ns | ns askFor: #isJavaPackage ].
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   494
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   495
        allNamespaces := allNamespaces collect:[:ns | ns name].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
    ] ifFalse:[
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   497
        generator := inGeneratorHolder value.
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   498
        generator isNil ifTrue:[^ #() ].
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   499
        generator do:[:ns | allNamespaces add:ns].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
    allNamespaces := allNamespaces asOrderedCollection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
    allNamespaces sort.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
    allNamespaces size == 1 ifTrue:[
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   505
        self nameSpaceLabelHolder value:(LabelAndIcon icon:(self class nameSpaceIcon) string:allNamespaces first).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
    ].
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   507
8764
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   508
"/ for now: disabled, because it gets replicated into the nameSpace filter, which
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   509
"/ does not (yet) handle it correctly
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   510
"/    numClassesInChangeSet := ChangeSet current changedClasses size.
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   511
"/    numClassesInChangeSet > 0 ifTrue:[
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   512
"/        "/ dont include count - makeGenerator compares against the un-expanded nameListEntry (sigh - need two lists)
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   513
"/        allNamespaces addFirst:((self class nameListEntryForChanged "bindWith:numClassesInChangeSet") allItalic).
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   514
"/    ].
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   515
9030
9f4eec2a3c83 no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8764
diff changeset
   516
    allNamespaces addFirst:(self class nameListEntryForALL allItalic).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
    ^ allNamespaces
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
10138
5b9f6b826048 changed: #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 9460
diff changeset
   519
    "Created: / 18-02-2000 / 01:04:27 / cg"
5b9f6b826048 changed: #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 9460
diff changeset
   520
    "Modified: / 25-02-2000 / 22:11:29 / cg"
10950
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   521
    "Modified: / 04-12-2011 / 12:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
makeDependent
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   525
    environment addDependent:self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
    "Created: / 18.2.2000 / 01:04:36 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
makeIndependent
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   531
    environment removeDependent:self.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    "Created: / 18.2.2000 / 01:04:42 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
updateList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
    |newList oldSelection newSelection selectedNamespacesHolder|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
    selectedNamespacesHolder := self selectedNamespaces.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
    oldSelection := selectedNamespacesHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
    newList := self listOfNamespaces.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    newList ~= namespaceList value ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
"/        oldSelection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
"/            selectedNamespacesHolder removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
"/            selectedNamespacesHolder value:#().
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
"/            selectedNamespacesHolder addDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
	self nameSpaceList value:newList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
	oldSelection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
	    newSelection := oldSelection select:[:nm | 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
				(nm = self class nameListEntryForALL) 
13498
b8d845e42988 Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   553
				or:[ (environment at:nm asSymbol) isNameSpace]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
			    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
	    newSelection ~= oldSelection ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
		selectedNamespacesHolder value:newSelection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
	    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
	]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
    listValid := true.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
!NamespaceList class methodsFor:'documentation'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
9030
9f4eec2a3c83 no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8764
diff changeset
   565
version_CVS
14038
068df12180ca Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13498
diff changeset
   566
    ^ '$Header: /cvs/stx/stx/libtool/Tools_NamespaceList.st,v 1.22 2014-02-25 10:42:49 vrany Exp $'
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
! !
14038
068df12180ca Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13498
diff changeset
   568