--- a/Tools__MethodList.st Mon Jun 06 11:47:44 2016 +0200
+++ b/Tools__MethodList.st Mon Jun 06 11:47:48 2016 +0200
@@ -375,182 +375,182 @@
selection := selectionHolder value.
changedObject == environment ifTrue:[
- classes notNil ifTrue:[
- something == #classDefinition ifTrue:[
- cls := aParameter.
- clsName := cls name.
- (classes contains:[:aClass | aClass name = clsName]) ifFalse:[
- ^ self "/ I don't care for that class
- ].
- classes := classes collect:[:eachClass | (environment classNamed:eachClass name) ].
- self invalidateList.
+ classes notNil ifTrue:[
+ something == #classDefinition ifTrue:[
+ cls := aParameter.
+ clsName := cls name.
+ (classes contains:[:aClass | aClass name = clsName]) ifFalse:[
+ ^ self "/ I don't care for that class
+ ].
+ classes := classes collect:[:eachClass | (environment classNamed:eachClass name) ].
+ self invalidateList.
"/ self updateList.
- ^ self.
- ].
+ ^ self.
+ ].
- something == #methodCategory ifTrue:[
- "/ ignore here - methodCategoryList will tell me if required
- ^ self
- ].
- (something == #classOrganization
- or:[ something == #methodCategoryAdded
- or:[ something == #methodCategoryRemoved
- or:[ something == #methodCategoriesRemoved
- or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[
- "/ ignore here - methodCategoryList will tell me if required
- ^ self
- ].
+ something == #methodCategory ifTrue:[
+ "/ ignore here - methodCategoryList will tell me if required
+ ^ self
+ ].
+ (something == #classOrganization
+ or:[ something == #methodCategoryAdded
+ or:[ something == #methodCategoryRemoved
+ or:[ something == #methodCategoriesRemoved
+ or:[ something == #methodCategoryRenamed ]]]]) ifTrue:[
+ "/ ignore here - methodCategoryList will tell me if required
+ ^ self
+ ].
- (something == #methodInClass
- or:[something == #methodCoverageInfo]) ifTrue:[
- "/ a method has been added/changed
- cls := aParameter at:1.
- (classes includesIdentical:cls) ifTrue:[
- sel := aParameter at:2.
- oldMethod := aParameter at:3.
- newMethod := cls compiledMethodAt:sel.
- (oldMethod notNil and:[newMethod notNil]) ifTrue:[
- "a method was changed & acccepted;
- No need for a rescan of the methodDictionary;
- however, ensure that the refs to the old method are updated
- "
- methods := selection.
- methods size > 0 ifTrue:[
- (methods includesIdentical:oldMethod) ifTrue:[
- needSelectionChange := true.
- ]
- ].
- methodList replaceAllIdentical:oldMethod with:newMethod.
- lastSelectedMethods notNil ifTrue:[
- lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
- ].
- methods size > 0 ifTrue:[
- methods := methods asOrderedCollection.
- methods replaceAllIdentical:oldMethod with:newMethod.
- ].
+ (something == #methodInClass
+ or:[something == #methodCoverageInfo]) ifTrue:[
+ "/ a method has been added/changed
+ cls := aParameter at:1.
+ (classes includesIdentical:cls) ifTrue:[
+ sel := aParameter at:2.
+ oldMethod := aParameter at:3.
+ newMethod := cls compiledMethodAt:sel.
+ (oldMethod notNil and:[newMethod notNil]) ifTrue:[
+ "a method was changed & accepted;
+ No need for a rescan of the methodDictionary;
+ however, ensure that the refs to the old method are updated
+ "
+ methods := selection.
+ methods size > 0 ifTrue:[
+ (methods includesIdentical:oldMethod) ifTrue:[
+ needSelectionChange := true.
+ ]
+ ].
+ methodList replaceAllIdentical:oldMethod with:newMethod.
+ lastSelectedMethods notNil ifTrue:[
+ lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
+ ].
+ methods size > 0 ifTrue:[
+ methods := methods asOrderedCollection.
+ methods replaceAllIdentical:oldMethod with:newMethod.
+ ].
- needSelectionChange == true ifTrue:[
- selectionHolder setValue:methods.
- "/ self enqueueDelayedMethodsSelectionChanged.
- "/ need this to inform my browser that method was changed
- "/ by someone else.
- selectionHolder changed.
- ].
- "/JV@2011-07-22: Update always - I need to see immediately that
- "/the method has changed. Also, add/remove breakpoint etc.
+ needSelectionChange == true ifTrue:[
+ selectionHolder setValue:methods.
+ "/ self enqueueDelayedMethodsSelectionChanged.
+ "/ need this to inform my browser that method was changed
+ "/ by someone else.
+ selectionHolder changed.
+ ].
+ "/JV@2011-07-22: Update always - I need to see immediately that
+ "/the method has changed. Also, add/remove breakpoint etc.
"/ (variableFilter value size > 0
"/ or:[oldMethod package ~= newMethod package
"/ or:[oldMethod resources ~= newMethod resources
"/ or:[showMethodComplexity value == true]]])
- self autoUpdateOnChange ifTrue:[
- "/ only update that method's entry
- self updateListEntryFor:newMethod.
- "/ sigh - must invalidate
- "/ self invalidateList.
- ].
- ^ self.
- ].
- "/ method was added - update the methodList
- "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
- self invalidateList.
- ].
- ^ self.
- ].
+ self autoUpdateOnChange ifTrue:[
+ "/ only update that method's entry
+ self updateListEntryFor:newMethod.
+ "/ sigh - must invalidate
+ "/ self invalidateList.
+ ].
+ ^ self.
+ ].
+ "/ method was added - update the methodList
+ "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
+ self invalidateList.
+ ].
+ ^ self.
+ ].
- something == #methodInClassRemoved ifTrue:[
- cls := aParameter at:1.
- (classes includesIdentical:cls) ifTrue:[
- sel := aParameter at:2.
- "/ method was removed - update the methodList
- "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
- self invalidateList.
- ].
- ^ self.
- ].
+ something == #methodInClassRemoved ifTrue:[
+ cls := aParameter at:1.
+ (classes includesIdentical:cls) ifTrue:[
+ sel := aParameter at:2.
+ "/ method was removed - update the methodList
+ "/ Q: is this needed (methodCategoryList should send me a new inGenerator)
+ self invalidateList.
+ ].
+ ^ self.
+ ].
- something == #methodCoverageInfo ifTrue:[
- "/ already checked if it is one of my classes
- self updateListEntryFor:aParameter.
+ something == #methodCoverageInfo ifTrue:[
+ "/ already checked if it is one of my classes
+ self updateListEntryFor:aParameter.
"/ self enqueueDelayedUpdateList.
"/ listValid == true ifTrue:[
"/ self invalidateList.
"/ ].
- ^ self.
- ].
+ ^ self.
+ ].
- (something == #methodTrap
- or:[ something == #lastTestRunResult
- or:[ something == #privacyOfMethod ]]) ifTrue:[
- cls := aParameter at:1.
- sel := aParameter at:2.
- (classes includesIdentical:cls) ifFalse:[ ^ self].
+ (something == #methodTrap
+ or:[ something == #lastTestRunResult
+ or:[ something == #privacyOfMethod ]]) ifTrue:[
+ cls := aParameter at:1.
+ sel := aParameter at:2.
+ (classes includesIdentical:cls) ifFalse:[ ^ self].
- newMethod := cls compiledMethodAt:sel.
- newMethod isNil ifTrue:[
- self invalidateList.
- ^ self
- ].
+ newMethod := cls compiledMethodAt:sel.
+ newMethod isNil ifTrue:[
+ self invalidateList.
+ ^ self
+ ].
- ((something == #privacyOfMethod) or:[something == #lastTestRunResult]) ifTrue:[
- self updateListEntryFor:newMethod.
- ].
+ ((something == #privacyOfMethod) or:[something == #lastTestRunResult]) ifTrue:[
+ self updateListEntryFor:newMethod.
+ ].
- (something == #methodTrap) ifTrue:[
- newMethod isWrapped ifTrue:[
- oldMethod := newMethod originalMethod
- ] ifFalse:[
- selection size > 0 ifTrue:[
- oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil.
- ]
- ].
+ (something == #methodTrap) ifTrue:[
+ newMethod isWrapped ifTrue:[
+ oldMethod := newMethod originalMethod
+ ] ifFalse:[
+ selection size > 0 ifTrue:[
+ oldMethod := selection detect:[:each | each isWrapped and:[each originalMethod == newMethod]] ifNone:nil.
+ ]
+ ].
- selection size > 0 ifTrue:[
- (selection includesIdentical:oldMethod) ifTrue:[
- needSelectionChange := true.
- ]
- ].
- methodList replaceAllIdentical:oldMethod with:newMethod.
- lastSelectedMethods notNil ifTrue:[
- lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
- ].
- selection size > 0 ifTrue:[
- selection := selection asOrderedCollection.
- selection replaceAllIdentical:oldMethod with:newMethod.
- ].
- needSelectionChange == true ifTrue:[
- selectionHolder changed.
- ].
+ selection size > 0 ifTrue:[
+ (selection includesIdentical:oldMethod) ifTrue:[
+ needSelectionChange := true.
+ ]
+ ].
+ methodList replaceAllIdentical:oldMethod with:newMethod.
+ lastSelectedMethods notNil ifTrue:[
+ lastSelectedMethods replaceAllIdentical:oldMethod with:newMethod
+ ].
+ selection size > 0 ifTrue:[
+ selection := selection asOrderedCollection.
+ selection replaceAllIdentical:oldMethod with:newMethod.
+ ].
+ needSelectionChange == true ifTrue:[
+ selectionHolder changed.
+ ].
- "/ actually, could just change that single item ...
- "/ ... might be cheaper, if list is huge.
- "/ only update that methods entry
- self updateListEntryFor:newMethod.
- "/ self invalidateList.
- ].
- ^ self
- ].
+ "/ actually, could just change that single item ...
+ "/ ... might be cheaper, if list is huge.
+ "/ only update that methods entry
+ self updateListEntryFor:newMethod.
+ "/ self invalidateList.
+ ].
+ ^ self
+ ].
- (something == #projectOrganization
- or:[something == #lastTestRunResult]) ifTrue:[
- aParameter notNil ifTrue:[
- cls := aParameter at:1.
- cls notNil ifTrue:[
- ((classes includesIdentical:cls theNonMetaclass)
- or:[(classes includesIdentical:cls theMetaclass)]) ifTrue:[
- self invalidateList.
- ].
- ].
- ] ifFalse:[
- self invalidateList.
- ].
- ^ self
- ].
+ (something == #projectOrganization
+ or:[something == #lastTestRunResult]) ifTrue:[
+ aParameter notNil ifTrue:[
+ cls := aParameter at:1.
+ cls notNil ifTrue:[
+ ((classes includesIdentical:cls theNonMetaclass)
+ or:[(classes includesIdentical:cls theMetaclass)]) ifTrue:[
+ self invalidateList.
+ ].
+ ].
+ ] ifFalse:[
+ self invalidateList.
+ ].
+ ^ self
+ ].
- "/ everything else is ignored
- "/ self halt.
- ].
- ^ self
+ "/ everything else is ignored
+ "/ self halt.
+ ].
+ ^ self
].
"/ something == #organization ifTrue:[
@@ -581,7 +581,7 @@
"/ oldMethod := aParameter at:2.
"/ newMethod := changedObject compiledMethodAt:sel.
"/ oldMethod notNil ifTrue:[
-"/ "a method was changed & acccepted;
+"/ "a method was changed & accepted;
"/ No need for a rescan of the methodDictionary;
"/ however, ensure that the refs to the old method are updated
"/ "
@@ -621,15 +621,15 @@
"/ ].
changedObject == sortBy ifTrue:[
- listValid ~~ true ifTrue:[ "/ could be nil
- inGeneratorHolder value isNil ifTrue:[
- "/ ok, no need to react on that one
- "/ (will invalidate anyway, once I have more info at hand)
- ^ self
- ].
- ].
- self invalidateList.
- ^ self
+ listValid ~~ true ifTrue:[ "/ could be nil
+ inGeneratorHolder value isNil ifTrue:[
+ "/ ok, no need to react on that one
+ "/ (will invalidate anyway, once I have more info at hand)
+ ^ self
+ ].
+ ].
+ self invalidateList.
+ ^ self
].
(changedObject == variableFilter
@@ -638,34 +638,34 @@
or:[changedObject == showMethodComplexity
or:[changedObject == showSyntheticMethods
]]]]) ifTrue:[
- self invalidateList.
- ^ self
+ self invalidateList.
+ ^ self
].
changedObject == selectedMethodNameIndices ifTrue:[
- newSelection := self selectedMethodNameIndices value collect:[:idx | methodList at:idx].
- newSelection ~= selection ifTrue:[
- selectionHolder value:newSelection.
- lastSelectedMethods := newSelection.
- lastSelectedMethods notNil ifTrue:[
- lastSelectedMethods := lastSelectedMethods asOrderedCollection
- ].
- ] ifFalse:[
- "/ a reselect - force update
+ newSelection := self selectedMethodNameIndices value collect:[:idx | methodList at:idx].
+ newSelection ~= selection ifTrue:[
+ selectionHolder value:newSelection.
+ lastSelectedMethods := newSelection.
+ lastSelectedMethods notNil ifTrue:[
+ lastSelectedMethods := lastSelectedMethods asOrderedCollection
+ ].
+ ] ifFalse:[
+ "/ a reselect - force update
"/ selection size == 1 ifTrue:[
- selectionHolder setValue:newSelection.
- selectionHolder changed:#value.
+ selectionHolder setValue:newSelection.
+ selectionHolder changed:#value.
"/ ].
- ].
- ^ self
+ ].
+ ^ self
].
changedObject == selectionHolder ifTrue:[
- self selectedMethodsChanged.
- lastSelectedMethods := selectionHolder value.
- lastSelectedMethods notNil ifTrue:[
- lastSelectedMethods := lastSelectedMethods asOrderedCollection
- ].
- ^ self
+ self selectedMethodsChanged.
+ lastSelectedMethods := selectionHolder value.
+ lastSelectedMethods notNil ifTrue:[
+ lastSelectedMethods := lastSelectedMethods asOrderedCollection
+ ].
+ ^ self
].
"/ something == #methodTrap ifTrue:[
"/self halt:'no longer'.