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