Tools_NamespaceList.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 03 Sep 2013 16:14:28 +0100
branchdefault-browser-environment
changeset 13473 d8e9ed472e9f
parent 11874 29fac41ec346
permissions -rw-r--r--
Introduced environment instvar in Tools::NavigatorModel. All references to Smalltalk were rewritten to access `environment` instvar instead. The `environment` defaults to Smalltalk (set in #initialize).
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
    ^ #( 
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   152
        #(#doubleClickChannel #action )
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   153
        immediateUpdate 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   154
        selectedNamespaces 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   155
        menuHolder 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   156
        inGeneratorHolder 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   157
        outGeneratorHolder 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   158
        selectionChangeCondition 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   159
        updateTrigger
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   160
        forceGeneratorTrigger
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   161
        hideUnloadedClasses
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   162
        showAllClassesInNameSpaceOrganisation
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   163
        organizerMode
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   164
        slaveMode
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
       )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   167
    "Created: / 18-02-2000 / 01:06:27 / cg"
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   168
    "Modified: / 05-03-2007 / 16:47:45 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
!NamespaceList methodsFor:'aspects'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   173
itemList
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   174
    ^ self nameSpaceList value
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   175
!
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   176
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
nameSpaceLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
    ^ self pseudoListLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   180
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
nameSpaceList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
    namespaceList isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
	namespaceList := ValueHolder new
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
    ^ namespaceList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    "Created: / 18.2.2000 / 00:59:01 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
selectedNamespaces
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
    ^ self selectionHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
selectedNamespaces:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
    ^ self selectionHolder:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
!NamespaceList methodsFor:'change & update'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
delayedUpdate:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
    self inSlaveModeOrInvisible 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
    ifTrue:[
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   206
	changedObject == environment ifTrue:[
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
	    something == #classComment ifTrue:[^ self].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
	self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
	^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
    changedObject == slaveMode ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
	listValid ~~ true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
	    self enqueueDelayedUpdateList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
	"/ self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
	^  self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   221
    changedObject == environment ifTrue:[
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
	something == #newClass ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
	    listValid == true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
		aParameter isNameSpace ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
		    (namespaceList value includes:aParameter name) ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
			self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
		    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
		].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
	    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
	    ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
	something == #classRemove ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
	    listValid == true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
		aParameter isNameSpace ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
		    self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
		].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
	    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
	    ^ self
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
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
    super delayedUpdate:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
    "Created: / 18.2.2000 / 01:00:07 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   246
    "Modified: / 26.2.2000 / 01:10:46 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
selectionChangedByClick
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
    "we are not interested in that - get another notification
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
     via the changed valueHolder"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
    "Created: / 18.2.2000 / 01:00:14 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
update:something with:aParameter from:changedObject
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   257
    changedObject == environment ifTrue:[
10369
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   258
        something == #methodDictionary ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   259
            ^ self 
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   260
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   261
        something == #methodTrap ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   262
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   263
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   264
        something == #methodCoverageInfo ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   265
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   266
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   267
        something == #methodInClass ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   268
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   269
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   270
        something == #classVariables ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   271
            ^ self
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   272
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   273
        something == #classComment ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   274
            ^ self.
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   275
        ].
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   276
        something == #methodInClassRemoved ifTrue:[
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   277
            ^ self.
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   278
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
    super update:something with:aParameter from:changedObject
10369
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   281
9c4736680f49 changed:
Claus Gittinger <cg@exept.de>
parents: 10138
diff changeset
   282
    "Modified: / 20-07-2011 / 18:55:12 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   285
!NamespaceList methodsFor:'drag & drop'!
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   286
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   287
canDropContext:aDropContext
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   288
    |objects nameSpace|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   289
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   290
    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
   291
    (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
   292
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   293
    nameSpace := self nameSpaceAtTargetPointOf:aDropContext.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   294
    nameSpace isNil ifTrue:[^ false].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   295
    nameSpace = self class nameListEntryForALL ifTrue:[^ false].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   296
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   297
    ^ (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
   298
!
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   299
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   300
doDropContext:aDropContext
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   301
    |nameSpaceName nameSpace objects|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   302
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   303
    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
   304
    (objects conform:[:something | something isClass]) ifTrue:[
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   305
        nameSpaceName := self nameSpaceAtTargetPointOf:aDropContext.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   306
        (nameSpaceName notNil
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   307
        and:[ nameSpaceName ~= self class nameListEntryForALL]) ifTrue:[
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   308
            nameSpace := NameSpace name:nameSpaceName.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   309
            objects do:[:eachClassToMove |
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   310
                |className|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   311
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   312
                className := eachClassToMove nameWithoutPrefix.
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   313
                nameSpace == environment ifTrue:[
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   314
                    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
   315
                ] ifFalse:[
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   316
                    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
   317
                    nameSpace changed.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   318
                ].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   319
            ].
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   320
            environment changed.
8631
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   321
        ].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   322
        ^ self
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
!
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
nameSpaceAtTargetPointOf:aDropContext
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   327
    |p targetView lineNr item|
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   328
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   329
    p := aDropContext targetPoint.
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
    targetView := aDropContext targetWidget.
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
    lineNr := targetView yVisibleToLineNr:p y.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   334
    lineNr isNil ifTrue:[^ nil].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   335
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   336
    item := self itemList at:lineNr.
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   337
    item isNil ifTrue:[^ nil].
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   338
0178be4a8c65 can now drag a class insto another nameSpace
Claus Gittinger <cg@exept.de>
parents: 7706
diff changeset
   339
    ^ item
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
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   342
!NamespaceList methodsFor:'generators'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   343
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   344
makeGenerator
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
    "return a generator which enumerates the classes from the selected namespace(s)."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   347
    |spaceNames hideUnloadedClasses showAllClasses showChangedClasses|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
    spaceNames := self selectedNamespaces value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
    spaceNames size == 0 ifTrue:[
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   351
        ^ #()
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
    hideUnloadedClasses := self hideUnloadedClasses value.
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   355
    showAllClasses := self showAllClassesInNameSpaceOrganisation value.
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   356
    showChangedClasses := spaceNames includes:(self class nameListEntryForChanged).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   358
    (showAllClasses or:[spaceNames includes:(self class nameListEntryForALL)]) ifTrue:[
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   359
        hideUnloadedClasses ifTrue:[
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   360
            ^ Iterator on:[:whatToDo |
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   361
                               environment allClassesDo:[:cls |
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   362
                                   cls isLoaded ifTrue:[
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   363
                                       cls isRealNameSpace ifFalse:[
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   364
                                           whatToDo value:cls
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   365
                                       ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   366
                                   ]
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
        ^ Iterator on:[:whatToDo |
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   371
                           environment allClassesDo:whatToDo
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   372
                      ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
    (spaceNames size == 1 
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   376
     and:[spaceNames first = 'environment']) ifTrue:[
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   377
        "/ somewhat tuned - quick look if classes name includes colons ...
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   378
        ^ Iterator on:[:whatToDo |
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   379
                       environment allClassesDo:[:cls |
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   380
                           |includeIt|
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   381
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   382
                           includeIt := (cls name includes:$:) not.
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   383
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   384
                                        or:[(cls isPrivate not 
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   385
                                            and:[(cls nameSpace == environment)])].
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   386
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   387
                                        or:[(cls isPrivate  
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   388
                                            and:[(cls topOwningClass nameSpace == environment)])].
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   389
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   390
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   391
                                        and:[hideUnloadedClasses not or:[cls isLoaded]].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   393
                           includeIt := includeIt
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   394
                                        or:[ cls extensions 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   395
                                                contains:[:mthd | 
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   396
                                                            |sel parts|
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   397
                                                            sel := mthd selector.
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   398
                                                            (sel isNameSpaceSelector
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   399
                                                            and:[ parts := sel nameSpaceSelectorParts.
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   400
                                                                  spaceNames includes:parts first])  
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   401
                                                         ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   402
                                           ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   404
                           includeIt ifTrue:[
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   405
                               cls isRealNameSpace ifFalse:[
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   406
                                   whatToDo value:cls
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   407
                               ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   408
                           ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   409
                       ]
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   410
                      ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   411
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   412
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   413
    ^ Iterator on:[:whatToDo |
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   414
                       |changedClasses|
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   415
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   416
                        showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses collect:[:cls | cls theNonMetaclass]].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   418
                        environment allClassesDo:[:cls |
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   419
                            |spaceOfClass spaceNameOfClass includeIt|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   421
                            spaceOfClass := cls isPrivate ifTrue:[cls topOwningClass nameSpace] ifFalse:[cls nameSpace].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   422
                            spaceNameOfClass := spaceOfClass name.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   424
                            includeIt := spaceNames contains:[:nm | nm = spaceNameOfClass
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   425
                                                                    or:[spaceNameOfClass startsWith:(nm , '::')]].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   426
                            includeIt ifFalse:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   427
                                (showChangedClasses and:[ (changedClasses includes:cls theNonMetaclass) ]) ifTrue:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   428
                                    includeIt := true
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   429
                                ].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   430
                            ].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   431
                            hideUnloadedClasses ifTrue:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   432
                                includeIt := includeIt and:[cls isLoaded].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   433
                            ].
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   434
                            includeIt ifTrue:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   435
                                cls isRealNameSpace ifFalse:[
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   436
                                    whatToDo value:cls
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   437
                                ]
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   438
                            ]
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   439
                        ]
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   440
                  ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
7706
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   442
    "Created: / 18-02-2000 / 01:01:58 / cg"
92e3017d36b3 showAllInNSView
Claus Gittinger <cg@exept.de>
parents: 6794
diff changeset
   443
    "Modified: / 05-03-2007 / 23:01:21 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
!NamespaceList methodsFor:'private'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
defaultSlaveModeValue
6710
c08bfb25ebd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6679
diff changeset
   449
    |mode|
c08bfb25ebd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6679
diff changeset
   450
c08bfb25ebd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6679
diff changeset
   451
    mode := self topApplication perform:#initialOrganizerMode ifNotUnderstood:nil.
6735
72cb810a8786 magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents: 6710
diff changeset
   452
    mode == OrganizerCanvas organizerModeNamespace ifTrue:[^ false].
72cb810a8786 magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents: 6710
diff changeset
   453
"/    self organizerMode value == OrganizerCanvas organizerModeCategory ifTrue:[^ true].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
"/    ^ false
6745
8f0c86593679 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6735
diff changeset
   455
    mode isNil ifTrue:[^ false].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
    ^ true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
initialOrganizerMode
6735
72cb810a8786 magic constants (organizerMode) removed
Claus Gittinger <cg@exept.de>
parents: 6710
diff changeset
   460
    ^ OrganizerCanvas organizerModeNamespace
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
listOfNamespaces
10950
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   464
    |allNamespaces showAllNamespaces generator|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   466
    showAllNamespaces := false.    "/ only topLevel namespaces are shown
10138
5b9f6b826048 changed: #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 9460
diff changeset
   467
    showAllNamespaces := true.
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   468
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
    allNamespaces := IdentitySet new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
    inGeneratorHolder isNil ifTrue:[
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   472
        (self hideUnloadedClasses value) ifTrue:[
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   473
            environment allClassesDo:[:eachClass |
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   474
                eachClass isLoaded ifTrue:[
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   475
                    allNamespaces add:(eachClass theNonMetaclass topNameSpace)
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   476
                ].
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   477
            ]
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   478
        ] ifFalse:[
6794
c55a036a249e Do not use obsolete selector
Stefan Vogel <sv@exept.de>
parents: 6765
diff changeset
   479
            allNamespaces := NameSpace allNameSpaces.
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   480
        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   482
        showAllNamespaces ifFalse:[
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   483
            "/ only topLevel namespaces are shown
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   484
            "/ i.e. ignore subspaces 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   486
            allNamespaces := allNamespaces select:[:ns | ns isTopLevelNameSpace].
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   487
        ].
10950
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   488
        "/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
   489
        "/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
   490
        "/does not have #isJavaPackage
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   491
        allNamespaces := allNamespaces reject:[:ns | ns askFor: #isJavaPackage ].
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   492
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   493
        allNamespaces := allNamespaces collect:[:ns | ns name].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
    ] ifFalse:[
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   495
        generator := inGeneratorHolder value.
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   496
        generator isNil ifTrue:[^ #() ].
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   497
        generator do:[:ns | allNamespaces add:ns].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
    allNamespaces := allNamespaces asOrderedCollection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
    allNamespaces sort.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
    allNamespaces size == 1 ifTrue:[
6675
ac1c07785aa2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5592
diff changeset
   503
        self nameSpaceLabelHolder value:(LabelAndIcon icon:(self class nameSpaceIcon) string:allNamespaces first).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
    ].
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   505
8764
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   506
"/ for now: disabled, because it gets replicated into the nameSpace filter, which
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   507
"/ does not (yet) handle it correctly
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   508
"/    numClassesInChangeSet := ChangeSet current changedClasses size.
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   509
"/    numClassesInChangeSet > 0 ifTrue:[
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   510
"/        "/ 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
   511
"/        allNamespaces addFirst:((self class nameListEntryForChanged "bindWith:numClassesInChangeSet") allItalic).
e79f1730c32e changed #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 8757
diff changeset
   512
"/    ].
8757
43e349ffe3ef *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8696
diff changeset
   513
9030
9f4eec2a3c83 no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8764
diff changeset
   514
    allNamespaces addFirst:(self class nameListEntryForALL allItalic).
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
    ^ allNamespaces
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
10138
5b9f6b826048 changed: #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 9460
diff changeset
   517
    "Created: / 18-02-2000 / 01:04:27 / cg"
5b9f6b826048 changed: #listOfNamespaces
Claus Gittinger <cg@exept.de>
parents: 9460
diff changeset
   518
    "Modified: / 25-02-2000 / 22:11:29 / cg"
10950
de89034c7c28 changed: #listOfNamespaces - don't show java packages
vrany
parents: 10369
diff changeset
   519
    "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
   520
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
makeDependent
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   523
    environment addDependent:self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
    "Created: / 18.2.2000 / 01:04:36 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
makeIndependent
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   529
    environment removeDependent:self.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
    "Created: / 18.2.2000 / 01:04:42 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
updateList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
    |newList oldSelection newSelection selectedNamespacesHolder|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
    selectedNamespacesHolder := self selectedNamespaces.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
    oldSelection := selectedNamespacesHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
    newList := self listOfNamespaces.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
    newList ~= namespaceList value ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
"/        oldSelection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
"/            selectedNamespacesHolder removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
"/            selectedNamespacesHolder value:#().
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
"/            selectedNamespacesHolder addDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
	self nameSpaceList value:newList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
	oldSelection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
	    newSelection := oldSelection select:[:nm | 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
				(nm = self class nameListEntryForALL) 
13473
d8e9ed472e9f Introduced environment instvar in Tools::NavigatorModel.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11874
diff changeset
   551
				or:[ (environment at:nm asSymbol) isNameSpace]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
			    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
	    newSelection ~= oldSelection ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
		selectedNamespacesHolder value:newSelection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
	    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
	]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
    listValid := true.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
!NamespaceList class methodsFor:'documentation'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
9030
9f4eec2a3c83 no need for #asText to emphasize a string
Claus Gittinger <cg@exept.de>
parents: 8764
diff changeset
   563
version_CVS
11874
29fac41ec346 added: #documentation
Claus Gittinger <cg@exept.de>
parents: 10950
diff changeset
   564
    ^ '$Header: /cvs/stx/stx/libtool/Tools_NamespaceList.st,v 1.20 2012-10-20 19:36:38 cg Exp $'
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
! !