InspectorView.st
changeset 17130 43d80b2f117a
parent 17124 101cfec65247
child 17131 eccb24a60c2e
equal deleted inserted replaced
17129:c3f6d259e84c 17130:43d80b2f117a
  2969     idx := self theSingleSelectionIndex.
  2969     idx := self theSingleSelectionIndex.
  2970     idx notNil ifTrue:[
  2970     idx notNil ifTrue:[
  2971         sel := self listEntryAt:idx.
  2971         sel := self listEntryAt:idx.
  2972         sel isNil ifTrue:[^ someValue].
  2972         sel isNil ifTrue:[^ someValue].
  2973 
  2973 
  2974         object isProtoObject ifFalse:[
  2974         extraAttributes := self myObjectsInspectorExtraAttributes.
  2975             extraAttributes := object inspectorExtraAttributes.
  2975         (extraAttributes includesKey:sel) ifTrue:[
  2976         ].
       
  2977         (extraAttributes notNil and:[extraAttributes includesKey:sel]) ifTrue:[
       
  2978             ^ someValue "(extraAttributes at:sel) value" printString
  2976             ^ someValue "(extraAttributes at:sel) value" printString
  2979         ].
  2977         ].
  2980 
  2978 
  2981         (sel startsWith:'-all inst vars') ifTrue:[
  2979         (sel startsWith:'-all inst vars') ifTrue:[
  2982             ^ self stringWithAllInstVarValues
  2980             ^ self stringWithAllInstVarValues
  3271     "Created: / 03-08-2006 / 15:02:54 / cg"
  3269     "Created: / 03-08-2006 / 15:02:54 / cg"
  3272     "Modified: / 27-01-2011 / 11:45:17 / cg"
  3270     "Modified: / 27-01-2011 / 11:45:17 / cg"
  3273 !
  3271 !
  3274 
  3272 
  3275 derivedFields
  3273 derivedFields
  3276     "the check below is not sufficient - if some proxy catches messages, for example.
  3274     ^ self myObjectsInspectorExtraAttributes
  3277      Therefore, we do a manual lookup here:"
       
  3278 
       
  3279     (object class whichClassIncludesSelector:#inspectorExtraAttributes) isNil ifTrue:[
       
  3280         ^ #()
       
  3281     ].
       
  3282     ^ [object inspectorExtraAttributes]
       
  3283                 on: MessageNotUnderstood
       
  3284                 do: [:ex | ex return: #() ]
       
  3285 
       
  3286     "Created: / 17-07-2006 / 11:02:32 / cg"
       
  3287     "Modified: / 29-08-2006 / 13:03:31 / cg"
       
  3288 !
  3275 !
  3289 
  3276 
  3290 extraNamedFieldNames
  3277 extraNamedFieldNames
  3291     ^ self extraNamedFields 
  3278     ^ self extraNamedFields 
  3292         collect:[:eachEntry |
  3279         collect:[:eachEntry |
  3636     ^ entry perform:#string ifNotUnderstood:[ entry printString ].
  3623     ^ entry perform:#string ifNotUnderstood:[ entry printString ].
  3637 
  3624 
  3638     "Created: / 16-05-2012 / 17:53:39 / cg"
  3625     "Created: / 16-05-2012 / 17:53:39 / cg"
  3639 !
  3626 !
  3640 
  3627 
       
  3628 myObjectsInspectorExtraAttributes
       
  3629 
       
  3630     "the MessageNotUnderstood check below is not sufficient - if some proxy catches messages, for example.
       
  3631      Therefore, we do a manual lookup here:"
       
  3632     (object class canUnderstand:#inspectorExtraAttributes) ifFalse:[
       
  3633         ^ #()
       
  3634     ].
       
  3635     ^ [object inspectorExtraAttributes]
       
  3636                 on: MessageNotUnderstood
       
  3637                 do: [:ex | ex return: #() ]
       
  3638 
       
  3639     "Created: / 17-07-2006 / 11:02:32 / cg"
       
  3640     "Modified: / 29-08-2006 / 13:03:31 / cg"
       
  3641 !
       
  3642 
  3641 namedFieldAt:idx
  3643 namedFieldAt:idx
  3642     |val|
  3644     |val|
  3643 
  3645 
  3644     IsDebuggingQuery answer:true do:[
  3646     IsDebuggingQuery answer:true do:[
  3645         val := object instVarAt:idx
  3647         val := object instVarAt:idx
  3925 !
  3927 !
  3926 
  3928 
  3927 valueForSpecialLine:line
  3929 valueForSpecialLine:line
  3928     |idx fieldEntry extraAttributes fields|
  3930     |idx fieldEntry extraAttributes fields|
  3929 
  3931 
  3930     extraAttributes := object inspectorExtraAttributes.
  3932     extraAttributes := self myObjectsInspectorExtraAttributes.
  3931     (extraAttributes notNil and:[ extraAttributes includesKey:line ]) ifTrue:[
  3933     (extraAttributes includesKey:line) ifTrue:[
  3932         ^ (extraAttributes at:line) value
  3934         ^ (extraAttributes at:line) value
  3933     ].
  3935     ].
  3934 
  3936 
  3935     idx := self derivedFieldNames findFirst:[:l | l string = line string ].
  3937     idx := self derivedFieldNames findFirst:[:l | l string = line string ].
  3936     idx ~~ 0 ifTrue:[
  3938     idx ~~ 0 ifTrue:[