4105 ! |
4105 ! |
4106 |
4106 |
4107 browseBlocksHome |
4107 browseBlocksHome |
4108 "browse the receiver block's home method (if a value-like send is selected)" |
4108 "browse the receiver block's home method (if a value-like send is selected)" |
4109 |
4109 |
4110 |cls sel block| |
4110 |cls sel block mthd| |
4111 |
4111 |
4112 selectedContext isNil ifTrue:[^ self]. |
4112 selectedContext isNil ifTrue:[^ self]. |
4113 (block := selectedContext receiver) isBlock ifFalse:[ ^ self ]. |
4113 (block := selectedContext receiver) isBlock ifFalse:[ ^ self ]. |
4114 |
4114 |
4115 cls := block method mclass. |
4115 mthd := block method. |
4116 sel := block method selector. |
4116 cls := mthd mclass. |
4117 |
4117 sel := mthd selector. |
4118 (cls includesSelector:sel) ifFalse:[ |
4118 |
4119 sel := nil |
4119 (cls notNil and:[(cls includesSelector:sel)]) ifTrue:[ |
4120 ]. |
4120 cls browserClass openInClass:cls selector:sel. |
4121 cls browserClass openInClass:cls selector:sel. |
4121 ^ self |
|
4122 ]. |
|
4123 |
|
4124 mthd source notEmptyOrNil ifTrue:[ |
|
4125 (Dialog confirm:'Block''s home method is (no longer) present in any class.\Do you want to browse the method instead?' withCRs) |
|
4126 ifTrue:[ |
|
4127 UserPreferences current systemBrowserClass |
|
4128 browseMethods:{ mthd } title:'Unbound Method' sort:false |
|
4129 "/ TextView openWith:mthd source title:'Unbound Method''s Source'. |
|
4130 ]. |
|
4131 ^ self |
|
4132 ]. |
|
4133 cls notNil ifTrue:[ |
|
4134 (Dialog confirm:'Block''s home method is (no longer) present in any class and no source can be shown.\Do you want to browse the method''s last class instead?' withCRs) |
|
4135 ifTrue:[ |
|
4136 cls browserClass openInClass:cls selector:nil. |
|
4137 ]. |
|
4138 ^ self |
|
4139 ]. |
|
4140 Dialog information:'Block''s home method is (no longer) present in any class.'. |
4122 ! |
4141 ! |
4123 |
4142 |
4124 browseClass |
4143 browseClass |
4125 "browse the receiver's class (of the selected context's message)" |
4144 "browse the receiver's class (of the selected context's message)" |
4126 |
4145 |
8866 ! ! |
8885 ! ! |
8867 |
8886 |
8868 !DebugView class methodsFor:'documentation'! |
8887 !DebugView class methodsFor:'documentation'! |
8869 |
8888 |
8870 version |
8889 version |
8871 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.624 2013-08-29 23:58:12 cg Exp $' |
8890 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.625 2013-08-30 12:37:02 cg Exp $' |
8872 ! |
8891 ! |
8873 |
8892 |
8874 version_CVS |
8893 version_CVS |
8875 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.624 2013-08-29 23:58:12 cg Exp $' |
8894 ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.625 2013-08-30 12:37:02 cg Exp $' |
8876 ! |
8895 ! |
8877 |
8896 |
8878 version_SVN |
8897 version_SVN |
8879 ^ '$Id: DebugView.st,v 1.624 2013-08-29 23:58:12 cg Exp $' |
8898 ^ '$Id: DebugView.st,v 1.625 2013-08-30 12:37:02 cg Exp $' |
8880 ! ! |
8899 ! ! |
8881 |
8900 |
8882 |
8901 |
8883 DebugView initialize! |
8902 DebugView initialize! |