DebugView.st
changeset 945 bbda9364e4c8
parent 944 680cc407240d
child 949 cf980155a791
equal deleted inserted replaced
944:680cc407240d 945:bbda9364e4c8
  2953      Also sent to autoselect an interesting context on entry."
  2953      Also sent to autoselect an interesting context on entry."
  2954 
  2954 
  2955     |con homeContext sel method code canAccept
  2955     |con homeContext sel method code canAccept
  2956      implementorClass lineNrInMethod rec m line
  2956      implementorClass lineNrInMethod rec m line
  2957      sender selSender tryVars possibleBlocks errMsg 
  2957      sender selSender tryVars possibleBlocks errMsg 
  2958      mthd cls|
  2958      mthd cls codeSet|
  2959 
  2959 
  2960     contextArray notNil ifTrue:[
  2960     contextArray notNil ifTrue:[
  2961         lineNr <= contextArray size ifTrue:[
  2961         lineNr <= contextArray size ifTrue:[
  2962             con := contextArray at:lineNr.
  2962             con := contextArray at:lineNr.
  2963         ].
  2963         ].
  2976                 ^ self
  2976                 ^ self
  2977             ].
  2977             ].
  2978         ].
  2978         ].
  2979 
  2979 
  2980         self withWaitCursorDo:[
  2980         self withWaitCursorDo:[
       
  2981             codeSet := false.
       
  2982 
  2981             "
  2983             "
  2982              give it to the (lower right) inspector
  2984              give it to the (lower right) inspector
  2983             "
  2985             "
  2984             contextInspector inspect:con.
  2986             contextInspector inspect:con.
  2985 
  2987 
  3111                     code isNil ifTrue:[
  3113                     code isNil ifTrue:[
  3112                         method sourceFilename notNil ifTrue:[
  3114                         method sourceFilename notNil ifTrue:[
  3113                             codeView contents:(resources 
  3115                             codeView contents:(resources 
  3114                                                        string:'** no sourcefile: %1 **'
  3116                                                        string:'** no sourcefile: %1 **'
  3115                                                        with:method sourceFilename).
  3117                                                        with:method sourceFilename).
  3116                             codeView flash
  3118                             codeView flash.
       
  3119                             codeSet := true.
  3117                         ] ifFalse:[
  3120                         ] ifFalse:[
  3118                             errMsg := '** no source **'
  3121                             errMsg := '** no source **'
  3119                         ]
  3122                         ]
  3120                     ]
  3123                     ]
  3121                 ] ifFalse:[
  3124                 ] ifFalse:[
  3124                     ] ifFalse:[
  3127                     ] ifFalse:[
  3125                         errMsg := '** no method - no source **'
  3128                         errMsg := '** no method - no source **'
  3126                     ]
  3129                     ]
  3127                 ].
  3130                 ].
  3128                 errMsg notNil ifTrue:[
  3131                 errMsg notNil ifTrue:[
  3129                    self showError:errMsg
  3132                    self showError:errMsg.
       
  3133                    codeSet := true.
  3130                 ]
  3134                 ]
  3131             ].
  3135             ].
  3132 
  3136 
  3133             code isNil ifTrue:[
  3137             code isNil ifTrue:[
  3134                 canAccept := false.
  3138                 canAccept := false.
  3135                 codeView contents:nil.
  3139                 codeSet ifFalse:[
       
  3140                     codeView contents:nil.
       
  3141                 ]
  3136             ] ifFalse:[
  3142             ] ifFalse:[
  3137                 codeView contents:code.
  3143                 codeView contents:code.
  3138 
  3144 
  3139                 (lineNrInMethod notNil and:[lineNrInMethod ~~ 0]) ifTrue:[
  3145                 (lineNrInMethod notNil and:[lineNrInMethod ~~ 0]) ifTrue:[
  3140 "/                    lineNrInMethod > codeView list size ifTrue:[
  3146 "/                    lineNrInMethod > codeView list size ifTrue:[
  3224         ] ifFalse:[
  3230         ] ifFalse:[
  3225             m disableAll:#(browse browseClass browseClassHierarchy browseFullClassProtocol).
  3231             m disableAll:#(browse browseClass browseClassHierarchy browseFullClassProtocol).
  3226         ].
  3232         ].
  3227     ]
  3233     ]
  3228 
  3234 
  3229     "Modified: 11.1.1997 / 13:34:20 / cg"
  3235     "Modified: 11.1.1997 / 20:46:11 / cg"
  3230 ! !
  3236 ! !
  3231 
  3237 
  3232 !DebugView class methodsFor:'documentation'!
  3238 !DebugView class methodsFor:'documentation'!
  3233 
  3239 
  3234 version
  3240 version
  3235     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.129 1997-01-11 17:51:31 cg Exp $'
  3241     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.130 1997-01-11 19:58:13 cg Exp $'
  3236 ! !
  3242 ! !