Tools_MethodList.st
author Claus Gittinger <cg@exept.de>
Mon, 07 Aug 2006 12:16:56 +0200
changeset 6846 b7d2d17e4ae5
parent 6841 6d72f92ed6cd
child 6903 1fb966ff068c
permissions -rw-r--r--
testresult indicators
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
"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"{ Package: 'stx:libtool' }"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
"{ NameSpace: Tools }"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
BrowserList subclass:#MethodList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	instanceVariableNames:'classes selectedMethodNameIndices methodList lastSelectedMethods
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
		browserNameList variableFilter filterClassVars updateProcess
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
		lastShowClass lastShowCategory lastShowClassFirst
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
		showMethodInheritance lastMethodClass lastMethodClassesSubclasses
6259
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
    22
		classAndSelectorsRedefinedBySubclassesOfClass showClass
6268
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
    23
		showMethodComplexity showMethodTypeIcon'
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
    24
	classVariableNames:'ShowComplexityValue'
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
	poolDictionaries:''
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
	category:'Interface-Browsers-New'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
!MethodList class methodsFor:'documentation'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
copyright
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 COPYRIGHT (c) 2000 by eXept Software AG
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	      All Rights Reserved
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 This software is furnished under a license and may be used
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
 only in accordance with the terms of that license and with the
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
 inclusion of the above copyright notice.   This software may not
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
 be provided or otherwise made available to, or used by, any
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
 other person.  No title to or ownership of the software is
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
 hereby transferred.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
"
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
!MethodList 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
singleMethodWindowSpec
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:MethodList andSelector:#singleMethodWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
     MethodList new openInterface:#singleMethodWindowSpec
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
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
        #name: #singleMethodWindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
        #window: 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
       #(#WindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
          #label: 'SingleSelectorList'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
          #name: 'SingleSelectorList'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
          #min: #(#Point 0 0)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
          #max: #(#Point 1024 721)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
          #bounds: #(#Rectangle 12 22 312 322)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
        )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
        #component: 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
       #(#SpecCollection
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
          #collection: #(
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
           #(#LabelSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
              #label: 'MethodName'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
              #name: 'MethodLabel'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
              #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 25 0)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
              #translateLabel: true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
              #labelChannel: #methodLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
              #menu: #menuHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
           )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
           )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
         
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
        )
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
    "Modified: / 1.3.2000 / 20:50:15 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "This resource specification was automatically generated
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
     by the UIPainter of ST/X."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
    "Do not manually edit this!! If it is corrupted,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
     the UIPainter may not be able to read the specification."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
     UIPainter new openOnClass:MethodList andSelector:#windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
     MethodList new openInterface:#windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
     MethodList open
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    <resource: #canvas>
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    ^ 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
     #(#FullSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
        #name: #windowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
        #window: 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
       #(#WindowSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
          #label: 'SelectorList'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
          #name: 'SelectorList'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
          #min: #(#Point 0 0)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
          #max: #(#Point 1024 721)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
          #bounds: #(#Rectangle 12 22 312 322)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
        )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
        #component: 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
       #(#SpecCollection
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
          #collection: #(
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
           #(#SequenceViewSpec
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
              #name: 'List'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
              #tabable: true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
              #model: #selectedMethodNameIndices
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
              #menu: #menuHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
              #hasHorizontalScrollBar: true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
              #hasVerticalScrollBar: true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
              #miniScrollerHorizontal: true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
              #isMultiSelect: true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
              #valueChangeSelector: #selectionChangedByClick
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
              #useIndex: true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
              #sequenceList: #browserNameList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
              #doubleClickChannel: #doubleClickChannel
6774
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   134
              #properties: 
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   135
             #(#PropertyListDictionary
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   136
                #dragArgument: nil
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   137
                #dropArgument: nil
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   138
                #canDropSelector: #canDropContext:
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   139
                #dropSelector: #doDropContext:
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   140
              )
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
            )
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
        )
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
      )
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
!MethodList class methodsFor:'plugIn spec'!
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
    "This resource specification was automatically generated
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
     by the UIPainter of ST/X."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
    "Do not manually edit this. If it is corrupted,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
     the UIPainter may not be able to read the specification."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
    "Return a description of exported aspects;
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
     these can be connected to aspects of an embedding application
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
     (if this app is embedded in a subCanvas)."
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    ^ #(
6259
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   162
        #classHolder
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   163
        #(#doubleClickChannel #action )
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   164
        #forceGeneratorTrigger
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   165
        #immediateUpdate
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   166
        #inGeneratorHolder
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   167
        #menuHolder
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   168
        #methodCategoryHolder
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   169
        #packageFilter
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   170
        #selectedMethods
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   171
        #selectionChangeCondition
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   172
        #updateTrigger
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   173
        #variableFilter
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   174
        #filterClassVars
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   175
        #showMethodInheritance
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   176
        #showMethodComplexity
6268
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   177
        #showMethodTypeIcon
6259
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   178
        #sortBy
5591
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
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
!MethodList methodsFor:'aspects'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
browserNameList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
    browserNameList isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
	browserNameList := List new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    ^ browserNameList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
    "Modified: / 31.1.2000 / 00:42:44 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
    "Created: / 5.2.2000 / 22:38:32 / cg"
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
defaultSlaveModeValue
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
    ^ false.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
filterClassVars
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
    filterClassVars isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
	filterClassVars := false asValue.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
	filterClassVars addDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
    ^  filterClassVars
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
filterClassVars:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
    filterClassVars notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
	filterClassVars removeDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
    filterClassVars := aValueHolder.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
    filterClassVars notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
	filterClassVars addDependent: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
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
methodLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
    ^ self pseudoListLabelHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
    "Created: / 1.3.2000 / 20:50:07 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
methodList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
    ^ methodList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
selectedMethodNameIndices
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
    selectedMethodNameIndices isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
	selectedMethodNameIndices := ValueHolder new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
	selectedMethodNameIndices addDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
    ^ selectedMethodNameIndices.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
    "Modified: / 5.2.2000 / 00:31:48 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
    "Created: / 5.2.2000 / 22:59:31 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
selectedMethods
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
    ^ self selectionHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
selectedMethods:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
    ^ self selectionHolder:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   244
6259
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   245
showMethodComplexity
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   246
    showMethodComplexity isNil ifTrue:[
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   247
        showMethodComplexity := false asValue.
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   248
        showMethodComplexity addDependent:self
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   249
    ].
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   250
    ^  showMethodComplexity
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   251
!
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   252
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   253
showMethodComplexity:aValueHolder
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   254
    showMethodComplexity notNil ifTrue:[
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   255
        showMethodComplexity removeDependent:self
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   256
    ].
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   257
    showMethodComplexity := aValueHolder.
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   258
    showMethodComplexity notNil ifTrue:[
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   259
        showMethodComplexity addDependent:self
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   260
    ].
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   261
!
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   262
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
showMethodInheritance
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
    showMethodInheritance isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
	showMethodInheritance := false asValue.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
	showMethodInheritance addDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
    ^  showMethodInheritance
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
showMethodInheritance:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
    showMethodInheritance notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
	showMethodInheritance removeDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
    showMethodInheritance := aValueHolder.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
    showMethodInheritance notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
	showMethodInheritance addDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
6268
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   281
showMethodTypeIcon
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   282
    showMethodTypeIcon isNil ifTrue:[
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   283
        showMethodTypeIcon := true asValue.
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   284
        showMethodTypeIcon addDependent:self
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   285
    ].
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   286
    ^  showMethodTypeIcon
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   287
!
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   288
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   289
showMethodTypeIcon:aValueHolder
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   290
    showMethodTypeIcon notNil ifTrue:[
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   291
        showMethodTypeIcon removeDependent:self
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   292
    ].
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   293
    showMethodTypeIcon := aValueHolder.
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   294
    showMethodTypeIcon notNil ifTrue:[
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   295
        showMethodTypeIcon addDependent:self
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   296
    ].
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   297
!
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
   298
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
variableFilter
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
    variableFilter isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
	variableFilter := nil asValue.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
	variableFilter addDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
    ^  variableFilter
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
variableFilter:aValueHolder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
    variableFilter notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
	variableFilter removeDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
    variableFilter := aValueHolder.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
    variableFilter notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
	variableFilter addDependent:self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
!MethodList methodsFor:'change & update'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
delayedUpdate:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
    |cls sel oldMethod newMethod methods newSelection
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
     selectionHolder selection needSelectionChange|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
    selectionHolder := self selectedMethods.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
    selection := selectionHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
    changedObject == Smalltalk ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   327
        classes notNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   328
            something == #methodCategory ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   329
                "/ ignore here - methodCategoryList will tell me if required
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   330
                ^ self
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   331
            ].
6663
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   332
            (something == #classOrganization
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   333
            or:[ something == #methodCategoryAdded
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   334
            or:[ something == #methodCategoryRemoved
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   335
            or:[ something == #methodCategoriesRemoved
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   336
            or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   337
                "/ ignore here - methodCategoryList will tell me if required
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   338
                ^ self
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   339
            ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   340
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   341
            something == #methodInClass ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   342
                "/ a method has been added/changed
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   343
                cls := aParameter at:1.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   344
                (classes includesIdentical:cls) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   345
                    sel := aParameter at:2.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   346
                    oldMethod := aParameter at:3.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   347
                    newMethod := cls compiledMethodAt:sel.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   348
                    (oldMethod notNil and:[newMethod notNil]) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   349
                        "a method was changed & acccepted;
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   350
                         No need for a rescan of the methodDictionary;
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   351
                         however, ensure that the refs to the old method are updated
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   352
                        "
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   353
                        methods := selection.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   354
                        methods size > 0 ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   355
                            (methods includesIdentical:oldMethod) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   356
                                needSelectionChange := true.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   357
                            ]
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   358
                        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   359
                        methodList replaceAllIdentical:oldMethod with:newMethod.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   360
                        lastSelectedMethods notNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   361
                            lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   362
                        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   363
                        methods size > 0 ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   364
                            methods := methods asOrderedCollection.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   365
                            methods replaceAllIdentical:oldMethod with:newMethod.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   366
                        ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   368
                        needSelectionChange == true ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   369
                            selectionHolder setValue:methods.
6575
94f336bcb07b update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents: 6490
diff changeset
   370
                            "/ self enqueueDelayedMethodsSelectionChanged.
94f336bcb07b update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents: 6490
diff changeset
   371
                            "/ need this to inform my browser that method was changed
94f336bcb07b update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents: 6490
diff changeset
   372
                            "/ by someone else.
94f336bcb07b update notifiaction from other browsers (refix)
Claus Gittinger <cg@exept.de>
parents: 6490
diff changeset
   373
                            selectionHolder changed.
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   374
                        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   375
                        (variableFilter value size > 0
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   376
                        or:[oldMethod package ~= newMethod package
6260
9e7aa671f1b9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6259
diff changeset
   377
                        or:[oldMethod resources ~= newMethod resources
6694
a746318dd357 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6663
diff changeset
   378
                        or:[showMethodComplexity value == true]]]) ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   379
                            "/ only update that methods entry
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   380
                            self updateListEntryFor:newMethod.    
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   381
                            "/ sigh - must invalidate
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   382
                            "/ self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   383
                        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   384
                        ^ self.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   385
                    ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   386
                    "/ method was added - update the methodList
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   387
                    "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   388
                    self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   389
                ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   390
                ^ self.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   391
            ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   392
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   393
            something == #methodInClassRemoved ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   394
                cls := aParameter at:1.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   395
                (classes includesIdentical:cls) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   396
                    sel := aParameter at:2.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   397
                    "/ method was removed - update the methodList
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   398
                    "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   399
                    self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   400
                ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   401
                ^ self.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   402
            ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   404
            (something == #methodTrap 
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   405
            or:[ something == #privacyOfMethod ]) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   406
                cls := aParameter at:1.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   407
                sel := aParameter at:2.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   408
                (classes includesIdentical:cls) ifFalse:[ ^ self].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   409
                newMethod := cls compiledMethodAt:sel.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   410
                newMethod isNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   411
                    self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   412
                    ^ self
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   413
                ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   414
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   415
                (something == #privacyOfMethod) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   416
                    self updateListEntryFor:newMethod.    
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   417
                ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   418
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   419
                (something == #methodTrap) ifTrue:[ 
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   420
                    newMethod isWrapped ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   421
                        oldMethod := newMethod originalMethod
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   422
                    ] ifFalse:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   423
                        selection size > 0 ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   424
                            oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   425
                        ]
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   426
                    ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   428
                    selection size > 0 ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   429
                        (selection includesIdentical:oldMethod) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   430
                            needSelectionChange := true.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   431
                        ]
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   432
                    ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   433
                    methodList replaceAllIdentical:oldMethod with:newMethod.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   434
                    lastSelectedMethods notNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   435
                        lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   436
                    ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   437
                    selection size > 0 ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   438
                        selection := selection asOrderedCollection.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   439
                        selection replaceAllIdentical:oldMethod with:newMethod.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   440
                    ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   441
                    needSelectionChange == true ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   442
                        selectionHolder changed.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   443
                    ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   445
                    "/ actually, could just change that single item ...
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   446
                    "/ ... might be cheaper, if list is huge.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   447
                    "/ only update that methods entry
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   448
                    self updateListEntryFor:newMethod.    
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   449
                    "/ self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   450
                ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   451
                ^ self
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   452
            ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   454
            (something == #projectOrganization
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   455
            or:[something == #lastTestRunResult]) ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   456
                aParameter notNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   457
                    cls := aParameter at:1.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   458
                    cls notNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   459
                        ((classes includesIdentical:cls theNonMetaclass)
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   460
                        or:[(classes includesIdentical:cls theMetaclass)]) ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   461
                            self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   462
                        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   463
                    ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   464
                ] ifFalse:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   465
                    self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   466
                ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   467
                ^ self
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   468
            ].
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   469
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   470
            "/ everything else is ignored
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   471
            "/ self halt.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   472
        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   473
        ^ self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
"/    something == #organization ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
"/self halt:'no longer'.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
"/^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
"/        "/ a methods cateory has changed
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
"/        (classes includesIdentical:changedObject) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
"/            aParameter isSymbol ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
"/                "/ a method with a new category
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
"/                (self methodList includesIdentical:(changedObject compiledMethodAt:aParameter)) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
"/                    self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
"/                ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
"/                ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
"/            "/ a new category (no method yet)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
"/            self invalidateList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
"/        ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
"/    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
"/    something == #methodDictionary ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
"/self halt:'no longer'.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
"/^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
"/        "/ a method has been added/removed
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
"/        (classes includesIdentical:changedObject) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
"/            aParameter isArray ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
"/                sel := aParameter at:1.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
"/                oldMethod := aParameter at:2.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
"/                newMethod := changedObject compiledMethodAt:sel.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
"/                oldMethod notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
"/                    "a method was changed & acccepted;
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
"/                     No need for a rescan of the methodDictionary;
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
"/                     however, ensure that the refs to the old method are updated
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
"/                    "
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
"/                    methods := selection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
"/                    methods size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
"/                        (methods includesIdentical:oldMethod) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
"/                            needSelectionChange := true.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
"/                        ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
"/                    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
"/                    methodList replaceAllIdentical:oldMethod with:newMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
"/                    lastSelectedMethods notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
"/                        lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
"/                    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
"/                    methods size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
"/                        methods := methods asOrderedCollection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
"/                        methods replaceAllIdentical:oldMethod with:newMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
"/                    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
"/                    needSelectionChange == true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
"/                        selectionHolder setValue:methods.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
"/                        selectionHolder changed.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
"/                    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
"/                    ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
"/                ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
"/            "/ class has changed must update the methodList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
"/            self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
"/        ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
"/    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
"/    something == #projectOrganization ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
"/        ((classes includesIdentical:changedObject theNonMetaclass)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
"/        or:[(classes includesIdentical:changedObject theMetaclass)]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
"/            self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
"/        ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
"/    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
    changedObject == sortBy ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   544
        listValid ~~ true ifTrue:[  "/ could be nil
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   545
            inGeneratorHolder value isNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   546
                "/ ok, no need to react on that one 
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   547
                "/ (will invalidate anyway, once I have more info at hand)
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   548
                ^ self
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   549
            ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   550
        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   551
        self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   552
        ^ self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
    (changedObject == variableFilter
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
    or:[changedObject == filterClassVars
6259
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   557
    or:[changedObject == showMethodInheritance
e440c14b02aa experimental display of method complexity
Claus Gittinger <cg@exept.de>
parents: 5998
diff changeset
   558
    or:[changedObject == showMethodComplexity]]]) ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   559
        self invalidateList.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   560
        ^  self
5591
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
    changedObject == selectedMethodNameIndices ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   564
        newSelection := self selectedMethodNameIndices value collect:[:idx | methodList at:idx].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   565
        newSelection ~= selection ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   566
            selectionHolder value:newSelection.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   567
            lastSelectedMethods := newSelection.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   568
            lastSelectedMethods notNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   569
                lastSelectedMethods := lastSelectedMethods asOrderedCollection
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   570
            ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   571
        ] ifFalse:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   572
            "/ a reselect - force update
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
"/            selection size == 1 ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   574
                selectionHolder setValue:newSelection.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   575
                selectionHolder changed:#value.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
"/            ].
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   577
        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   578
        ^ self 
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
    changedObject == selectionHolder ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   581
        self selectedMethodsChanged.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   582
        lastSelectedMethods := selectionHolder value.
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   583
        lastSelectedMethods notNil ifTrue:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   584
            lastSelectedMethods := lastSelectedMethods asOrderedCollection
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   585
        ].
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   586
        ^ self
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
"/    something == #methodTrap ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
"/self halt:'no longer'.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
"/^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
"/        (classes includesIdentical:changedObject) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
"/            newMethod := changedObject compiledMethodAt:aParameter.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
"/            newMethod isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
"/                self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
"/                ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
"/            newMethod isWrapped ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
"/                oldMethod := newMethod originalMethod
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
"/            ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
"/                selection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
"/                    oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
"/                ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   603
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   604
"/
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
"/            selection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
"/                (selection includesIdentical:oldMethod) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   607
"/                    needSelectionChange := true.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   608
"/                ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
"/"/            methodList replaceAllIdentical:oldMethod with:newMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
"/            lastSelectedMethods notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
"/                lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
"/            selection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
"/                selection := selection asOrderedCollection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
"/                selection replaceAllIdentical:oldMethod with:newMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   618
"/            needSelectionChange == true ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
"/                selectionHolder changed.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
"/            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
"/            self invalidateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   622
"/            ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
"/        ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
"/    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   626
    super delayedUpdate:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   628
    "Created: / 05-02-2000 / 13:42:14 / cg"
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   629
    "Modified: / 06-08-2006 / 10:36:49 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   631
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   632
selectedMethodsChanged
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
    "the set of selected methods has changed;
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   634
     update the selection-index collection (for the selectionInListView)"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   635
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   636
    |indices methods reverseMap 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   637
     selectedMethodsHolder selectedMethods selectedMethodNameIndicesHolder|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   638
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   639
    methods := methodList ? #().
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   640
    methods size == 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   641
	"/ this may happen during early startup, 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   642
	"/ when invoked with a preset methodSelection,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   643
	"/ and the methodGenerator has not yet been setup
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   644
	"/ to not clobber the selection, defer the update
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   645
	"/ until the methodList arrives ...
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   646
	^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   647
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   648
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   649
    selectedMethodsHolder := self selectedMethods.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   650
    selectedMethods := selectedMethodsHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   651
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   652
    "/ check if all is selected (likely)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   653
    ((selectedMethods size == methodList size)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   654
    and:[selectedMethods = methodList]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   655
	indices := (1 to:selectedMethods size)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   656
    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   657
	selectedMethods size > 100 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   658
	    "/ check if all is selected (likely)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   659
	    ((selectedMethods size == methodList size)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   660
	    and:[selectedMethods = methodList]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   661
		indices := (1 to:selectedMethods size)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   662
	    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   663
		"/ for big collections, generate a reverse map
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   664
		reverseMap := IdentityDictionary new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   665
		methods keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   666
		indices := selectedMethods collect:[:eachSelectedMethod |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   667
		    reverseMap at:eachSelectedMethod ifAbsent:0
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   668
		]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   669
	    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   670
	] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   671
	    indices := (selectedMethods ? #()) collect:[:eachSelectedMethod |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   672
		methods identityIndexOf:eachSelectedMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   673
	    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   674
	].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   675
	indices := indices select:[:idx | idx ~= 0].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   676
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   677
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   678
    selectedMethodNameIndicesHolder := self selectedMethodNameIndices.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   679
    selectedMethodNameIndicesHolder value ~= indices ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
	selectedMethodNameIndicesHolder value:indices.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   681
    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   683
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   684
selectionChanged
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   685
    |methods|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   687
    methods := ((self selectedMethodNameIndices value) ? #()) collect:[:idx | methodList at:idx].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   688
    methods notEmpty ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   689
	lastSelectedMethods := methods asOrderedCollection.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   690
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   691
    "/ to allow reselect, change my valueHolder, even if the same collection
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
"/    self selectedMethods value ~= methods ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
	self selectedMethods value:methods
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   694
"/    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
    "Created: / 5.2.2000 / 13:42:14 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   697
    "Modified: / 5.2.2000 / 23:32:20 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   698
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   699
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   700
selectionChangedByClick
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   701
    "we are not interested in that - get another notification
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   702
     via the changed valueHolder"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   703
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   704
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   706
update:something with:aParameter from:changedObject
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   707
    |cls|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   708
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
    "/ some can be ignored immediately
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
    changedObject == Smalltalk ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
        classes isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
        something isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
            "/ self halt "/ huh - Smalltalk changed - so what ?
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
        ].
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   718
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
        something == #classComment ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   721
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
        something == #classVariables ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
        something == #organization ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
        something == #methodCategory ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
            "/ ignore here - methodCategoryList will tell me if required
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   730
            ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   731
        ].
6663
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   732
        (something == #classOrganization
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   733
        or:[ something == #methodCategoryAdded
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   734
        or:[ something == #methodCategoryRemoved
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   735
        or:[ something == #methodCategoriesRemoved
1453d4f33815 changed change-update aspect when changing some method category
Claus Gittinger <cg@exept.de>
parents: 6575
diff changeset
   736
        or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   737
            "/ ignore here - methodCategoryList will tell me if required
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   738
            ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   739
        ].
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   740
        (something == #methodTrap 
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   741
        or:[ something == #methodPrivacy
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   742
        or:[ something == #lastTestRunResult] ]) ifTrue:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   743
            self window shown ifFalse:[
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   744
                changedObject removeDependent:self. "/ ?????
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   745
                ^ self
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   746
            ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   747
            cls := aParameter at:1.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   748
            (classes includesIdentical:cls) ifFalse:[
5998
6e40a20b361a icons & privacy update
Claus Gittinger <cg@exept.de>
parents: 5885
diff changeset
   749
                ^ self   "/ I dont care for that class
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   750
            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   751
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   752
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   753
        "/ as the organisation changes, flush my remembered redefinition-cache-info
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   754
        classAndSelectorsRedefinedBySubclassesOfClass := nil.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   755
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   756
        something == #classDefinition ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   757
            cls := aParameter.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   758
            (classes contains:[:aClass | aClass name == cls name]) ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   759
                ^ self   "/ I dont care for that class
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   760
            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   761
            classes := classes collect:[:eachClass | eachClass isMeta ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   762
                                                         (Smalltalk at:eachClass theNonMetaclass name) class 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   763
                                                     ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   764
                                                         Smalltalk at:eachClass name
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   765
                                                     ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   766
                                       ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   767
            self updateList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   768
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   769
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   770
        something == #newClass ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   771
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   772
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   773
        something == #classRemove ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   774
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   775
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   776
        something == #classRename ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   777
            ^ self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   778
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   779
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   780
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   781
    "/ these must lead to immediate update of the selectedMethods collection
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   782
    "/ (otherwise, that collection might be updated too late, leading to
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   783
    "/ an obsolete methods code being shown by the codeView.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   784
    something == #methodInClass ifTrue:[
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   785
        "/ as the organisation changes, flush my remembered redefinition-cache-info
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   786
        classAndSelectorsRedefinedBySubclassesOfClass := nil.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   787
        cls := aParameter at:1.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   788
        (classes includesIdentical:cls) ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   789
            ^ self   "/ I dont care for that class
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   790
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   791
        self enqueueDelayedUpdate:something with:aParameter from:changedObject.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
        ^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   794
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   795
    something == #methodInClassRemoved ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
        cls := aParameter at:1.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
        (classes includesIdentical:cls) ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
            ^ self   "/ I dont care for that class
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
    super update:something with:aParameter from:changedObject
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   803
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
   804
    "Modified: / 06-08-2006 / 11:03:31 / cg"
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   806
6774
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   807
!MethodList methodsFor:'drag & drop'!
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   808
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   809
canDropContext:aDropContext
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   810
    |methods|
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   811
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   812
    aDropContext sourceWidget == aDropContext targetWidget ifTrue:[^ false].
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   813
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   814
    methods := aDropContext dropObjects collect:[:obj | obj theObject].
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   815
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   816
    (methods contains:[:aMethod | aMethod isMethod not]) ifTrue:[^ false].
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   817
    self masterApplication theSingleSelectedClass isNil ifTrue:[^ false].
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   818
    ^ true
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   819
!
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   820
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   821
doDropContext:aDropContext
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   822
    |cat methods|
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   823
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   824
    methods := aDropContext dropObjects collect:[:aDropObject | aDropObject theObject].
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   825
    (methods contains:[:something | something isMethod not]) ifTrue:[^ self].
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   826
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   827
    self masterApplication moveMethods:methods toClass:(self masterApplication theSingleSelectedClass).
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   828
! !
ae9ed5b0b548 move method via drag and drop
Claus Gittinger <cg@exept.de>
parents: 6697
diff changeset
   829
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
!MethodList methodsFor:'private'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
listOfMethodNames
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
    |methods entries selectorBag newNameList 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
     allClasses newClasses allCategories "allSelectors" generator 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   835
     doShowClass doShowClassFirst  doShowCategory
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
     enforceClassAndProtocolInList theMethod sortByClass anyMethodToWatch mclass|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   837
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   838
    generator := inGeneratorHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   839
    generator isNil ifTrue:[^ #() ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   840
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
    allClasses := IdentitySet new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
    allCategories := IdentitySet new.   "/ not needed - all I need to know is if there is more than 1 category
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
    "/ allSelectors := Set new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
    newClasses := IdentitySet new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
    selectorBag := Bag new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   846
    entries := OrderedCollection new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   847
    enforceClassAndProtocolInList := false.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   848
    anyMethodToWatch := false.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   849
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   850
    "/ generator generates nil-selector entries
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   851
    "/ to pass multiple-class and multiple-protocol info
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
    generator do:[:cls :cat :sel :mthd |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   853
                        (cls isNil and:[cat isNil and:[sel isNil]])
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   854
                        ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   855
                            enforceClassAndProtocolInList := true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   856
                        ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
                            cls notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
                                allClasses add:cls.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
                            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   860
                            cat notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   861
                                allCategories add:cat.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
                            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
                            sel notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
                                entries add:(Array with:cls with:sel with:mthd).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
                                selectorBag add:sel.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
                                newClasses add:cls.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   867
                                "/ allSelectors add:sel.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
                            ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   869
                        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   870
                        (mthd notNil and:[mthd isWrapped]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
                            (mthd isTiming
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
                            or:[mthd isCounting
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
                            or:[mthd isCountingMemoryUsage]])
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   874
                            ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   875
                                anyMethodToWatch := true
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   876
                            ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   877
                        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   878
                 ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   879
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   880
    showMethodInheritance value ~~ false ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   881
        "/ collect redefinition information once (big speedup for #methodIsRedefinedbelow)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   882
        classAndSelectorsRedefinedBySubclassesOfClass isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   883
            classAndSelectorsRedefinedBySubclassesOfClass := IdentityDictionary new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   884
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   885
        allClasses do:[:cls | |d|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   886
            d := classAndSelectorsRedefinedBySubclassesOfClass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   887
            (d notNil and:[ (d includesKey:cls) not ]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   888
                d at:cls put:(self setOfAllSelectorsImplementedBelow:cls)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   889
            ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   890
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   891
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   892
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   893
    "/ multiple classes must: add the className for some
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   894
    doShowClass := enforceClassAndProtocolInList or:[allClasses size > 1].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   895
    "/ multiple categories: must add the categorie for some
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   896
    doShowCategory := enforceClassAndProtocolInList or:[allCategories size > 1].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   897
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   898
    doShowClassFirst := doShowClass. "/ (doShowClass and:[allSelectors size == 1]).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   899
    doShowClassFirst := doShowClass and:[ sortBy value == #class ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   900
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   901
    sortBy value == false ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   902
        "/ do not sort
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   903
    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   904
        (doShowClass not and:[ sortBy value == #class ]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   905
            "/ multiple classes must add the className for some
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   906
            "/ check, if doShowClass must be enforced
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   907
            entries do:[:entry |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   908
                |cls sel mthd s needClass|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   909
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   910
                cls := entry at:1.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   911
                sel := entry at:2.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   912
                mthd := entry at:3.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   913
                doShowClass ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   914
                    doShowClass := (selectorBag occurrencesOf:sel) > 1
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   915
                ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   916
            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   917
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   918
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   919
        sortByClass := doShowClass and:[ sortBy value == #class ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   920
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   921
        sortByClass ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   922
            entries sort:[:a :b | |nmA nmB clsNmA clsNmB|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   923
                                   clsNmA := (a at:1) name.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   924
                                   clsNmB := (b at:1) name.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   925
                                   clsNmA = clsNmB ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   926
                                       nmA := (a at:2).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   927
                                       nmB := (b at:2).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   928
                                       nmA < nmB
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   929
                                   ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   930
                                       clsNmA < clsNmB
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   931
                                   ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   932
                         ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   933
        ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   934
            entries sort:[:a :b | |nmA nmB clsNmA clsNmB|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   935
                                   nmA := (a at:2).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   936
                                   nmB := (b at:2).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   937
                                   nmA = nmB ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   938
                                       clsNmA := (a at:1) name.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   939
                                       clsNmB := (b at:1) name.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   940
                                       clsNmA < clsNmB
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   941
                                   ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   942
                                       nmA < nmB
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   943
                                   ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   944
                         ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   945
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   946
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   947
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   948
    methods := OrderedCollection new:(entries size).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   949
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   950
    "/ first generate the new methodList, and see if it is different ...
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   951
    entries do:[:entry |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   952
        |sel mthd|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   953
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   954
        mthd := entry at:3.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   955
        methods add:mthd.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   956
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   957
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   958
    false "methodList = methods" "does not care for changed icons" ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   959
        "/ same list
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   960
        newNameList := self browserNameList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   961
    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   962
        newNameList := OrderedCollection new:(entries size).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   963
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   964
        "/ multiple classes must add the className for some
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   965
        entries do:[:entry |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   966
            |cls sel mthd s needClass|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   967
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   968
            cls := entry at:1.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   969
            sel := entry at:2.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   970
            mthd := entry at:3.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   971
            needClass := doShowClass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   972
"/        needClass ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   973
"/            needClass := (selectorBag occurrencesOf:sel) > 1
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   974
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   975
            s := self 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   976
                    listEntryForMethod:mthd 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   977
                    selector:sel 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   978
                    class:cls 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   979
                    showClass:needClass 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   980
                    showCategory:doShowCategory
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   981
                    classFirst:doShowClassFirst.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   982
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   983
"/        s := mthd printStringForBrowserWithSelector:sel inClass:cls.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   984
"/        needClass ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   985
"/            s := s , ' [' , cls name , ']'.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   986
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   987
"/        doShowCategory ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   988
"/            s := s , ' {' , mthd category "asText allItalic" , '}'
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   989
"/        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   990
            newNameList add:s.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   991
        ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   992
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   993
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   994
    self makeIndependent.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   995
    classes := newClasses.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   996
    self makeDependent.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   997
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   998
    methodList := methods.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   999
    methods size == 1 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1000
        theMethod := methods first.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1001
        mclass := theMethod mclass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1002
        mclass isNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1003
            theMethod isWrapped ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1004
                theMethod := theMethod originalMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1005
                mclass := theMethod mclass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1006
            ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1007
        ].
6697
3a4c5ae377fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6694
diff changeset
  1008
        self methodLabelHolder value:(
3a4c5ae377fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6694
diff changeset
  1009
                 mclass isNil 
3a4c5ae377fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6694
diff changeset
  1010
                        ifTrue:[('???' , ' ' , '???')] 
3a4c5ae377fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6694
diff changeset
  1011
                        ifFalse:[(mclass name , ' ' , theMethod selector)])
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1012
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1013
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1014
    anyMethodToWatch ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1015
        self startWatchProcess.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1016
    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1017
        self stopWatchProcess.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1018
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1019
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1020
    "/ remember these, in case of an incremental (single method only)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1021
    "/ update in the future.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1022
    lastShowClass := doShowClass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1023
    lastShowClassFirst := doShowClassFirst.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1024
    lastShowCategory := doShowCategory.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1025
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1026
    ^ newNameList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1027
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1028
    "Created: / 5.2.2000 / 22:43:40 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1029
    "Modified: / 1.3.2000 / 21:00:26 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1030
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1031
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1032
makeDependent
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1033
    Smalltalk addDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1034
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1035
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1036
makeIndependent
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1037
    Smalltalk removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1038
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1039
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1040
method:mthd includesModsOfClassVariable:variablesToHighLight
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1041
    ^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#modifiedClassVars
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1042
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1043
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1044
method:mthd includesModsOfInstanceVariable:variablesToHighLight
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1045
    ^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#modifiedInstVars
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1046
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1047
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1048
method:mthd includesRefsToClassVariable:variablesToHighLight
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1049
    ^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#usedClassVars
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1050
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1051
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1052
method:mthd includesRefsToInstanceVariable:variablesToHighLight
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1053
    ^ self method:mthd includesRefsToVariable:variablesToHighLight askParserWith:#usedInstVars
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1054
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1055
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1056
method:mthd includesRefsToVariable:variablesToHighLight askParserWith:querySelector
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1057
    |cls src parser usedVars anyVarNameAccessable|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1058
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1059
    cls := mthd mclass.
5885
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1060
    cls isNil ifTrue:[^ false].
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1061
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1062
    anyVarNameAccessable := cls allInstVarNames includesAny:variablesToHighLight.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1063
    anyVarNameAccessable ifFalse:[
5885
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1064
        anyVarNameAccessable := cls theNonMetaclass allClassVarNames includesAny:variablesToHighLight.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1065
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1066
    anyVarNameAccessable ifFalse:[
5885
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1067
        "/ no need to parse
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1068
        ^ false
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1069
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1070
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1071
    src := mthd source.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1072
    src notNil ifTrue:[
5885
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1073
        "
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1074
         before doing a slow parse, quickly scan the
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1075
         methods source for the variables name ...
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1076
        "
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1077
        (variablesToHighLight contains:[:varName | (src findString:varName) ~~ 0]) ifTrue:[
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1078
            parser := Parser
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1079
                            parseMethod:src 
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1080
                            in:cls 
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1081
                            ignoreErrors:true 
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1082
                            ignoreWarnings:true.
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1083
            (parser notNil and:[parser ~~ #Error]) ifTrue:[
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1084
                usedVars := parser perform:querySelector.
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1085
                (usedVars includesAny:variablesToHighLight)
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1086
                ifTrue:[
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1087
                    ^  true
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1088
                ]
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1089
            ]
26dee2c80ea9 care for unbound methods
Claus Gittinger <cg@exept.de>
parents: 5761
diff changeset
  1090
        ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1091
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1092
    ^ false
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1093
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1094
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1095
methodIsInheritedFromAbove:aMethod
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1096
    |mClass|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1097
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1098
    mClass := aMethod mclass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1099
    (mClass notNil and:[mClass superclass notNil]) ifTrue:[
6789
6e87cc2011a7 Do not use obsolete method
Stefan Vogel <sv@exept.de>
parents: 6774
diff changeset
  1100
        ^ (mClass superclass whichClassIncludesSelector:aMethod selector) notNil.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1101
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1102
    ^ false
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1103
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1104
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1105
methodIsRedefinedBelow:aMethod
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1106
    |mclass subClasses setOfRedefinedSelectors|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1107
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1108
    mclass := aMethod mclass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1109
    mclass isNil ifTrue:[^ false].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1110
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1111
    "/ if possible, make use of info prepared by listOfMethodNames
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1112
    classAndSelectorsRedefinedBySubclassesOfClass notNil
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1113
    ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1114
	setOfRedefinedSelectors := classAndSelectorsRedefinedBySubclassesOfClass at:mclass ifAbsent:nil.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1115
	setOfRedefinedSelectors notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1116
	    ^ setOfRedefinedSelectors includes:aMethod selector
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1117
	]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1118
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1119
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1120
    lastMethodClass == mclass ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1121
	subClasses := lastMethodClassesSubclasses
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1122
    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1123
	subClasses := aMethod mclass allSubclasses.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1124
	lastMethodClassesSubclasses := subClasses.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1125
	lastMethodClass := mclass.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1126
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1127
    ^ subClasses contains:[:cls | cls implements:aMethod selector].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1128
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1129
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1130
redefinedOrInheritedIconFor:aMethod
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1131
    |inherited redefined subclassResponsibility|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1132
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1133
    inherited := self methodIsInheritedFromAbove:aMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1134
    redefined := self methodIsRedefinedBelow:aMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1135
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1136
    inherited ifTrue:[
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1137
        redefined ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1138
            ^ self methodInheritedFromAboveAndRedefinedBelowIcon.
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1139
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1140
        ^ self methodInheritedFromAboveIcon.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1141
    ].
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1142
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1143
    subclassResponsibility := aMethod sends:#subclassResponsibility.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1144
    redefined ifTrue:[
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1145
        subclassResponsibility ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1146
            ^ self methodIsSubclassResponsibilityAndRedefinedBelowIcon.
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1147
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1148
        ^ self methodRedefinedBelowIcon.
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1149
    ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1150
    subclassResponsibility ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1151
        ^ self methodIsSubclassResponsibilityIcon.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1152
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1153
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1154
    ^ self methodEmptyInheritedIcon
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1155
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1156
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1157
release
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1158
    super release.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1159
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1160
    filterClassVars removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1161
    selectedMethodNameIndices removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1162
    showMethodInheritance removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1163
    variableFilter removeDependent:self.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1164
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1165
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1166
resourceIconForMethod:aMethod
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1167
    |resources|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1168
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1169
    (resources := aMethod resources) notNil ifTrue:[
5761
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1170
        (resources includesKey:#obsolete) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1171
            ^ self deprecatedMethodIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1172
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1173
        (resources includesKey:#canvas) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1174
            ^ self canvasIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1175
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1176
        (resources includesKey:#menu) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1177
            ^ self menuIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1178
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1179
        (resources includesKey:#image) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1180
            ^ self imageIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1181
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1182
        (resources includesKey:#fileImage) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1183
            ^ self fileImageIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1184
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1185
        (resources includesKey:#programImage) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1186
            ^ self programImageIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1187
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1188
        (resources includesKey:#help) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1189
            ^ self helpIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1190
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1191
        (resources includesKey:#programMenu) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1192
            ^ self programMenuIcon
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1193
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1194
        (resources includesKey:#tableColumns) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1195
            ^ self tableColumnsIcon 
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1196
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1197
        (resources includesKey:#tabList) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1198
            ^ self tabListIcon 
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1199
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1200
        (resources includesKey:#hierarchicalList) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1201
            ^ self hierarchicalListIcon 
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1202
        ].
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1203
        (resources includesKey:#programImage) ifTrue:[
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1204
            ^ self programImageIcon 
b350e042dc9f Icons for subclassResponsibility and deprecated methods
Stefan Vogel <sv@exept.de>
parents: 5591
diff changeset
  1205
        ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1206
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1207
    ^ nil
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1208
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1209
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1210
setOfAllSelectorsImplementedBelow:aClass
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1211
    |set|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1212
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1213
    set := IdentitySet new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1214
    aClass allSubclassesDo:[:eachSubclass |
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1215
	set addAll:(eachSubclass methodDictionary keys).
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1216
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1217
    ^ set
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1218
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1219
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1220
updateList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1221
    |prevSelection newList newSelection newSelIdx reverseMap sameContents newListSize oldListSize
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1222
     prevClasses methodSet selectedMethodsHolder|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1223
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1224
    selectedMethodsHolder := self selectedMethods.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1225
    prevSelection := selectedMethodsHolder value ? #().
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1226
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1227
    prevClasses := classes ifNil:[ #() ] ifNotNil:[ classes copy ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1228
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1229
    oldListSize := self browserNameList size.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1230
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1231
    "/ self topApplication withWaitCursorDo:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1232
	newList := self listOfMethodNames.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1233
	newListSize := newList size.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1234
	sameContents := self updateListFor:newList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1235
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1236
	sameContents ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1237
    "/            self browserNameList value:newList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1238
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1239
	    (prevSelection size == 0 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1240
	    and:[selectedMethodsHolder value size ~~ 0]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1241
		"/ this happens during early startup time,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1242
		"/ when the selection is already (pre-)set,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1243
		"/ and the methodList is generated the first time
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1244
		"/ (i.e. when opened with preset selection
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1245
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1246
		"/ do not clobber the selection in this case.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1247
		prevSelection := selectedMethodsHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1248
	    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1249
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1250
	    (methodList size == 0 or:[prevSelection size == 0]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1251
		newSelection := #()
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1252
	    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1253
		methodSet := methodList.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1254
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1255
		"/ inclusion test is much faster with sets, if the number of items is large
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1256
		methodList size > 30 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1257
		    "/ however, only if its worth building the set ...
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1258
		    prevSelection size > 5 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1259
			methodSet := methodSet asIdentitySet.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1260
		    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1261
		].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1262
		newSelection := prevSelection select:[:item | methodSet includesIdentical:item].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1263
	    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1264
	    newSelection size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1265
		newSelection size > 100 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1266
		    "/ need selection indices - might be expensive if done straight forward...
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1267
		    reverseMap := IdentityDictionary new.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1268
		    methodList keysAndValuesDo:[:idx :mthd | reverseMap at:mthd put:idx].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1269
		    newSelIdx := newSelection collect:[:mthd | reverseMap at:mthd].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1270
		] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1271
		    newSelIdx := newSelection collect:[:mthd | methodList identityIndexOf:mthd]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1272
		].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1273
"/ self halt.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1274
		"/ force change (for dependents)
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1275
		selectedMethodNameIndices value:newSelIdx.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1276
	    ] ifFalse:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1277
		lastSelectedMethods := selectedMethodsHolder value.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1278
		lastSelectedMethods notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1279
		    lastSelectedMethods := lastSelectedMethods asOrderedCollection
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1280
		].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1281
		selectedMethodNameIndices value size > 0 ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1282
		    selectedMethodNameIndices value:#().
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1283
		]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1284
	    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1285
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1286
	    newSelection ~= prevSelection ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1287
		self selectionChanged.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1288
	    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1289
	] ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1290
	    "/ same list - but classes might have changed
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1291
	    "/ that is the case, if the class selection has been changed,
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1292
	    "/ to another class which has the same categories.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1293
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1294
	    (prevClasses size ~= classes size 
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1295
	    or:[prevClasses asOrderedCollection ~= (classes ? #()) asOrderedCollection ]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1296
		(newListSize > 0 or:[oldListSize > 0]) ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1297
		    self selectionChanged.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1298
		]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1299
	    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1300
	]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1301
    "/ ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1302
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1303
    "Modified: / 18.8.2000 / 19:47:22 / cg"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1304
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1305
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1306
updateListEntryFor:aMethod
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1307
    "update my list for a single method.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1308
     (used when a single methods package, code or whatever changes, and a full udpate
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1309
      would be too slow)"
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1310
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1311
    |s idx|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1312
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1313
    s := self 
6268
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1314
            listEntryForMethod:aMethod 
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1315
            selector:aMethod selector 
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1316
            class:aMethod mclass 
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1317
            showClass:lastShowClass 
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1318
            showCategory:lastShowCategory
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1319
            classFirst:lastShowClassFirst.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1320
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1321
    idx := methodList identityIndexOf:aMethod.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1322
    idx == 0 ifTrue:[
6268
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1323
        aMethod isWrapped ifTrue:[
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1324
            idx := methodList identityIndexOf:aMethod originalMethod.
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1325
        ]
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1326
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1327
    idx == 0 ifTrue:[
6268
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1328
        self invalidateList
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1329
    ] ifFalse:[
6268
df63cb5277cc metrics display
Claus Gittinger <cg@exept.de>
parents: 6261
diff changeset
  1330
        self browserNameList at:idx put:s.
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1331
    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1332
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1333
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1334
!MethodList methodsFor:'private-presentation'!
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1335
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1336
listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1337
    "answer a method list entry 
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1338
     gimmics: 
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1339
        adding a little image to breakPointed methods,
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1340
        inheritance indicators,
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1341
        highlight accessors of variable"
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1342
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1343
    |clsName s icn variablesToHighlight classVarsToHighLight 
6278
b5a59a79ed9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6277
diff changeset
  1344
     doHighLight doHighLightRed emp cat l redefIcon 
b5a59a79ed9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6277
diff changeset
  1345
     metrics complexity complexityString complexityIcon|
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1346
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1347
    aMethod isAssociation ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1348
        self halt:'should not happen'.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1349
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1350
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1351
    s := aMethod printStringForBrowserWithSelector:selector inClass:cls.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1352
    showClassFirst ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1353
        clsName := cls nameInBrowser.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1354
        s := clsName , ' ' , s allBold
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1355
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1356
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1357
    "/
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1358
    "/ wrap icons (i.e. break- or trace points)
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1359
    "/ have higher prio ...
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1360
    "/
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1361
    aMethod isWrapped ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1362
        (s endsWith:' !!') ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1363
            s := s copyWithoutLast:2
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1364
        ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1365
        aMethod isBreakpointed ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1366
            icn := self stopIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1367
        ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1368
            aMethod isTimed ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1369
                icn := self timeIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1370
            ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1371
                icn := self traceIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1372
            ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1373
        ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1374
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1375
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1376
    icn isNil ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1377
        showMethodTypeIcon value ~~ false ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1378
            icn := self resourceIconForMethod:aMethod.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1379
        ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1380
        icn isNil ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1381
            aMethod isProtected ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1382
                icn := self protectedMethodIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1383
            ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1384
                aMethod isPrivate ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1385
                    icn := self privateMethodIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1386
                ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1387
                    (aMethod isIgnored) ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1388
                        icn := self ignoredMethodIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1389
                    ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1390
                        (aMethod isJavaMethod and:[aMethod isAbstract]) ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1391
                            icn := self abstractMethodIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1392
                        ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1393
                    ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1394
                ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1395
            ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1396
        ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1397
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1398
    icn isNil ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1399
        (selector startsWith:'test') ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1400
            ((cls isSubclassOf:TestCase) 
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1401
            and:[cls isAbstract not]) ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1402
                cls lastTestRunResultOrNil == false ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1403
                    (cls testSelectorFailed:selector) ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1404
                        icn := SystemBrowser testCaseFailedIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1405
                    ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1406
                        "/ icn := SystemBrowser testCasePassedIcon
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1407
                    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1408
                ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1409
            ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1410
        ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1411
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1412
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1413
    showClass ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1414
        showClassFirst ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1415
            s := s , ' [' , cls name allBold , ']'.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1416
        ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1417
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1418
    showCategory ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1419
        cat := aMethod category.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1420
        cat notNil ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1421
            s := s , ' {' , cat "asText allItalic" , '}'
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1422
        ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1423
    ].
6841
6d72f92ed6cd mark changed methods with a '*'
Claus Gittinger <cg@exept.de>
parents: 6789
diff changeset
  1424
    (ChangeSet current includesChangeForClass:cls selector:selector) ifTrue:[
6d72f92ed6cd mark changed methods with a '*'
Claus Gittinger <cg@exept.de>
parents: 6789
diff changeset
  1425
        s := s , ' *'
6d72f92ed6cd mark changed methods with a '*'
Claus Gittinger <cg@exept.de>
parents: 6789
diff changeset
  1426
    ].
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1427
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1428
    variablesToHighlight := variableFilter value.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1429
    variablesToHighlight size > 0 ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1430
        classVarsToHighLight := filterClassVars value.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1431
        classVarsToHighLight ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1432
            doHighLight := self method:aMethod includesRefsToClassVariable:variablesToHighlight.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1433
            doHighLight ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1434
                doHighLightRed := self method:aMethod includesModsOfClassVariable:variablesToHighlight.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1435
            ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1436
        ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1437
            doHighLight := self method:aMethod includesRefsToInstanceVariable:variablesToHighlight.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1438
            doHighLight ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1439
                doHighLightRed := self method:aMethod includesModsOfInstanceVariable:variablesToHighlight
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1440
            ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1441
        ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1442
        doHighLight ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1443
            s := s allBold.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1444
            doHighLightRed ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1445
                emp := (UserPreferences current emphasisForWrittenVariable)
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1446
            ] ifFalse:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1447
                emp := (UserPreferences current emphasisForReadVariable)
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1448
            ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1449
            s := s emphasisAllAdd:emp
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1450
        ]
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1451
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1452
6694
a746318dd357 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6663
diff changeset
  1453
    (showMethodComplexity value == true 
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1454
    and:[ OOM::MethodMetrics notNil ]) ifTrue:[
6278
b5a59a79ed9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6277
diff changeset
  1455
icn isNil ifTrue:[
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1456
        metrics := OOM::MethodMetrics forMethod:aMethod.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1457
        complexity := metrics complexity ? 0.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1458
        complexityIcon := OOM::MethodMetrics iconForComplexity:complexity.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1459
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1460
        ShowComplexityValue == true ifTrue:[
6272
54b4aec6a387 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6271
diff changeset
  1461
            complexityString := '{' , complexity printString , '}'.
54b4aec6a387 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6271
diff changeset
  1462
            s := complexityString , ' ' , s.
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1463
        ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1464
        "/ icn := icn ? complexityIcon.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1465
        s := LabelAndIcon icon:complexityIcon string:s.
6278
b5a59a79ed9d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6277
diff changeset
  1466
].
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1467
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1468
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1469
    showMethodInheritance value ~~ false ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1470
        redefIcon := self redefinedOrInheritedIconFor:aMethod.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1471
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1472
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1473
    (icn notNil or:[redefIcon notNil]) ifTrue:[
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1474
        l := LabelAndIcon icon:redefIcon string:s.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1475
        l image:icn.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1476
        l gap:2.
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1477
        ^ l
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1478
    ].
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1479
    ^ s
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1480
6841
6d72f92ed6cd mark changed methods with a '*'
Claus Gittinger <cg@exept.de>
parents: 6789
diff changeset
  1481
    "Created: / 22-10-1996 / 19:51:00 / cg"
6d72f92ed6cd mark changed methods with a '*'
Claus Gittinger <cg@exept.de>
parents: 6789
diff changeset
  1482
    "Modified: / 05-08-2006 / 17:32:58 / cg"
6271
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1483
! !
e0e4d9873bc4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6268
diff changeset
  1484
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1485
!MethodList methodsFor:'private-watching'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1486
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1487
startWatchProcess
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1488
    updateProcess notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1489
	^ self
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1490
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1491
    updateProcess := [
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1492
			[true] whileTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1493
			    Delay waitForSeconds:1.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1494
			    self enqueueDelayedUpdateList
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1495
			]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1496
		     ] fork.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1497
!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1498
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1499
stopWatchProcess
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1500
    |p|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1501
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1502
    (p := updateProcess) notNil ifTrue:[
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1503
	updateProcess := nil.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1504
	p terminate
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1505
    ].
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1506
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1507
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1508
!MethodList methodsFor:'setup'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1509
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1510
postBuildWith:aBuilder
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1511
    |methodListView|
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1512
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1513
    super postBuildWith:aBuilder.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1514
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1515
    methodListView := aBuilder componentAt:'List'.
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1516
    methodListView notNil ifTrue:[
6277
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1517
        methodListView allowDrag:true.
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1518
        methodListView dragObjectConverter:[:obj | 
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1519
                                            |nm method idx|
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1520
6277
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1521
                                            nm := obj theObject asString string string.
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1522
                                            idx := browserNameList value findFirst:[:item | item string string = nm].
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1523
                                            method := methodList value at:idx.
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1524
                                            DropObject newMethod:method.
12cb8061330f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6272
diff changeset
  1525
                                         ].
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1526
    ]
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1527
! !
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1528
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1529
!MethodList class methodsFor:'documentation'!
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1530
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1531
version
6846
b7d2d17e4ae5 testresult indicators
Claus Gittinger <cg@exept.de>
parents: 6841
diff changeset
  1532
    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.21 2006-08-07 10:16:56 cg Exp $'
5591
273637686948 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1533
! !