Tools_MethodList.st
changeset 5998 6e40a20b361a
parent 5885 26dee2c80ea9
child 6259 e440c14b02aa
equal deleted inserted replaced
5997:a0654a5af9a1 5998:6e40a20b361a
   276 
   276 
   277     selectionHolder := self selectedMethods.
   277     selectionHolder := self selectedMethods.
   278     selection := selectionHolder value.
   278     selection := selectionHolder value.
   279 
   279 
   280     changedObject == Smalltalk ifTrue:[
   280     changedObject == Smalltalk ifTrue:[
   281 	classes notNil ifTrue:[
   281         classes notNil ifTrue:[
   282 	    something == #methodCategory ifTrue:[
   282             something == #methodCategory ifTrue:[
   283 		"/ ignore here - methodCategoryList will tell me if required
   283                 "/ ignore here - methodCategoryList will tell me if required
   284 		^ self
   284                 ^ self
   285 	    ].
   285             ].
   286 	    something == #classOrganization ifTrue:[
   286             something == #classOrganization ifTrue:[
   287 		"/ ignore here - methodCategoryList will tell me if required
   287                 "/ ignore here - methodCategoryList will tell me if required
   288 		^ self
   288                 ^ self
   289 	    ].
   289             ].
   290 
   290 
   291 	    something == #methodInClass ifTrue:[
   291             something == #methodInClass ifTrue:[
   292 		"/ a method has been added/changed
   292                 "/ a method has been added/changed
   293 		cls := aParameter at:1.
   293                 cls := aParameter at:1.
   294 		(classes includesIdentical:cls) ifTrue:[
   294                 (classes includesIdentical:cls) ifTrue:[
   295 		    sel := aParameter at:2.
   295                     sel := aParameter at:2.
   296 		    oldMethod := aParameter at:3.
   296                     oldMethod := aParameter at:3.
   297 		    newMethod := cls compiledMethodAt:sel.
   297                     newMethod := cls compiledMethodAt:sel.
   298 		    (oldMethod notNil and:[newMethod notNil]) ifTrue:[
   298                     (oldMethod notNil and:[newMethod notNil]) ifTrue:[
   299 			"a method was changed & acccepted;
   299                         "a method was changed & acccepted;
   300 			 No need for a rescan of the methodDictionary;
   300                          No need for a rescan of the methodDictionary;
   301 			 however, ensure that the refs to the old method are updated
   301                          however, ensure that the refs to the old method are updated
   302 			"
   302                         "
   303 			methods := selection.
   303                         methods := selection.
   304 			methods size > 0 ifTrue:[
   304                         methods size > 0 ifTrue:[
   305 			    (methods includesIdentical:oldMethod) ifTrue:[
   305                             (methods includesIdentical:oldMethod) ifTrue:[
   306 				needSelectionChange := true.
   306                                 needSelectionChange := true.
   307 			    ]
   307                             ]
   308 			].
   308                         ].
   309 			methodList replaceAllIdentical:oldMethod with:newMethod.
   309                         methodList replaceAllIdentical:oldMethod with:newMethod.
   310 			lastSelectedMethods notNil ifTrue:[
   310                         lastSelectedMethods notNil ifTrue:[
   311 			    lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
   311                             lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
   312 			].
   312                         ].
   313 			methods size > 0 ifTrue:[
   313                         methods size > 0 ifTrue:[
   314 			    methods := methods asOrderedCollection.
   314                             methods := methods asOrderedCollection.
   315 			    methods replaceAllIdentical:oldMethod with:newMethod.
   315                             methods replaceAllIdentical:oldMethod with:newMethod.
   316 			].
   316                         ].
   317 
   317 
   318 			needSelectionChange == true ifTrue:[
   318                         needSelectionChange == true ifTrue:[
   319 			    selectionHolder setValue:methods.
   319                             selectionHolder setValue:methods.
   320 			    selectionHolder changed.
   320                             selectionHolder changed.
   321 			].
   321                         ].
   322 			(variableFilter value size > 0
   322                         (variableFilter value size > 0
   323 			or:[oldMethod package ~= newMethod package
   323                         or:[oldMethod package ~= newMethod package
   324 			or:[oldMethod resources ~= newMethod resources]]) ifTrue:[
   324                         or:[oldMethod resources ~= newMethod resources]]) ifTrue:[
   325 			    "/ only update that methods entry
   325                             "/ only update that methods entry
   326 			    self updateListEntryFor:newMethod.    
   326                             self updateListEntryFor:newMethod.    
   327 			    "/ sigh - must invalidate
   327                             "/ sigh - must invalidate
   328 			    "/ self invalidateList.
   328                             "/ self invalidateList.
   329 			].
   329                         ].
   330 			^ self.
   330                         ^ self.
   331 		    ].
   331                     ].
   332 		    "/ method was added - update the methodList
   332                     "/ method was added - update the methodList
   333 		    "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
   333                     "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
   334 		    self invalidateList.
   334                     self invalidateList.
   335 		].
   335                 ].
   336 		^ self.
   336                 ^ self.
   337 	    ].
   337             ].
   338 
   338 
   339 	    something == #methodInClassRemoved ifTrue:[
   339             something == #methodInClassRemoved ifTrue:[
   340 		cls := aParameter at:1.
   340                 cls := aParameter at:1.
   341 		(classes includesIdentical:cls) ifTrue:[
   341                 (classes includesIdentical:cls) ifTrue:[
   342 		    sel := aParameter at:2.
   342                     sel := aParameter at:2.
   343 		    "/ method was removed - update the methodList
   343                     "/ method was removed - update the methodList
   344 		    "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
   344                     "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
   345 		    self invalidateList.
   345                     self invalidateList.
   346 		].
   346                 ].
   347 		^ self.
   347                 ^ self.
   348 	    ].
   348             ].
   349 
   349 
   350 	    something == #methodTrap ifTrue:[
   350             (something == #methodTrap 
   351 		cls := aParameter at:1.
   351             or:[ something == #privacyOfMethod ]) ifTrue:[
   352 		sel := aParameter at:2.
   352                 cls := aParameter at:1.
   353 		(classes includesIdentical:cls) ifTrue:[
   353                 sel := aParameter at:2.
   354 		    newMethod := cls compiledMethodAt:sel.
   354                 (classes includesIdentical:cls) ifFalse:[ ^ self].
   355 		    newMethod isNil ifTrue:[
   355                 newMethod := cls compiledMethodAt:sel.
   356 			self invalidateList.
   356                 newMethod isNil ifTrue:[
   357 			^ self
   357                     self invalidateList.
   358 		    ].
   358                     ^ self
   359 		    newMethod isWrapped ifTrue:[
   359                 ].
   360 			oldMethod := newMethod originalMethod
   360 
   361 		    ] ifFalse:[
   361                 (something == #privacyOfMethod) ifTrue:[
   362 			selection size > 0 ifTrue:[
   362                     self updateListEntryFor:newMethod.    
   363 			    oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil.
   363                 ].
   364 			]
   364 
   365 		    ].
   365                 (something == #methodTrap) ifTrue:[ 
   366 
   366                     newMethod isWrapped ifTrue:[
   367 		    selection size > 0 ifTrue:[
   367                         oldMethod := newMethod originalMethod
   368 			(selection includesIdentical:oldMethod) ifTrue:[
   368                     ] ifFalse:[
   369 			    needSelectionChange := true.
   369                         selection size > 0 ifTrue:[
   370 			]
   370                             oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil.
   371 		    ].
   371                         ]
   372 		    methodList replaceAllIdentical:oldMethod with:newMethod.
   372                     ].
   373 		    lastSelectedMethods notNil ifTrue:[
   373 
   374 			lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
   374                     selection size > 0 ifTrue:[
   375 		    ].
   375                         (selection includesIdentical:oldMethod) ifTrue:[
   376 		    selection size > 0 ifTrue:[
   376                             needSelectionChange := true.
   377 			selection := selection asOrderedCollection.
   377                         ]
   378 			selection replaceAllIdentical:oldMethod with:newMethod.
   378                     ].
   379 		    ].
   379                     methodList replaceAllIdentical:oldMethod with:newMethod.
   380 		    needSelectionChange == true ifTrue:[
   380                     lastSelectedMethods notNil ifTrue:[
   381 			selectionHolder changed.
   381                         lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
   382 		    ].
   382                     ].
   383 
   383                     selection size > 0 ifTrue:[
   384 		    "/ actually, could just change that single item ...
   384                         selection := selection asOrderedCollection.
   385 		    "/ ... might be cheaper, if list is huge.
   385                         selection replaceAllIdentical:oldMethod with:newMethod.
   386 		    "/ only update that methods entry
   386                     ].
   387 		    self updateListEntryFor:newMethod.    
   387                     needSelectionChange == true ifTrue:[
   388 		    "/ self invalidateList.
   388                         selectionHolder changed.
   389 		].
   389                     ].
   390 		^ self
   390 
   391 	    ].
   391                     "/ actually, could just change that single item ...
   392 
   392                     "/ ... might be cheaper, if list is huge.
   393 	    something == #projectOrganization ifTrue:[
   393                     "/ only update that methods entry
   394 		aParameter notNil ifTrue:[
   394                     self updateListEntryFor:newMethod.    
   395 		    cls := aParameter at:1.
   395                     "/ self invalidateList.
   396 		    cls notNil ifTrue:[
   396                 ].
   397 			((classes includesIdentical:cls theNonMetaclass)
   397                 ^ self
   398 			or:[(classes includesIdentical:cls theMetaclass)]) ifTrue:[
   398             ].
   399 			    self invalidateList.
   399 
   400 			].
   400             something == #projectOrganization ifTrue:[
   401 		    ].
   401                 aParameter notNil ifTrue:[
   402 		] ifFalse:[
   402                     cls := aParameter at:1.
   403 		    self invalidateList.
   403                     cls notNil ifTrue:[
   404 		].
   404                         ((classes includesIdentical:cls theNonMetaclass)
   405 		^ self
   405                         or:[(classes includesIdentical:cls theMetaclass)]) ifTrue:[
   406 	    ].
   406                             self invalidateList.
   407 	    "/ everything else is ignored
   407                         ].
   408 	    "/ self halt.
   408                     ].
   409 	].
   409                 ] ifFalse:[
   410 	^ self
   410                     self invalidateList.
       
   411                 ].
       
   412                 ^ self
       
   413             ].
       
   414             "/ everything else is ignored
       
   415             "/ self halt.
       
   416         ].
       
   417         ^ self
   411     ].
   418     ].
   412 
   419 
   413 "/    something == #organization ifTrue:[
   420 "/    something == #organization ifTrue:[
   414 "/self halt:'no longer'.
   421 "/self halt:'no longer'.
   415 "/^ self.
   422 "/^ self.
   476 "/        ].
   483 "/        ].
   477 "/        ^ self
   484 "/        ^ self
   478 "/    ].
   485 "/    ].
   479 
   486 
   480     changedObject == sortBy ifTrue:[
   487     changedObject == sortBy ifTrue:[
   481 	listValid ~~ true ifTrue:[  "/ could be nil
   488         listValid ~~ true ifTrue:[  "/ could be nil
   482 	    inGeneratorHolder value isNil ifTrue:[
   489             inGeneratorHolder value isNil ifTrue:[
   483 		"/ ok, no need to react on that one 
   490                 "/ ok, no need to react on that one 
   484 		"/ (will invalidate anyway, once I have more info at hand)
   491                 "/ (will invalidate anyway, once I have more info at hand)
   485 		^ self
   492                 ^ self
   486 	    ].
   493             ].
   487 	].
   494         ].
   488 	self invalidateList.
   495         self invalidateList.
   489 	^ self
   496         ^ self
   490     ].
   497     ].
   491 
   498 
   492     (changedObject == variableFilter
   499     (changedObject == variableFilter
   493     or:[changedObject == filterClassVars
   500     or:[changedObject == filterClassVars
   494     or:[changedObject == showMethodInheritance]]) ifTrue:[
   501     or:[changedObject == showMethodInheritance]]) ifTrue:[
   495 	self invalidateList.
   502         self invalidateList.
   496 	^  self
   503         ^  self
   497     ].
   504     ].
   498 
   505 
   499     changedObject == selectedMethodNameIndices ifTrue:[
   506     changedObject == selectedMethodNameIndices ifTrue:[
   500 	newSelection := self selectedMethodNameIndices value collect:[:idx | methodList at:idx].
   507         newSelection := self selectedMethodNameIndices value collect:[:idx | methodList at:idx].
   501 	newSelection ~= selection ifTrue:[
   508         newSelection ~= selection ifTrue:[
   502 	    selectionHolder value:newSelection.
   509             selectionHolder value:newSelection.
   503 	    lastSelectedMethods := newSelection.
   510             lastSelectedMethods := newSelection.
   504 	    lastSelectedMethods notNil ifTrue:[
   511             lastSelectedMethods notNil ifTrue:[
   505 		lastSelectedMethods := lastSelectedMethods asOrderedCollection
   512                 lastSelectedMethods := lastSelectedMethods asOrderedCollection
   506 	    ].
   513             ].
   507 	] ifFalse:[
   514         ] ifFalse:[
   508 	    "/ a reselect - force update
   515             "/ a reselect - force update
   509 "/            selection size == 1 ifTrue:[
   516 "/            selection size == 1 ifTrue:[
   510 		selectionHolder setValue:newSelection.
   517                 selectionHolder setValue:newSelection.
   511 		selectionHolder changed:#value.
   518                 selectionHolder changed:#value.
   512 "/            ].
   519 "/            ].
   513 	].
   520         ].
   514 	^ self 
   521         ^ self 
   515     ].
   522     ].
   516     changedObject == selectionHolder ifTrue:[
   523     changedObject == selectionHolder ifTrue:[
   517 	self selectedMethodsChanged.
   524         self selectedMethodsChanged.
   518 	lastSelectedMethods := selectionHolder value.
   525         lastSelectedMethods := selectionHolder value.
   519 	lastSelectedMethods notNil ifTrue:[
   526         lastSelectedMethods notNil ifTrue:[
   520 	    lastSelectedMethods := lastSelectedMethods asOrderedCollection
   527             lastSelectedMethods := lastSelectedMethods asOrderedCollection
   521 	].
   528         ].
   522 	^ self
   529         ^ self
   523     ].
   530     ].
   524 "/    something == #methodTrap ifTrue:[
   531 "/    something == #methodTrap ifTrue:[
   525 "/self halt:'no longer'.
   532 "/self halt:'no longer'.
   526 "/^ self.
   533 "/^ self.
   527 "/        (classes includesIdentical:changedObject) ifTrue:[
   534 "/        (classes includesIdentical:changedObject) ifTrue:[
   649         ].
   656         ].
   650         something isNil ifTrue:[
   657         something isNil ifTrue:[
   651             "/ self halt "/ huh - Smalltalk changed - so what ?
   658             "/ self halt "/ huh - Smalltalk changed - so what ?
   652             ^ self.
   659             ^ self.
   653         ].
   660         ].
       
   661 
   654         something == #classComment ifTrue:[
   662         something == #classComment ifTrue:[
   655             ^ self.
   663             ^ self.
   656         ].
   664         ].
   657         something == #classVariables ifTrue:[
   665         something == #classVariables ifTrue:[
   658             ^ self.
   666             ^ self.
   666         ].
   674         ].
   667         something == #classOrganization ifTrue:[
   675         something == #classOrganization ifTrue:[
   668             "/ ignore here - methodCategoryList will tell me if required
   676             "/ ignore here - methodCategoryList will tell me if required
   669             ^ self
   677             ^ self
   670         ].
   678         ].
   671         something == #methodTrap ifTrue:[
   679         (something == #methodTrap 
       
   680         or:[ something == #methodPrivacy ]) ifTrue:[
       
   681             self window shown ifFalse:[
       
   682                 changedObject removeDependent:self. "/ ?????
       
   683                 ^ self
       
   684             ].
   672             cls := aParameter at:1.
   685             cls := aParameter at:1.
   673             (classes includesIdentical:cls) ifFalse:[
   686             (classes includesIdentical:cls) ifFalse:[
   674                 ^ self
   687                 ^ self   "/ I dont care for that class
   675             ].
   688             ].
   676         ].
   689         ].
   677 
   690 
   678         classAndSelectorsRedefinedBySubclassesOfClass := nil.
   691         classAndSelectorsRedefinedBySubclassesOfClass := nil.
   679 
   692 
   720         (classes includesIdentical:cls) ifFalse:[
   733         (classes includesIdentical:cls) ifFalse:[
   721             ^ self   "/ I dont care for that class
   734             ^ self   "/ I dont care for that class
   722         ].
   735         ].
   723     ].
   736     ].
   724 
   737 
   725     something == #methodTrap ifTrue:[
       
   726         self window shown ifFalse:[
       
   727             changedObject removeDependent:self. "/ ?????
       
   728             ^ self
       
   729         ].
       
   730         cls := aParameter at:1.
       
   731         (classes includesIdentical:cls) ifFalse:[
       
   732             ^ self   "/ I dont care for that class
       
   733         ].
       
   734     ].
       
   735 
       
   736     super update:something with:aParameter from:changedObject
   738     super update:something with:aParameter from:changedObject
   737 ! !
   739 ! !
   738 
   740 
   739 !MethodList methodsFor:'private'!
   741 !MethodList methodsFor:'private'!
   740 
   742 
   741 listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst
   743 listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst
   742     "answer a method list entry 
   744     "answer a method list entry 
   743      gimmics: 
   745      gimmics: 
   744 	adding a little image to breakPointed methods,
   746         adding a little image to breakPointed methods,
   745 	inheritance indicators,
   747         inheritance indicators,
   746 	highlight accessors of variable"
   748         highlight accessors of variable"
   747 
   749 
   748     |clsName s icn variablesToHighlight classVarsToHighLight 
   750     |clsName s icn variablesToHighlight classVarsToHighLight 
   749      doHighLight doHighLightRed emp cat l redefIcon|
   751      doHighLight doHighLightRed emp cat l redefIcon|
   750 
   752 
   751     aMethod isAssociation ifTrue:[
   753     aMethod isAssociation ifTrue:[
   752 	self halt:'should not happen'.
   754         self halt:'should not happen'.
   753     ].
   755     ].
   754 
   756 
   755     s := aMethod printStringForBrowserWithSelector:selector inClass:cls.
   757     s := aMethod printStringForBrowserWithSelector:selector inClass:cls.
   756     showClassFirst ifTrue:[
   758     showClassFirst ifTrue:[
   757 	clsName := cls nameInBrowser.
   759         clsName := cls nameInBrowser.
   758 	s := clsName , ' ' , s allBold
   760         s := clsName , ' ' , s allBold
   759     ].
   761     ].
   760 
   762 
   761     "/
   763     "/
   762     "/ wrap icons (i.e. break- or trace points)
   764     "/ wrap icons (i.e. break- or trace points)
   763     "/ have higher prio ...
   765     "/ have higher prio ...
   764     "/
   766     "/
   765     aMethod isWrapped ifTrue:[
   767     aMethod isWrapped ifTrue:[
   766 	(s endsWith:' !!') ifTrue:[
   768         (s endsWith:' !!') ifTrue:[
   767 	    s := s copyWithoutLast:2
   769             s := s copyWithoutLast:2
   768 	].
   770         ].
   769 	aMethod isBreakpointed ifTrue:[
   771         aMethod isBreakpointed ifTrue:[
   770 	    icn := self stopIcon
   772             icn := self stopIcon
   771 	] ifFalse:[
   773         ] ifFalse:[
   772 	    aMethod isTimed ifTrue:[
   774             aMethod isTimed ifTrue:[
   773 		icn := self timeIcon
   775                 icn := self timeIcon
   774 	    ] ifFalse:[
   776             ] ifFalse:[
   775 		icn := self traceIcon
   777                 icn := self traceIcon
   776 	    ]
   778             ]
   777 	].
   779         ].
   778     ].
   780     ].
   779 
   781 
   780     icn isNil ifTrue:[
   782     icn isNil ifTrue:[
   781 	icn := self resourceIconForMethod:aMethod.
   783         icn := self resourceIconForMethod:aMethod.
   782 	icn isNil ifTrue:[
   784         icn isNil ifTrue:[
   783 	    aMethod isProtected ifTrue:[
   785             aMethod isProtected ifTrue:[
   784 		icn := self protectedMethodIcon
   786                 icn := self protectedMethodIcon
   785 	    ] ifFalse:[
   787             ] ifFalse:[
   786 		aMethod isPrivate ifTrue:[
   788                 aMethod isPrivate ifTrue:[
   787 		    icn := self privateMethodIcon
   789                     icn := self privateMethodIcon
   788 		] ifFalse:[
   790                 ] ifFalse:[
   789 		    (aMethod isJavaMethod and:[aMethod isAbstract]) ifTrue:[
   791                     (aMethod isIgnored) ifTrue:[
   790 			icn := self abstractMethodIcon
   792                         icn := self ignoredMethodIcon
   791 		    ]
   793                     ] ifFalse:[
   792 		]
   794                         (aMethod isJavaMethod and:[aMethod isAbstract]) ifTrue:[
   793 	    ].
   795                             icn := self abstractMethodIcon
   794 	].
   796                         ]
       
   797                     ]
       
   798                 ]
       
   799             ].
       
   800         ].
   795     ].
   801     ].
   796     icn isNil ifTrue:[
   802     icn isNil ifTrue:[
   797 	(selector startsWith:'test') ifTrue:[
   803         (selector startsWith:'test') ifTrue:[
   798 	    ((cls isSubclassOf:TestCase) 
   804             ((cls isSubclassOf:TestCase) 
   799 	    and:[cls isAbstract not]) ifTrue:[
   805             and:[cls isAbstract not]) ifTrue:[
   800 		cls lastTestRunResultOrNil == false ifTrue:[
   806                 cls lastTestRunResultOrNil == false ifTrue:[
   801 		    (cls testSelectorFailed:selector) ifTrue:[
   807                     (cls testSelectorFailed:selector) ifTrue:[
   802 			icn := SystemBrowser testCaseFailedIcon
   808                         icn := SystemBrowser testCaseFailedIcon
   803 		    ] ifFalse:[
   809                     ] ifFalse:[
   804 			"/ icn := SystemBrowser testCasePassedIcon
   810                         "/ icn := SystemBrowser testCasePassedIcon
   805 		    ].
   811                     ].
   806 		]
   812                 ]
   807 	    ].
   813             ].
   808 	]
   814         ]
   809     ].
   815     ].
   810 
   816 
   811     showClass ifTrue:[
   817     showClass ifTrue:[
   812 	showClassFirst ifFalse:[
   818         showClassFirst ifFalse:[
   813 	    s := s , ' [' , cls name allBold , ']'.
   819             s := s , ' [' , cls name allBold , ']'.
   814 	]
   820         ]
   815     ].
   821     ].
   816     showCategory ifTrue:[
   822     showCategory ifTrue:[
   817 	cat := aMethod category.
   823         cat := aMethod category.
   818 	cat notNil ifTrue:[
   824         cat notNil ifTrue:[
   819 	    s := s , ' {' , cat "asText allItalic" , '}'
   825             s := s , ' {' , cat "asText allItalic" , '}'
   820 	]
   826         ]
   821     ].
   827     ].
   822 
   828 
   823     variablesToHighlight := variableFilter value.
   829     variablesToHighlight := variableFilter value.
   824     variablesToHighlight size > 0 ifTrue:[
   830     variablesToHighlight size > 0 ifTrue:[
   825 	classVarsToHighLight := filterClassVars value.
   831         classVarsToHighLight := filterClassVars value.
   826 	classVarsToHighLight ifTrue:[
   832         classVarsToHighLight ifTrue:[
   827 	    doHighLight := self method:aMethod includesRefsToClassVariable:variablesToHighlight.
   833             doHighLight := self method:aMethod includesRefsToClassVariable:variablesToHighlight.
   828 	    doHighLight ifTrue:[
   834             doHighLight ifTrue:[
   829 		doHighLightRed := self method:aMethod includesModsOfClassVariable:variablesToHighlight.
   835                 doHighLightRed := self method:aMethod includesModsOfClassVariable:variablesToHighlight.
   830 	    ].
   836             ].
   831 	] ifFalse:[
   837         ] ifFalse:[
   832 	    doHighLight := self method:aMethod includesRefsToInstanceVariable:variablesToHighlight.
   838             doHighLight := self method:aMethod includesRefsToInstanceVariable:variablesToHighlight.
   833 	    doHighLight ifTrue:[
   839             doHighLight ifTrue:[
   834 		doHighLightRed := self method:aMethod includesModsOfInstanceVariable:variablesToHighlight
   840                 doHighLightRed := self method:aMethod includesModsOfInstanceVariable:variablesToHighlight
   835 	    ]
   841             ]
   836 	].
   842         ].
   837 	doHighLight ifTrue:[
   843         doHighLight ifTrue:[
   838 	    s := s allBold.
   844             s := s allBold.
   839 	    doHighLightRed ifTrue:[
   845             doHighLightRed ifTrue:[
   840 		emp := (UserPreferences current emphasisForWrittenVariable)
   846                 emp := (UserPreferences current emphasisForWrittenVariable)
   841 	    ] ifFalse:[
   847             ] ifFalse:[
   842 		emp := (UserPreferences current emphasisForReadVariable)
   848                 emp := (UserPreferences current emphasisForReadVariable)
   843 	    ].
   849             ].
   844 	    s := s emphasisAllAdd:emp
   850             s := s emphasisAllAdd:emp
   845 	]
   851         ]
   846     ].
   852     ].
   847 
   853 
   848     showMethodInheritance value ~~ false ifTrue:[
   854     showMethodInheritance value ~~ false ifTrue:[
   849 	redefIcon := self redefinedOrInheritedIconFor:aMethod.
   855         redefIcon := self redefinedOrInheritedIconFor:aMethod.
   850     ].
   856     ].
   851 
   857 
   852     (icn notNil or:[redefIcon notNil]) ifTrue:[
   858     (icn notNil or:[redefIcon notNil]) ifTrue:[
   853 	l := LabelAndIcon icon:redefIcon string:s.
   859         l := LabelAndIcon icon:redefIcon string:s.
   854 	l image:icn.
   860         l image:icn.
   855 	l gap:2.
   861         l gap:2.
   856 	^ l
   862         ^ l
   857     ].
   863     ].
   858     ^ s
   864     ^ s
   859 
   865 
   860     "Created: / 22.10.1996 / 19:51:00 / cg"
   866     "Created: / 22.10.1996 / 19:51:00 / cg"
   861     "Modified: / 31.10.2001 / 10:46:50 / cg"
   867     "Modified: / 31.10.2001 / 10:46:50 / cg"
  1410 ! !
  1416 ! !
  1411 
  1417 
  1412 !MethodList class methodsFor:'documentation'!
  1418 !MethodList class methodsFor:'documentation'!
  1413 
  1419 
  1414 version
  1420 version
  1415     ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.3 2004-05-27 14:29:01 cg Exp $'
  1421     ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.4 2004-09-10 10:15:34 cg Exp $'
  1416 ! !
  1422 ! !