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