--- a/NewSystemBrowser.st Tue Apr 27 15:57:08 2010 +0200
+++ b/NewSystemBrowser.st Tue Apr 27 16:16:02 2010 +0200
@@ -570,6 +570,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked1
@@ -628,6 +632,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked2
@@ -686,6 +694,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked3
@@ -744,6 +756,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked4
@@ -825,6 +841,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:05 / cg"
!
classDocumentationBrowserSpec
@@ -1184,6 +1202,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
@@ -1258,7 +1280,7 @@
)
)
- "Modified: / 1.3.2000 / 20:44:21 / cg"
+ "Modified: / 27-04-2010 / 16:11:13 / cg"
!
multipleCategoryBrowserSpec
@@ -1579,6 +1601,10 @@
#(#Array
#(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
+ #(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #classDoubleClicked
)
@@ -1623,6 +1649,10 @@
#(#Array
#(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
+ #(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
)
@@ -1694,6 +1724,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:22 / cg"
!
multipleClassWithInfoBrowserSpec
@@ -1926,6 +1958,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
@@ -2007,7 +2043,7 @@
)
)
- "Modified: / 1.3.2000 / 20:44:21 / cg"
+ "Modified: / 27-04-2010 / 16:11:30 / cg"
!
multipleMethodWithInfoBrowserSpec
@@ -2057,6 +2093,10 @@
#(#Array
#(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
+ #(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
)
@@ -2140,6 +2180,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:39 / cg"
!
multipleNameSpaceBrowserSpec
@@ -2716,6 +2758,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked1
@@ -2770,6 +2816,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked2
@@ -2824,6 +2874,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked3
@@ -2878,6 +2932,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked4
@@ -2955,6 +3013,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:54 / cg"
!
singleCategoryBrowserSpec
@@ -12869,6 +12929,18 @@
^ builder valueAspectFor:#showClassVarsInVariableList initialValue:false
!
+showCoverageInformation
+ |holder|
+
+ (holder := builder bindingAt:#showCoverageInformation) isNil ifTrue:[
+ holder := false asValue.
+ builder aspectAt:#showCoverageInformation put: holder.
+ ].
+ ^ holder
+
+ "Created: / 27-04-2010 / 16:02:49 / cg"
+!
+
showMethodComplexity
|holder|
@@ -33073,6 +33145,77 @@
^ self spawnMethodSendersBrowserFor:(Array with:aSelector) in:#newBuffer
!
+spawnCallersBrowser
+ "browse callers of the selected method(s)"
+
+ ^ self spawnCallersIn:#newBrowser
+
+ "Created: / 27-04-2010 / 15:09:20 / cg"
+!
+
+spawnCallersBrowserFor:aMethodCollection in:openHow
+ "open a new browser or add a buffer showing the selected method's callers"
+
+ |label|
+
+ self withSearchCursorDo:[
+ |cachedList newBrowser searchBlock|
+
+ aMethodCollection size == 1 ifTrue:[
+ label := resources string:('Callers of %1') with:aMethodCollection first whoString allBold.
+ ] ifFalse:[
+ label := resources string:'Callers of Any'.
+ ].
+
+ searchBlock := [
+ |l|
+
+ cachedList notNil ifTrue:[
+ l := cachedList.
+ cachedList := nil
+ ] ifFalse:[
+ l := IdentitySet new.
+ aMethodCollection do:[:eachCalledMethod |
+ |info|
+
+ info := eachCalledMethod methodInvocationInfo.
+ info notNil ifTrue:[
+ info callingMethodsDo:[:caller |
+ l add:caller
+ ]
+ ]
+ ].
+ l := l asOrderedCollection
+ ].
+ l
+ ].
+
+ newBrowser := self
+ spawnMethodBrowserForSearch:searchBlock
+ sortBy:#class
+ in:openHow
+ label:label.
+ ]
+
+ "Created: / 27-04-2010 / 15:16:40 / cg"
+!
+
+spawnCallersBuffer
+ "browse callers of the selected method(s)"
+
+ ^ self spawnCallersIn:#newBuffer
+
+ "Created: / 27-04-2010 / 15:09:02 / cg"
+!
+
+spawnCallersIn:openHow
+ "open a new browser or add a buffer showing the selected method's callers"
+
+ self spawnCallersBrowserFor:(self selectedMethods value) in:openHow
+
+ "Created: / 27-04-2010 / 15:17:33 / cg"
+!
+
spawnImplementorChainBrowser
"browse implementations chain"
@@ -35697,7 +35840,27 @@
"Modified: / 05-09-2006 / 10:33:05 / cg"
!
-messagesMenuFor:actionSelector withSenderChain:withSenderChain withImplementorChain:withImplementorChain withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors selfSendsOnly:selfSendsOnly
+messagesMenuFor:actionSelector
+ withSenderChain:withSenderChain withImplementorChain:withImplementorChain
+ withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors
+ selfSendsOnly:selfSendsOnly
+
+ ^ self
+ messagesMenuFor:actionSelector
+ withSenderChain:withSenderChain withImplementorChain:withImplementorChain
+ withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors
+ withCallersOfThisMethod:true "false" withMethodsCalledByThisMethod:false
+ selfSendsOnly:selfSendsOnly
+
+ "Modified: / 27-04-2010 / 15:07:13 / cg"
+!
+
+messagesMenuFor:actionSelector
+ withSenderChain:withSenderChain withImplementorChain:withImplementorChain
+ withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors
+ withCallersOfThisMethod:withCallersOfThisMethod withMethodsCalledByThisMethod:withMethodsCalledByThisMethod
+ selfSendsOnly:selfSendsOnly
+
<resource: #programMenu >
|m mthd mSel contractedSelector item l cut methods allMessagesSent|
@@ -35742,8 +35905,13 @@
item value:#spawnSenderChainBuffer.
m addItem:item.
].
+ (withCallersOfThisMethod and:[mthd isInstrumented]) ifTrue:[
+ item := MenuItem label:(resources string:'Callers of this %1' with:contractedSelector).
+ item value:#spawnCallersBuffer.
+ m addItem:item.
+ ].
+
withLocalImplementors ifTrue:[
- "/ item := MenuItem label:(resources string:' %1 - Local Implementors' with:contractedSelector).
item := MenuItem label:(resources string:'Local Implementors of %1' with:contractedSelector).
item value:#spawnLocalImplementorsBuffer.
m addItem:item.
@@ -35753,6 +35921,11 @@
item value:#spawnImplementorChainBuffer.
m addItem:item.
].
+ withMethodsCalledByThisMethod ifTrue:[
+ item := MenuItem label:(resources string:'Methods Called by this %1' with:contractedSelector).
+ item value:#spawnMethodsCalledByBuffer.
+ m addItem:item.
+ ].
selfSendsOnly ifTrue:[
l := mthd messagesSentToSelf.
@@ -35835,7 +36008,7 @@
^ m
- "Created: / 05-09-2006 / 10:32:43 / cg"
+ "Created: / 27-04-2010 / 15:05:52 / cg"
!
operationsMenu
@@ -44080,11 +44253,11 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1451 2010-04-27 12:27:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1452 2010-04-27 14:16:02 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1451 2010-04-27 12:27:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1452 2010-04-27 14:16:02 cg Exp $'
! !
NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st Tue Apr 27 15:57:08 2010 +0200
+++ b/Tools__NewSystemBrowser.st Tue Apr 27 16:16:02 2010 +0200
@@ -570,6 +570,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked1
@@ -628,6 +632,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked2
@@ -686,6 +694,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked3
@@ -744,6 +756,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked4
@@ -825,6 +841,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:05 / cg"
!
classDocumentationBrowserSpec
@@ -1184,6 +1202,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
@@ -1258,7 +1280,7 @@
)
)
- "Modified: / 1.3.2000 / 20:44:21 / cg"
+ "Modified: / 27-04-2010 / 16:11:13 / cg"
!
multipleCategoryBrowserSpec
@@ -1579,6 +1601,10 @@
#(#Array
#(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
+ #(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #classDoubleClicked
)
@@ -1623,6 +1649,10 @@
#(#Array
#(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
+ #(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
)
@@ -1694,6 +1724,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:22 / cg"
!
multipleClassWithInfoBrowserSpec
@@ -1926,6 +1958,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
@@ -2007,7 +2043,7 @@
)
)
- "Modified: / 1.3.2000 / 20:44:21 / cg"
+ "Modified: / 27-04-2010 / 16:11:30 / cg"
!
multipleMethodWithInfoBrowserSpec
@@ -2057,6 +2093,10 @@
#(#Array
#(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
+ #(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked
)
@@ -2140,6 +2180,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:39 / cg"
!
multipleNameSpaceBrowserSpec
@@ -2716,6 +2758,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked1
@@ -2770,6 +2816,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked2
@@ -2824,6 +2874,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked3
@@ -2878,6 +2932,10 @@
#subAspectHolders:
#(#Array
+ #(#SubChannelInfoSpec
+ #subAspect: #showCoverageInformation
+ #callBack: #showCoverageInformation
+ )
#(#SubChannelInfoSpec
#subAspect: #doubleClickChannel
#callBack: #methodDoubleClicked4
@@ -2955,6 +3013,8 @@
)
)
+
+ "Modified: / 27-04-2010 / 16:11:54 / cg"
!
singleCategoryBrowserSpec
@@ -12869,6 +12929,18 @@
^ builder valueAspectFor:#showClassVarsInVariableList initialValue:false
!
+showCoverageInformation
+ |holder|
+
+ (holder := builder bindingAt:#showCoverageInformation) isNil ifTrue:[
+ holder := false asValue.
+ builder aspectAt:#showCoverageInformation put: holder.
+ ].
+ ^ holder
+
+ "Created: / 27-04-2010 / 16:02:49 / cg"
+!
+
showMethodComplexity
|holder|
@@ -33073,6 +33145,77 @@
^ self spawnMethodSendersBrowserFor:(Array with:aSelector) in:#newBuffer
!
+spawnCallersBrowser
+ "browse callers of the selected method(s)"
+
+ ^ self spawnCallersIn:#newBrowser
+
+ "Created: / 27-04-2010 / 15:09:20 / cg"
+!
+
+spawnCallersBrowserFor:aMethodCollection in:openHow
+ "open a new browser or add a buffer showing the selected method's callers"
+
+ |label|
+
+ self withSearchCursorDo:[
+ |cachedList newBrowser searchBlock|
+
+ aMethodCollection size == 1 ifTrue:[
+ label := resources string:('Callers of %1') with:aMethodCollection first whoString allBold.
+ ] ifFalse:[
+ label := resources string:'Callers of Any'.
+ ].
+
+ searchBlock := [
+ |l|
+
+ cachedList notNil ifTrue:[
+ l := cachedList.
+ cachedList := nil
+ ] ifFalse:[
+ l := IdentitySet new.
+ aMethodCollection do:[:eachCalledMethod |
+ |info|
+
+ info := eachCalledMethod methodInvocationInfo.
+ info notNil ifTrue:[
+ info callingMethodsDo:[:caller |
+ l add:caller
+ ]
+ ]
+ ].
+ l := l asOrderedCollection
+ ].
+ l
+ ].
+
+ newBrowser := self
+ spawnMethodBrowserForSearch:searchBlock
+ sortBy:#class
+ in:openHow
+ label:label.
+ ]
+
+ "Created: / 27-04-2010 / 15:16:40 / cg"
+!
+
+spawnCallersBuffer
+ "browse callers of the selected method(s)"
+
+ ^ self spawnCallersIn:#newBuffer
+
+ "Created: / 27-04-2010 / 15:09:02 / cg"
+!
+
+spawnCallersIn:openHow
+ "open a new browser or add a buffer showing the selected method's callers"
+
+ self spawnCallersBrowserFor:(self selectedMethods value) in:openHow
+
+ "Created: / 27-04-2010 / 15:17:33 / cg"
+!
+
spawnImplementorChainBrowser
"browse implementations chain"
@@ -35697,7 +35840,27 @@
"Modified: / 05-09-2006 / 10:33:05 / cg"
!
-messagesMenuFor:actionSelector withSenderChain:withSenderChain withImplementorChain:withImplementorChain withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors selfSendsOnly:selfSendsOnly
+messagesMenuFor:actionSelector
+ withSenderChain:withSenderChain withImplementorChain:withImplementorChain
+ withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors
+ selfSendsOnly:selfSendsOnly
+
+ ^ self
+ messagesMenuFor:actionSelector
+ withSenderChain:withSenderChain withImplementorChain:withImplementorChain
+ withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors
+ withCallersOfThisMethod:true "false" withMethodsCalledByThisMethod:false
+ selfSendsOnly:selfSendsOnly
+
+ "Modified: / 27-04-2010 / 15:07:13 / cg"
+!
+
+messagesMenuFor:actionSelector
+ withSenderChain:withSenderChain withImplementorChain:withImplementorChain
+ withLocalSenders:withLocalSenders withLocalImplementors:withLocalImplementors
+ withCallersOfThisMethod:withCallersOfThisMethod withMethodsCalledByThisMethod:withMethodsCalledByThisMethod
+ selfSendsOnly:selfSendsOnly
+
<resource: #programMenu >
|m mthd mSel contractedSelector item l cut methods allMessagesSent|
@@ -35742,8 +35905,13 @@
item value:#spawnSenderChainBuffer.
m addItem:item.
].
+ (withCallersOfThisMethod and:[mthd isInstrumented]) ifTrue:[
+ item := MenuItem label:(resources string:'Callers of this %1' with:contractedSelector).
+ item value:#spawnCallersBuffer.
+ m addItem:item.
+ ].
+
withLocalImplementors ifTrue:[
- "/ item := MenuItem label:(resources string:' %1 - Local Implementors' with:contractedSelector).
item := MenuItem label:(resources string:'Local Implementors of %1' with:contractedSelector).
item value:#spawnLocalImplementorsBuffer.
m addItem:item.
@@ -35753,6 +35921,11 @@
item value:#spawnImplementorChainBuffer.
m addItem:item.
].
+ withMethodsCalledByThisMethod ifTrue:[
+ item := MenuItem label:(resources string:'Methods Called by this %1' with:contractedSelector).
+ item value:#spawnMethodsCalledByBuffer.
+ m addItem:item.
+ ].
selfSendsOnly ifTrue:[
l := mthd messagesSentToSelf.
@@ -35835,7 +36008,7 @@
^ m
- "Created: / 05-09-2006 / 10:32:43 / cg"
+ "Created: / 27-04-2010 / 15:05:52 / cg"
!
operationsMenu
@@ -44080,11 +44253,11 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1451 2010-04-27 12:27:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1452 2010-04-27 14:16:02 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1451 2010-04-27 12:27:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1452 2010-04-27 14:16:02 cg Exp $'
! !
NewSystemBrowser initialize!