InspectorView.st
author Claus Gittinger <cg@exept.de>
Tue, 06 Feb 2007 14:27:29 +0100
changeset 7626 9a2b4d6855a2
parent 7297 ea3614b585e4
child 7629 48bf8de91618
permissions -rw-r--r--
avoid flicker when monitoring
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
     1
"
5
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
     3
	      All Rights Reserved
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
     4
571fd5eee315 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
571fd5eee315 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
571fd5eee315 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
571fd5eee315 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
571fd5eee315 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
571fd5eee315 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
571fd5eee315 Initial revision
claus
parents:
diff changeset
    11
"
2657
0623fcb714f7 care for nil strings
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
    12
"{ Package: 'stx:libtool' }"
0623fcb714f7 care for nil strings
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
    13
93
claus
parents: 80
diff changeset
    14
SimpleView subclass:#InspectorView
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    15
	instanceVariableNames:'listView labelView workspace inspectedObject selectedLine nShown
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    16
		hasMore monitorProcess hideReceiver showHex inspectHistory
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    17
		allowFollow isStandaloneInspector selectionIndex object
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    18
		inspectedObjectHolder displayStringMessage suppressPseudoSlots
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    19
		dereferenceValueHolders'
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    20
	classVariableNames:'DefaultIcon IdDictionary NextSequentialID'
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    21
	poolDictionaries:''
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    22
	category:'Interface-Inspector'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    23
!
571fd5eee315 Initial revision
claus
parents:
diff changeset
    24
871
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
    25
!InspectorView class methodsFor:'documentation'!
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    26
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    27
copyright
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    28
"
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    29
 COPYRIGHT (c) 1989 by Claus Gittinger
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
    30
	      All Rights Reserved
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    31
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    32
 This software is furnished under a license and may be used
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    33
 only in accordance with the terms of that license and with the
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    35
 be provided or otherwise made available to, or used by, any
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    36
 other person.  No title to or ownership of the software is
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    37
 hereby transferred.
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    38
"
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    39
!
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    40
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    41
documentation
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    42
"
1570
7b8bda4df1dc comment
Claus Gittinger <cg@exept.de>
parents: 1494
diff changeset
    43
    This class implements a graphical inspector.
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    44
    Inspecting can be done on an object -
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    45
    (where its instvarnames/values are inspected)
1570
7b8bda4df1dc comment
Claus Gittinger <cg@exept.de>
parents: 1494
diff changeset
    46
    or a list of objects (where a nameArray/valuesArray is inspected).
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    47
    The later is used by the debugger to inspect method variables/args.
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    48
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    49
    The system calls the inspector through the global variable 'Inspector'
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    50
    which is bound to this class (but could be redefined - it actually is
1570
7b8bda4df1dc comment
Claus Gittinger <cg@exept.de>
parents: 1494
diff changeset
    51
    set to MiniInspector in a smalltalk without graphical user interface,
7b8bda4df1dc comment
Claus Gittinger <cg@exept.de>
parents: 1494
diff changeset
    52
    or to NewInspector if that is wanted).
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    53
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    54
    Also notice, that there are two methods to inspect an object:
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    55
    sending #basicInspect to any object, will open this kind of inspector on 
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    56
    it (showing instance variables which are physically present).
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    57
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    58
    Sending it #inspect, will - depending on the object - sometimes invoke a
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    59
    specialized inspector. 
1570
7b8bda4df1dc comment
Claus Gittinger <cg@exept.de>
parents: 1494
diff changeset
    60
    (see OrderedCollectionInspectorView, ImageInspectorView, 
7b8bda4df1dc comment
Claus Gittinger <cg@exept.de>
parents: 1494
diff changeset
    61
     ColorInspectorView etc. as examples).
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    62
446
8ded3f1df7d2 commentary
Claus Gittinger <cg@exept.de>
parents: 426
diff changeset
    63
    You can also open a monitoring inspector, which displays some instance
8ded3f1df7d2 commentary
Claus Gittinger <cg@exept.de>
parents: 426
diff changeset
    64
    variable in regular intervals. See #openOn:monitor:.
8ded3f1df7d2 commentary
Claus Gittinger <cg@exept.de>
parents: 426
diff changeset
    65
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    66
    examples:
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    67
            #(1 2 3 4) asOrderedCollection inspect
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    68
            #(1 2 3 4) asOrderedCollection basicInspect
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    69
            (Array new:10000) inspect
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    70
            (Image fromFile:'bitmaps/claus.gif') inspect
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    71
            (Image fromFile:'bitmaps/claus.gif') basicInspect
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    72
            (Image fromFile:'bitmaps/SBrowser.xbm') inspect
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    73
            (Image fromFile:'bitmaps/SBrowser.xbm') basicInspect
446
8ded3f1df7d2 commentary
Claus Gittinger <cg@exept.de>
parents: 426
diff changeset
    74
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    75
            InspectorView openOn:Display
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    76
            InspectorView openOn:Display monitor:'shiftDown'
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    77
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    78
    The InspectorView can also be used as a subComponent within another view.
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    79
    In this case, the isStandAlone flag should be cleared, to prevent the
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    80
    inspector from changing the topViews window label.
510
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
    81
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    82
    Notice:
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    83
        the instvars 'inspectedObject' and 'selectedLine' have been 
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    84
        renamed to 'object' and 'selectionIndex' for squeak compatibility;
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    85
        however, the old vars are kept (in sync) for a while, to allow for
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    86
        smooth migration.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    87
6940
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    88
  Controlling the contents from the inspected object.
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    89
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    90
    By redefining inspectorExtraAttributes or inspectorExtraNamedFields, the inspected
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    91
    object can add items to the list of fields as ashown in the left list-view of the inspector.
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    92
    These methods are meant to return a sequencable Collection of Associations, which represent
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    93
    of pseudo slot-name, slot-value pairs.
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    94
    In the list, extra attributes are shown with a dash (-), extra named fields are marked with a tick (`).
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    95
    These are added (read only) to the list.
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
    96
510
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
    97
    [author:]
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
    98
        Claus Gittinger
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
    99
"
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
   100
! !
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   101
871
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
   102
!InspectorView class methodsFor:'instance creation'!
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   103
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   104
for:anObject
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   105
    "create and launch a new inspector for anObject.
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   106
     This protocol is a historic leftover - this method will vanish."
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   107
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   108
    ^ self openOn:anObject
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   109
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   110
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   111
inspect:anObject
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   112
    "create and launch a new inspector for anObject.
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   113
     This protocol is a historic leftover - this method will vanish."
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   114
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   115
    ^ self openOn:anObject
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   116
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   117
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   118
openOn:anObject
571fd5eee315 Initial revision
claus
parents:
diff changeset
   119
    "create and launch a new inspector for anObject"
571fd5eee315 Initial revision
claus
parents:
diff changeset
   120
416
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   121
    ^ self openOn:anObject monitor:nil
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   122
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   123
    "
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   124
     InspectorView openOn:(5 @ 7)
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   125
     InspectorView openOn:(Array new:400)
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   126
     DictionaryInspectorView openOn:(IdentityDictionary new)
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   127
    "
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   128
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   129
    "Modified: 1.3.1996 / 19:31:03 / cg"
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   130
!
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   131
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   132
openOn:anObject monitor:anInstVarName
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   133
    "create and launch a new inspector for anObject.
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   134
     If anInstVarName is nonNil, let the inspector monitor it
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   135
     (use an integer-printString as name, for indexed instVars)."
416
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   136
105
claus
parents: 100
diff changeset
   137
    |topView inspectorView|
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   138
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   139
    topView := StandardSystemView new.
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   140
    topView icon:self defaultIcon.
2147
afc85f49fc18 removed minExtent - let topView decide.
Claus Gittinger <cg@exept.de>
parents: 2117
diff changeset
   141
    "/ topView minExtent:(100 @ 100).
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   142
    topView label:'Inspector'.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   143
    topView iconLabel:'Inspector'.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   144
1873
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   145
    topView extent:(self defaultExtent).
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   146
571fd5eee315 Initial revision
claus
parents:
diff changeset
   147
    inspectorView := self origin:(0.0 @ 0.0)
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   148
                          corner:(1.0 @ 1.0)
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   149
                             in:topView.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   150
3
claus
parents: 0
diff changeset
   151
    "kludge: must realize first, to be able to set menu again"
352
e84b6352735d set focusSequence
Claus Gittinger <cg@exept.de>
parents: 351
diff changeset
   152
    topView openAndWait.
871
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
   153
    topView windowGroup 
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   154
        focusSequence:(Array 
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   155
                            with:inspectorView listView
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   156
                            with:inspectorView workspace).
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   157
    inspectorView allowFollow:true.
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   158
    inspectorView isStandaloneInspector:true.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   159
    inspectorView inspect:anObject.
416
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   160
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   161
    anInstVarName notNil ifTrue:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   162
        inspectorView monitor:anInstVarName
416
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   163
    ].
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   164
69
0d6acfdae045 *** empty log message ***
claus
parents: 61
diff changeset
   165
    ^ inspectorView
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   166
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
   167
    "
416
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   168
     |m|
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   169
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   170
     m := 1 asValue.
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   171
     InspectorView openOn:m monitor:'value'.
871
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
   172
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
   173
     2 to:10 do:[:i |
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   174
         Delay waitForSeconds:1.
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   175
         m value:i
871
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
   176
     ]
416
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   177
    "
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   178
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
   179
    "
416
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   180
     |o|
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   181
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   182
     o := Array with:1 with:2 with:3.
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   183
     InspectorView openOn:o monitor:'2'.
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   184
     Delay waitForSeconds:1.
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   185
     o at:2 put:20
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   186
    "
fd30ab6185c7 added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   187
1873
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   188
    "Created: / 1.3.1996 / 19:30:50 / cg"
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   189
    "Modified: / 12.2.1999 / 16:04:42 / cg"
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   190
!
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   191
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   192
openOn:anObject withEvalPane:withEvalPane
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   193
    ^ self openOn:anObject
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   194
!
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   195
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   196
openOn:anObject withEvalPane:withEvalPane withLabel:aLabel
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   197
    ^ self openOn:anObject
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   198
! !
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   199
871
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
   200
!InspectorView class methodsFor:'defaults'!
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   201
1873
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   202
defaultExtent
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   203
    ^ (Screen current extent // 3)
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   204
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   205
    "Created: / 7.9.1998 / 13:47:45 / cg"
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   206
    "Modified: / 7.9.1998 / 14:15:38 / cg"
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   207
!
5fd55aa184d4 added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents: 1855
diff changeset
   208
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   209
defaultIcon
1146
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   210
    "return the browsers default window icon"
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   211
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   212
    <resource: #style (#ICON #ICON_FILE)>
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   213
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   214
    |nm i|
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   215
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   216
    (i := DefaultIcon) isNil ifTrue:[
2338
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   217
        i := self classResources at:'ICON' default:nil.
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   218
        i isNil ifTrue:[
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   219
            nm := ClassResources at:'ICON_FILE' default:'Inspector.xbm'.
2475
12068d713365 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2454
diff changeset
   220
            i := Smalltalk imageFromFileNamed:nm forClass:self.
2338
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   221
            i isNil ifTrue:[
2454
114111038a2b try my bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents: 2447
diff changeset
   222
                i := StandardSystemView defaultIcon
2338
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   223
            ]
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   224
        ].
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   225
        i notNil ifTrue:[
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   226
            DefaultIcon := i := i onDevice:Display
0d791a4b518a #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 2323
diff changeset
   227
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   228
    ].
1146
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   229
    ^ i
874
9ec421cec441 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 871
diff changeset
   230
1146
231ebb35a507 defaultIcon improved
Claus Gittinger <cg@exept.de>
parents: 1094
diff changeset
   231
    "Modified: 18.4.1997 / 15:16:53 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   232
! !
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   233
2598
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   234
!InspectorView class methodsFor:'queries-plugin'!
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   235
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   236
aspectSelectors
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   237
    ^ #( inspectedObjectHolder )
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   238
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   239
    "Modified: / 10.2.2000 / 12:25:28 / cg"
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   240
! !
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   241
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   242
!InspectorView methodsFor:'accessing'!
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   243
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   244
allowFollow:aBoolean
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   245
    "enable/disable the follow menu item;
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   246
     This is disabled for inspectors which are embedded in the debugger"
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   247
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   248
    allowFollow := aBoolean
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   249
!
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   250
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   251
dereferenceValueHolders:aBoolean
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   252
    dereferenceValueHolders := aBoolean
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   253
!
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   254
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   255
fieldListLabel:aString
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   256
    labelView label:aString
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   257
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   258
    "Created: 28.6.1996 / 15:30:26 / cg"
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   259
!
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   260
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   261
hideReceiver:aBoolean
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   262
    "hide/show the self-entry for the inspected object;
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   263
     This is hidden for context inspectors in the debugger"
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   264
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   265
    hideReceiver := aBoolean
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   266
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   267
    "Created: 28.6.1996 / 15:08:32 / cg"
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   268
!
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   269
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   270
inspect:anObject
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   271
    "define the object to be inspected"
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   272
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   273
    |aList sameObject|
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   274
2996
2230855f6283 Show 'self for an UndefinedObject
Stefan Vogel <sv@exept.de>
parents: 2850
diff changeset
   275
    sameObject := anObject == inspectedObject and:[inspectedObject notNil].
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   276
    inspectedObject := object := anObject.
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   277
1770
5cb6d7232aaa re-inspecting the same object suppresses list update;
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   278
    sameObject ifFalse:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   279
        hasMore := false.
2996
2230855f6283 Show 'self for an UndefinedObject
Stefan Vogel <sv@exept.de>
parents: 2850
diff changeset
   280
        aList := self fieldList.                               
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   281
        hasMore ifTrue:[
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   282
            aList add:' ... '
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   283
        ].
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   284
    ].
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   285
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   286
    sameObject ifTrue:[
1770
5cb6d7232aaa re-inspecting the same object suppresses list update;
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   287
"/        listView setContents:aList.
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   288
    ] ifFalse:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   289
        listView contents:aList.
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   290
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   291
        workspace contents:nil.
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   292
        self setDoItAction.
1770
5cb6d7232aaa re-inspecting the same object suppresses list update;
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   293
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   294
    ].
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   295
2284
0f4ee9b43468 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2275
diff changeset
   296
    selectionIndex := selectedLine := nil.
0f4ee9b43468 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2275
diff changeset
   297
0f4ee9b43468 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2275
diff changeset
   298
    isStandaloneInspector == true ifTrue:[
0f4ee9b43468 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2275
diff changeset
   299
        self topView 
0f4ee9b43468 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2275
diff changeset
   300
            label:(self labelFor:anObject);
0f4ee9b43468 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2275
diff changeset
   301
            iconLabel:(self labelNameFor:anObject).
0f4ee9b43468 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2275
diff changeset
   302
    ]
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   303
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   304
    "Modified: / 12.2.1999 / 16:03:27 / cg"
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   305
!
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   306
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   307
isStandaloneInspector:aBoolean
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   308
    "obsolete now"
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   309
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   310
    isStandaloneInspector := aBoolean
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   311
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   312
    "Modified: / 12.2.1999 / 16:01:44 / cg"
29
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
   313
!
8a72e10043f6 *** empty log message ***
claus
parents: 23
diff changeset
   314
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   315
label:aString
4106
1222d4e1166e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   316
    "set the fieldListLabel - obsolete; collides with inherited label-functionality"
1222d4e1166e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   317
5845
c7a4a4cd352b Mark obsolete methods
Stefan Vogel <sv@exept.de>
parents: 5698
diff changeset
   318
    <resource:#obsolete>
4106
1222d4e1166e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   319
    self obsoleteMethodWarning:'use fieldListLabel:'.
1222d4e1166e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   320
    self fieldListLabel:aString.
1222d4e1166e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
   321
    super label:aString.
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   322
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   323
    "Created: 28.6.1996 / 15:30:26 / cg"
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   324
!
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   325
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   326
listView
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   327
    ^ listView
352
e84b6352735d set focusSequence
Claus Gittinger <cg@exept.de>
parents: 351
diff changeset
   328
!
e84b6352735d set focusSequence
Claus Gittinger <cg@exept.de>
parents: 351
diff changeset
   329
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   330
reinspect
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   331
    "update display for a changed inspectedObject"
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   332
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   333
    |aList|
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   334
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   335
    hasMore := false.
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   336
    aList := self fieldList.
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   337
    hasMore ifTrue:[
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   338
        aList add:' ... '
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   339
    ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   340
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   341
    listView contents:aList.
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   342
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   343
"/    workspace contents:nil.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   344
    self setDoItAction.
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   345
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   346
    selectionIndex := selectedLine := nil
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   347
!
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
   348
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   349
suppressPseudoSlots:aBoolean
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   350
    suppressPseudoSlots := aBoolean
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   351
!
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
   352
352
e84b6352735d set focusSequence
Claus Gittinger <cg@exept.de>
parents: 351
diff changeset
   353
workspace
e84b6352735d set focusSequence
Claus Gittinger <cg@exept.de>
parents: 351
diff changeset
   354
    ^ workspace
52
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
   355
! !
7b48409ae088 *** empty log message ***
claus
parents: 49
diff changeset
   356
2724
ca96b304e992 category changes
Claus Gittinger <cg@exept.de>
parents: 2657
diff changeset
   357
!InspectorView methodsFor:'accessing-channels'!
2598
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   358
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   359
inspectedObjectHolder
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   360
    inspectedObjectHolder isNil ifTrue:[
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   361
        inspectedObjectHolder := ValueHolder new.
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   362
        inspectedObjectHolder addDependent:self.
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   363
    ].
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   364
    ^ inspectedObjectHolder
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   365
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   366
    "Created: / 10.2.2000 / 13:33:16 / cg"
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   367
    "Modified: / 10.2.2000 / 13:34:23 / cg"
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   368
!
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   369
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   370
inspectedObjectHolder:aValueHolder
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   371
    inspectedObjectHolder notNil ifTrue:[
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   372
        inspectedObjectHolder removeDependent:self.
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   373
    ].
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   374
    inspectedObjectHolder := aValueHolder.
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   375
    inspectedObjectHolder notNil ifTrue:[
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   376
        inspectedObjectHolder addDependent:self.
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   377
    ].
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   378
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   379
    "Created: / 10.2.2000 / 13:34:53 / cg"
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   380
! !
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   381
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   382
!InspectorView methodsFor:'change & update'!
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   383
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   384
update:something with:aParameter from:changedObject
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   385
    "Invoked when one of my dependees sends a change notification."
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   386
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   387
    |oldSelection|
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   388
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   389
    changedObject == inspectedObject ifTrue:[
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   390
        oldSelection := listView selection.
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   391
        self inspect:inspectedObject.
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   392
        oldSelection notNil ifTrue:[
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   393
            self showSelection:oldSelection
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   394
        ]
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   395
    ].
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   396
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   397
    changedObject == inspectedObjectHolder ifTrue:[
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   398
        self inspect:(inspectedObjectHolder value)
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   399
    ].
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   400
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   401
    super update:something with:aParameter from:changedObject
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   402
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   403
    "Created: / 10.2.2000 / 13:46:38 / cg"
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   404
    "Modified: / 10.2.2000 / 13:48:18 / cg"
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   405
! !
298843749a49 inspectedObjectHolder added
Claus Gittinger <cg@exept.de>
parents: 2587
diff changeset
   406
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   407
!InspectorView methodsFor:'drag & drop'!
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   408
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   409
getDisplayObjects
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   410
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   411
    ^List with:self selection printString
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   412
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   413
    "Created: / 16-08-2005 / 21:54:52 / janfrog"
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   414
    "Modified: / 18-09-2006 / 21:11:16 / cg"
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   415
!
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   416
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   417
getDropObjects
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   418
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   419
    ^List with:(DropObject new:self selection).
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   420
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   421
    "Created: / 16-08-2005 / 21:49:23 / janfrog"
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   422
    "Modified: / 18-09-2006 / 21:11:31 / cg"
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   423
! !
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   424
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   425
!InspectorView methodsFor:'initialization & release'!
2117
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   426
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   427
destroy
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   428
    inspectedObject := object := nil.
2117
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   429
    monitorProcess notNil ifTrue:[
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   430
        monitorProcess terminate
2117
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   431
    ].
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   432
    super destroy
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   433
!
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   434
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   435
initialize
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   436
    |v panel helpView labelView2|
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   437
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   438
    super initialize.
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   439
3318
46c3347385f4 preps to allow for displayString message to be configured
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
   440
    displayStringMessage := #displayString.
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   441
    hideReceiver := false.
1634
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
   442
    showHex := false.
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   443
    allowFollow := false.
2008
52bf8b8afd3b separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents: 2007
diff changeset
   444
    isStandaloneInspector := false.
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   445
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   446
    panel := VariableHorizontalPanel 
1991
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   447
                origin:(0.0 @ 0.0)
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   448
                corner:(1.0 @ 1.0)
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   449
                in:self.
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   450
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   451
    helpView := View origin:(0.0 @ 0.0) corner:(0.3 @ 1.0) in:panel.
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   452
    helpView level:0; borderWidth:0.
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   453
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   454
    labelView := Label origin:0.0@0.0 corner:1.0@0.0 in:helpView.
647
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
   455
    labelView label:(self defaultLabel).
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   456
    labelView bottomInset:(labelView preferredExtent y negated).
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   457
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   458
    v := HVScrollableView 
1991
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   459
                for:SelectionInListView 
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   460
                miniScrollerH:true
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   461
                miniScrollerV:false
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   462
                in:helpView.
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   463
"/    v autoHideScrollBars:true.
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   464
    v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   465
    v topInset:(labelView preferredExtent y).
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   466
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   467
    listView := v scrolledView.
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   468
    listView action:[:lineNr | self showSelection:lineNr].
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   469
    listView doubleClickAction:[:lineNr | self doInspect].
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   470
    listView ignoreReselect:false.
98
claus
parents: 93
diff changeset
   471
    listView menuHolder:self; menuPerformer:self; menuMessage:#fieldMenu.
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   472
    self initializeDragAndDrop.
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   473
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   474
    helpView := View origin:(0.3 @ 0.0) corner:(1.0 @ 1.0) in:panel.
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   475
    helpView level:0; borderWidth:0.
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   476
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   477
    labelView2 := Label origin:0.0@0.0 corner:1.0@0.0 in:helpView.
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   478
    labelView2 label:''.
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   479
    labelView2 bottomInset:(labelView preferredExtent y negated).
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   480
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   481
    v := HVScrollableView 
1991
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   482
                for:CodeView 
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   483
                miniScrollerH:true
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   484
                miniScrollerV:false
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   485
                in:helpView.
dfbb30988edd no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents: 1930
diff changeset
   486
"/    v autoHideScrollBars:true.
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   487
    v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   488
    v topInset:(labelView2 preferredExtent y).
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   489
    workspace := v scrolledView.
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   490
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
   491
    self setAcceptAction.
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   492
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   493
    nShown := 100.
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   494
    hasMore := false.
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
   495
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   496
    "Modified: / 16-08-2005 / 21:54:04 / janfrog"
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   497
    "Modified: / 18-09-2006 / 21:12:42 / cg"
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   498
!
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   499
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   500
initializeDragAndDrop
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   501
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   502
    | source |
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   503
    source := DropSource 
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   504
                    receiver:self
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   505
                    argument:nil
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   506
                    dropObjectSelector:#getDropObjects
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   507
                    displayObjectSelector:#getDisplayObjects
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   508
                    dropFeedBackSelector:nil.
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   509
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   510
    listView dropSource:source.
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   511
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   512
    "Created: / 16-08-2005 / 21:51:43 / janfrog"
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
   513
    "Modified: / 18-09-2006 / 21:13:05 / cg"
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   514
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   515
593
6bc83313d7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   516
realize
6bc83313d7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   517
    "delayed setup of lists till first map-time - 
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   518
     this makes startup of inspectors a bit faster"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   519
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   520
    |o|
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   521
593
6bc83313d7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   522
    super realize.
383
e5760d864242 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 352
diff changeset
   523
    inspectedObject notNil ifTrue:[
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   524
        "
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   525
         kludge to trick inspect:, which ignores setting the
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   526
         same object again ...
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   527
        "
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   528
        o := inspectedObject.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   529
        inspectedObject := object := nil.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   530
        self inspect:o
383
e5760d864242 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 352
diff changeset
   531
    ]
593
6bc83313d7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   532
6bc83313d7ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 570
diff changeset
   533
    "Created: 30.5.1996 / 09:38:37 / cg"
2117
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   534
!
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   535
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   536
release
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   537
    "release inpected object. This is normally not needed,
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   538
     since the garbage collector will find this memory alone.
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   539
     However, if some applications keeps invisible inspectors around
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   540
     (for example, the debugger does this), the inspected object
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   541
     would be kept from being freed or freed very late."
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   542
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   543
"
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   544
    inspectedObject notNil ifTrue:[
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   545
        inspectedObject removeDependent:self
2117
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   546
    ].
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   547
"
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   548
    inspectedObject := object := nil.
2117
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   549
    self setDoItAction.      "/ to release ref to inspectedObject in doItBlock
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   550
    workspace contents:nil.
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   551
    listView contents:nil.
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   552
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   553
    super release.
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   554
dd96b2478eeb category change
Claus Gittinger <cg@exept.de>
parents: 2085
diff changeset
   555
    "Modified: 11.6.1997 / 13:20:39 / cg"
98
claus
parents: 93
diff changeset
   556
! !
claus
parents: 93
diff changeset
   557
claus
parents: 93
diff changeset
   558
!InspectorView methodsFor:'menu'!
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   559
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   560
fieldMenu
1040
5835207bcb3e menu resource
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
   561
    "return the menu for the field-list"
5835207bcb3e menu resource
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
   562
1235
13610578a5d2 resource flag: #menu -> #programMenu
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
   563
    <resource: #programMenu>
1040
5835207bcb3e menu resource
Claus Gittinger <cg@exept.de>
parents: 901
diff changeset
   564
3526
d8f3082ea1d7 Remove unused vars
Stefan Vogel <sv@exept.de>
parents: 3525
diff changeset
   565
    |items m sel|
1597
48629e1fc7b6 use new menu-creation message in PopUpMenu.
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
   566
48629e1fc7b6 use new menu-creation message in PopUpMenu.
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
   567
    items := #(
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   568
                       ('Copy Name or Key'             #doCopyKey              )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 2008
diff changeset
   569
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   570
                       ('Inspect'                      #doInspect              )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   571
                       ('BasicInspect'                 #doBasicInspect         )
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   572
                       ('Inspect Hierarchical'         #doNewInspect           )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 2008
diff changeset
   573
                       ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   574
                       ('Ref Chains'                   #showReferences         )
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 2008
diff changeset
   575
                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   576
                       ('Browse'                       #browse                 )
3199
5478ca0ac71f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   577
"/                       ('Browse class hierarchy'       #browseClassHierarchy   )
5478ca0ac71f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   578
"/                       ('Browse full class protocol'   #browseFullClassProtocol)
2579
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   579
              ).
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   580
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   581
    sel := self selection.
6491
d02c41c57d02 better menu
Claus Gittinger <cg@exept.de>
parents: 6372
diff changeset
   582
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   583
    (sel isBlock or:[sel isContext]) ifTrue:[
2579
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   584
        items := items , #(
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   585
                       ('Browse Blocks Home'           #browseHome)
2579
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   586
              ).
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   587
    ].
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   588
    (inspectedObject isMethod or:[sel isMethod]) ifTrue:[
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   589
        items := items , #(
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   590
                       ('Browse Methods Class'         #browseMethodsClass)
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   591
                 ).
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   592
    ].
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   593
    (sel isStream and:[self isExternalStream not]) ifTrue:[
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   594
        items := items , #(
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   595
                       ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   596
                       ('Show Stream Contents'         #showStreamContents)
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   597
              ).
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   598
    ].
6283
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   599
    (inspectedObject isFilename or:[sel isFilename]) ifTrue:[
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   600
        items := items , #(
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   601
                       ('Open FileBrowser'             #openFileBrowser)
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   602
              ).
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   603
    ].
2579
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   604
    items := items , #(
2085
ec4daf11d3b6 added #copyKey - menu item
Claus Gittinger <cg@exept.de>
parents: 2008
diff changeset
   605
                       ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   606
                       ('Trap Message...'              #doTrap                 )
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   607
                       ('Trap all Messages'            #doTrapAll              )
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   608
                       ('Trace all Messages'           #doTraceAll             )
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   609
                       ('Untrace/Untrap'               #doUntrace              )
2850
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   610
"/                       ('-')
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   611
"/                       ('Trap change to instVar'       #doTrapInstVarChange    )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   612
"/                       ('Trap change to any instVar'   #doTrapAnyInstVarChange )
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   613
              ).
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   614
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   615
    allowFollow ifTrue:[
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   616
        items := #(
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   617
                            ('Follow'                       #doFollow              )
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3164
diff changeset
   618
                            ('Back'                         #doBack              )
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   619
                            ('-')
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   620
                  )
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   621
                 ,
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   622
                 items.
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   623
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   624
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   625
    hasMore ifTrue:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   626
        items := items , #(
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   627
                        ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   628
                        ('Show More'                    #showMore               )
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   629
                          )
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   630
    ].
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   631
93
claus
parents: 80
diff changeset
   632
    monitorProcess isNil ifTrue:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   633
        items := items , #(
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   634
                        ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   635
                        ('Start Monitor'                #doStartMonitor         )
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   636
                          ).
93
claus
parents: 80
diff changeset
   637
    ] ifFalse:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   638
        items := items , #(
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   639
                        ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   640
                        ('Stop Monitor'                #doStopMonitor           )
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   641
                          ).
93
claus
parents: 80
diff changeset
   642
    ].
claus
parents: 80
diff changeset
   643
1634
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
   644
    showHex ifTrue:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   645
        items := items , #(
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   646
                        ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   647
                        ('Decimal Integers'  #toggleHex               )
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   648
                          )
1634
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
   649
    ] ifFalse:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   650
        items := items , #(
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   651
                        ('-')
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   652
                        ('Hex Integers'      #toggleHex               )
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   653
                          )
1634
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
   654
    ].
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
   655
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   656
    m := PopUpMenu
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   657
          itemList:items
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   658
          resources:resources.
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   659
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   660
    selectionIndex isNil ifTrue:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   661
        m disableAll:#(doFollow doInspect doBasicInspect doNewInspect
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   662
                       browse browseClassHierarchy browseFullClassProtocol
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   663
                       doStartMonitor doCopyKey doCopyKey)
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   664
    ].
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   665
    (selectionIndex == 1) ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   666
        m disableAll:#(doFollow doCopyKey)
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   667
    ].
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   668
    inspectHistory size == 0 ifTrue:[
2007
cd423a740a14 renamed instance variable.
Claus Gittinger <cg@exept.de>
parents: 1991
diff changeset
   669
        m disable:#doBack
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   670
    ].
6491
d02c41c57d02 better menu
Claus Gittinger <cg@exept.de>
parents: 6372
diff changeset
   671
    sel class hasImmediateInstances ifTrue:[
2580
d0c284a14c9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2579
diff changeset
   672
        m disableAll:#(showReferences doNewInspect)
d0c284a14c9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2579
diff changeset
   673
    ].
3199
5478ca0ac71f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   674
    sel inspectorClass == self class ifFalse:[
5478ca0ac71f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   675
        m disable:#doFollow
5478ca0ac71f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   676
    ].
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   677
    sel isMethod ifFalse:[
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   678
        m disable:#browseMethodsClass
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   679
    ].
3199
5478ca0ac71f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   680
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   681
    ^ m
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   682
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   683
    "Modified: / 6.2.2000 / 13:48:09 / cg"
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   684
! !
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   685
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   686
!InspectorView methodsFor:'menu actions'!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   687
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   688
browse
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   689
    |cls|
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   690
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   691
    cls := self selection class.
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   692
    cls browserClass openInClass:cls selector:nil
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   693
1930
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   694
    "Created: / 14.12.1995 / 19:15:50 / cg"
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   695
    "Modified: / 14.10.1998 / 15:32:10 / cg"
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   696
!
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   697
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   698
browseClass
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   699
    |cls|
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   700
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   701
    cls := self selection class.
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   702
    cls browserClass browseClass:cls
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   703
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   704
    "Modified: 3.5.1996 / 12:39:32 / cg"
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   705
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   706
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   707
browseClassHierarchy
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   708
    |cls|
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   709
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   710
    cls := self selection class.
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   711
    cls browserClass browseClassHierarchy:cls
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   712
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   713
    "Modified: 3.5.1996 / 12:40:04 / cg"
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   714
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   715
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   716
browseFullClassProtocol
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   717
    |cls|
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   718
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   719
    cls := self selection class.
527
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   720
    cls browserClass browseFullClassProtocol:cls
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   721
2faba0c6ab96 ask class for browserClass
Claus Gittinger <cg@exept.de>
parents: 510
diff changeset
   722
    "Modified: 3.5.1996 / 12:40:17 / cg"
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   723
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   724
2579
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   725
browseHome
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   726
    |sel mthd|
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   727
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   728
    sel := self selection.
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   729
    sel isBlock ifTrue:[
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   730
        mthd := sel homeMethod
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   731
    ] ifFalse:[
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   732
        sel isContext ifTrue:[
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   733
            mthd := sel method.
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   734
        ]
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   735
    ].
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   736
    mthd isNil ifTrue:[
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   737
        ^ self warn:'Sorry - cannot figure out home method.'
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   738
    ].
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   739
    mthd class browserClass 
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   740
        openInClass:mthd mclass selector:mthd selector
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   741
!
81108fb4f996 added browse home-method
Claus Gittinger <cg@exept.de>
parents: 2475
diff changeset
   742
4197
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   743
browseMethodsClass
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   744
    |mthd|
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   745
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   746
    mthd := self selection.
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   747
    mthd mclass browserClass 
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   748
        openInClass:mthd mclass selector:mthd selector
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   749
!
8086dadff648 added broese methods class
Claus Gittinger <cg@exept.de>
parents: 4106
diff changeset
   750
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   751
doBack
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   752
    "user selected back-menu entry"
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   753
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   754
    |objectToInspect|
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   755
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   756
    inspectHistory size > 0 ifTrue:[
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   757
	objectToInspect := inspectHistory removeLast.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   758
	inspectHistory size == 0 ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   759
	    inspectHistory := nil
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   760
	].
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   761
	self inspect:objectToInspect.
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   762
    ]
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   763
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   764
    "Created: / 22.9.1998 / 18:22:01 / cg"
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   765
    "Modified: / 22.9.1998 / 18:22:28 / cg"
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   766
!
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   767
1930
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   768
doBasicInspect
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   769
    "user selected inspect-menu entry"
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   770
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   771
    self doInspect:true 
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   772
!
fc38f714f4ab checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   773
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   774
doFollow
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   775
    "user selected follow-menu entry"
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   776
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   777
    |objectToInspect|
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   778
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   779
    selectionIndex notNil ifTrue:[
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   780
        objectToInspect := self selection.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   781
        inspectHistory isNil ifTrue:[
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   782
            inspectHistory := OrderedCollection new
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   783
        ].
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   784
        inspectHistory addLast:inspectedObject.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   785
        self inspect:objectToInspect.
1895
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   786
    ]
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   787
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   788
    "Created: / 22.9.1998 / 18:21:08 / cg"
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   789
    "Modified: / 22.9.1998 / 18:22:23 / cg"
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   790
!
8b51d61d9c0a added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents: 1873
diff changeset
   791
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   792
doInspect
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   793
    "user selected inspect-menu entry"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   794
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   795
    self doInspect:false
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   796
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   797
1365
4a98e9a59430 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
   798
doNewInspect
4a98e9a59430 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
   799
    self doInspect:#new
4a98e9a59430 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
   800
4a98e9a59430 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
   801
    "Created: / 31.10.1997 / 12:45:38 / cg"
4a98e9a59430 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
   802
    "Modified: / 31.10.1997 / 12:47:11 / cg"
4a98e9a59430 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
   803
!
4a98e9a59430 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
   804
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   805
doStartMonitor
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   806
    "start a monitoring process"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   807
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   808
    monitorProcess isNil ifTrue:[
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   809
        monitorProcess :=
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   810
            [
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   811
                |sel|
295
92bcaa9996ae minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents: 268
diff changeset
   812
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   813
                [true] whileTrue:[
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   814
                    (sel := selectionIndex) notNil ifTrue:[
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   815
                        self showSelection:sel 
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   816
                    ].
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   817
                    (Delay forSeconds:0.5) wait
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   818
                ]
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   819
            ] forkAt:Processor userBackgroundPriority
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   820
    ]
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   821
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   822
    "Modified: 12.4.1996 / 14:20:06 / cg"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   823
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   824
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   825
doStopMonitor
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   826
    "stop the monitor"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   827
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   828
    monitorProcess terminate.
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   829
    monitorProcess := nil
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   830
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   831
2800
4e5792ade7aa menu fix
Claus Gittinger <cg@exept.de>
parents: 2724
diff changeset
   832
doTraceAll
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   833
    "place a trace on all messages sent to the inspected object"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   834
1597
48629e1fc7b6 use new menu-creation message in PopUpMenu.
Claus Gittinger <cg@exept.de>
parents: 1570
diff changeset
   835
    self topView withWaitCursorDo:[MessageTracer traceAll:inspectedObject on:Transcript]
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   836
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   837
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   838
doTrap
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   839
    "place a trap on a message sent to the inspected object"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   840
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   841
    |string selector|
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   842
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   843
    string := Dialog request:'Selector to trap on:' onCancel:nil.
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   844
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   845
    string notNil ifTrue:[
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   846
	selector := string asSymbolIfInterned.
901
56fe927e0734 fix doTrap
ca
parents: 874
diff changeset
   847
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   848
	selector isNil ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   849
	    self warn:'no such selector'
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   850
	] ifFalse:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   851
	    self topView withWaitCursorDo:[MessageTracer trap:inspectedObject 
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   852
							 selector:selector]
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   853
	]
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   854
    ]
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   855
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   856
    "Modified: 12.4.1996 / 14:07:01 / cg"
901
56fe927e0734 fix doTrap
ca
parents: 874
diff changeset
   857
56fe927e0734 fix doTrap
ca
parents: 874
diff changeset
   858
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   859
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   860
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   861
doTrapAll
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   862
    "place a trap on all messages sent to the inspected object"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   863
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   864
    self topView withWaitCursorDo:[MessageTracer trapAll:inspectedObject]
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   865
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   866
2850
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   867
doTrapAnyInstVarChange
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   868
    "place a trap which is triggered if any instVar of the inspected object is changed"
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   869
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   870
    self topView withWaitCursorDo:[
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   871
        MessageTracer trapModificationsIn:inspectedObject
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   872
    ]
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   873
!
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   874
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   875
doTrapInstVarChange
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   876
    "place a trap which is triggered if the selected instVar of the inspected object is changed"
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   877
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   878
    self topView withWaitCursorDo:[
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   879
        |idx|
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   880
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   881
        "/ a named instVar ?
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   882
        idx := self instVarIndexForLine:selectionIndex.
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   883
        idx isNil ifTrue:[
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   884
            self warn:'select an instance variable first.'.
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   885
            ^ self.
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   886
        ].
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   887
        MessageTracer 
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   888
                trapModificationsOf:(inspectedObject class allInstVarNames at:idx)
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   889
                in:inspectedObject
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   890
    ]
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   891
!
f05e61a40fe8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2800
diff changeset
   892
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   893
doUntrace
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   894
    "remove traps/traces"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   895
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   896
    MessageTracer untrace:inspectedObject
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   897
!
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   898
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   899
inspectOwners
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   900
    "open an inspector on owners of the inspectedObject.
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   901
     (this is a secret function)"
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   902
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   903
    self withCursor:(Cursor questionMark) do:[
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   904
	|owners dict|
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   905
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   906
	owners := (ObjectMemory whoReferences:inspectedObject) asOrderedCollection.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   907
	owners size > 500 ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   908
	    (self confirm:'there are ' , owners size printString , ' owners.\\Do you really want to see them all ?' withCRs)
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   909
	    ifFalse:[^ self]
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   910
	].
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   911
	dict := IdentityDictionary new.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   912
	owners do:[:owner |
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   913
	    |set names oClass|
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   914
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   915
	    owner ~~ self ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   916
		set := Set new.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   917
		names := owner class allInstVarNames.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   918
		oClass := owner class.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   919
		1 to:oClass instSize do:[:i |
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   920
		    (owner instVarAt:i) == inspectedObject ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   921
			set add:(names at:i).
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   922
		    ].
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   923
		].
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   924
		oClass isVariable ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   925
		    oClass isPointers ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   926
			1 to:owner basicSize do:[:i |
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   927
			    (owner basicAt:i) == inspectedObject ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   928
				 set add:i
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   929
			    ]
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   930
			]
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   931
		    ]
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   932
		].
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   933
		dict at:owner put:set
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   934
	    ].
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   935
	].
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
   936
	dict inspect
472
7e2d83585ed7 category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents: 446
diff changeset
   937
    ]
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   938
!
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   939
6283
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   940
openFileBrowser
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   941
    |fn|
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   942
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   943
    fn := self selection.
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   944
    (UserPreferences current fileBrowserClass) openOnFileNamed:fn.
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   945
!
7fa17d36a91c +openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents: 6130
diff changeset
   946
2587
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   947
showStreamContents
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   948
    |sel|
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   949
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   950
    sel := self selection.
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   951
    (sel isStream and:[sel isExternalStream not]) ifTrue:[
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   952
        workspace replace:(sel contents printString)
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   953
    ].
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   954
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   955
    "Created: / 6.2.2000 / 13:46:37 / cg"
b6838cdb1f14 added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents: 2580
diff changeset
   956
    "Modified: / 6.2.2000 / 13:47:37 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   957
! !
e332d9c71624 *** empty log message ***
claus
parents: 71
diff changeset
   958
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   959
!InspectorView methodsFor:'private'!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
   960
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   961
baseInspectedObjectClass
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   962
    ^ Object
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   963
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   964
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   965
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
   966
4984
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   967
basicDisplayStringForValue:someValue 
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   968
    "return the values displayString"
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   969
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   970
    |s sel|
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   971
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   972
    sel := listView at:selectionIndex.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   973
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   974
    Error handle:[:ex |
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   975
        s := someValue classNameWithArticle.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   976
        displayStringMessage == #displayString ifTrue:[
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   977
            s := s , ' "error in displayString: ' , ex description , '"'
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   978
        ] ifFalse:[
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   979
            s := s , ' "error in displayString (' , displayStringMessage , '): ' , ex description , '"'
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   980
        ]
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   981
    ] do:[
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   982
        showHex ifTrue:[
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   983
            someValue isInteger ifTrue:[
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   984
                ^ '16r' , someValue hexPrintString
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   985
            ].
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   986
            (someValue isMemberOf:ByteArray) ifTrue:[
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   987
                ^ String streamContents:[:s | inspectedObject asByteArray printOn:s base:16 showRadix:true]
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   988
"/                    s := '' writeStream.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   989
"/                    s nextPutAll:'#['.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   990
"/                    someValue keysAndValuesDo:[:i :byte |
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   991
"/                        i ~~ 1 ifTrue:[
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   992
"/                            s space
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   993
"/                        ].
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   994
"/                        s nextPutAll:'16r'.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   995
"/                        s nextPutAll:(byte hexPrintString leftPaddedTo:2 with:$0).
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   996
"/                    ].
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   997
"/                    s nextPutAll:']'.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   998
"/                    s := s contents
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
   999
            ]
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1000
        ].
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1001
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1002
        "/ displayStringMessage := #classNameWithArticle
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1003
        "/ displayStringMessage := #displayString
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1004
        "/ displayStringMessage := #printString
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1005
        s := someValue perform:displayStringMessage.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1006
    ].
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1007
    ^ s.
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1008
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1009
    "Modified: / 31.10.2001 / 10:44:16 / cg"
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1010
!
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1011
647
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
  1012
defaultLabel
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1013
    ^ 'InstVars'
647
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
  1014
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
  1015
    "Modified: 28.6.1996 / 16:04:53 / cg"
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
  1016
!
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
  1017
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1018
derivedFieldNames
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1019
    |d|
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1020
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1021
    d := self derivedFields.
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1022
    (d isKindOf:Dictionary) ifTrue:[
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1023
        ^ d keys asSortedCollection.
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1024
    ].
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1025
    ^ d collect:[:eachEntry |
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1026
            |nm|
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1027
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1028
            nm := (eachEntry isAssociation) 
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1029
                    ifTrue:[ eachEntry key ] 
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1030
                    ifFalse:[ eachEntry first ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1031
            '-',nm
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1032
        ]
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1033
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1034
    "Created: / 03-08-2006 / 15:02:54 / cg"
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1035
    "Modified: / 18-09-2006 / 21:18:57 / cg"
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1036
!
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1037
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1038
derivedFields
7054
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1039
    "the check below is not sufficient - if someone catches messages, for example.
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1040
     Therefore, we do a manual lookup here:"
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1041
    (object class whichClassImplements:#inspectorExtraAttributes) isNil ifTrue:[
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1042
        ^ #()
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1043
    ].
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1044
    ^ [object inspectorExtraAttributes]
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1045
                on: MessageNotUnderstood
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1046
                do: [:ex | ex return: #() ]
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1047
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1048
    "Created: / 17-07-2006 / 11:02:32 / cg"
7054
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1049
    "Modified: / 29-08-2006 / 13:03:31 / cg"
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1050
!
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1051
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1052
displayStringForValue:someValue 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1053
    "return the values displayString"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1054
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1055
    |sel radix extraAttributes|
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1056
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1057
    sel := listView at:selectionIndex.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1058
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1059
    extraAttributes := inspectedObject inspectorExtraAttributes.
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1060
    (extraAttributes notNil and:[extraAttributes includesKey:sel]) ifTrue:[
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1061
        ^ (extraAttributes at:sel) value printString
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1062
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1063
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1064
    (sel startsWith:'-all inst vars') ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1065
        ^ self stringWithAllInstVarValues
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1066
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1067
    (sel startsWith:'-all indexed vars') ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1068
        ^ self stringWithAllIndexedVarValues
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1069
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1070
4984
8a11dd7973bd hex printing
Claus Gittinger <cg@exept.de>
parents: 4642
diff changeset
  1071
    ^ self basicDisplayStringForValue:someValue
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1072
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1073
    "Modified: / 18-09-2006 / 21:34:26 / cg"
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1074
!
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1075
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1076
extraNamedFieldNames
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1077
    ^ self extraNamedFields 
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1078
        collect:[:eachEntry |
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1079
            |nm|
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1080
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1081
            nm := (eachEntry isAssociation) 
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1082
                    ifTrue:[ eachEntry key ] 
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1083
                    ifFalse:[ eachEntry first ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1084
            '`',nm
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1085
        ]
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1086
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1087
    "Modified: / 03-08-2006 / 15:17:19 / cg"
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1088
!
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1089
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1090
extraNamedFields
6940
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
  1091
    "by redefining inspectorExtraNamedFields to return an array of
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
  1092
     pseudo-fieldName->value associations, the inspectors left list can be extended"
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
  1093
7054
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1094
    "the check below is not sufficient - if someone catches messages, for example.
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1095
     Therefore, we do a manual lookup here:"
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1096
    (object class whichClassImplements:#inspectorExtraNamedFields) isNil ifTrue:[
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1097
        ^ #()
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1098
    ].
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1099
    ^ [object inspectorExtraNamedFields]
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1100
                on: MessageNotUnderstood
6940
c95880ea4d17 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6851
diff changeset
  1101
                do: [:ex | ex return: #() ]
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1102
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1103
    "Created: / 03-08-2006 / 13:34:18 / cg"
7054
89bf9a75fb79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6940
diff changeset
  1104
    "Modified: / 29-08-2006 / 13:03:57 / cg"
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1105
!
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1106
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1107
extraNamedVarIndexForLine:lineNr
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1108
    "helper - return the index for a named instVar;
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1109
     nil, if self or a keyed instvar is selected."
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1110
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1111
    |idx nNamedInstvarsShown nExtraNamedInstvarsShown cls baseCls firstRealIndex line|
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1112
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1113
    lineNr isNil ifTrue:[^ nil].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1114
    firstRealIndex := 1.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1115
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1116
    idx := lineNr.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1117
    self hasSelfEntry ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1118
        (lineNr == 1 or:[lineNr isNil]) ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1119
            ^ nil "/ self selected
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1120
        ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1121
        idx := idx - 1.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1122
        firstRealIndex := 2.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1123
    ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1124
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1125
    [line := listView at:firstRealIndex. 
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1126
     (line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1127
        firstRealIndex := firstRealIndex + 1.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1128
        idx := idx - 1.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1129
    ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1130
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1131
    cls := inspectedObject class.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1132
    baseCls := self baseInspectedObjectClass.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1133
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1134
    nNamedInstvarsShown := cls instSize.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1135
    "/ only the namedInstvars below baseInspectedObjectClass
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1136
    "/ are shown ...
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1137
    (cls == baseCls or:[cls isSubclassOf:baseCls]) ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1138
        nNamedInstvarsShown := nNamedInstvarsShown - baseCls instSize.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1139
    ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1140
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1141
    idx := idx - nNamedInstvarsShown.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1142
    idx < 1 ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1143
        ^ nil.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1144
    ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1145
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1146
    nExtraNamedInstvarsShown := self extraNamedFields size.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1147
    idx <= nExtraNamedInstvarsShown ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1148
        ^ idx.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1149
    ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1150
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1151
    ^ nil "/ indexed instvar or other selected
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1152
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1153
    "Created: / 03-08-2006 / 13:45:14 / cg"
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1154
    "Modified: / 04-08-2006 / 11:45:29 / cg"
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1155
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1156
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1157
fieldList 
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1158
    "return a list of names to show in the selectionList.
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1159
     Leave hasMore as true, if a '...' entry should be added."
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1160
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1161
    |derivedFieldList namedFieldList fieldList cls indexedList extraNamedFieldList|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1162
3338
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1163
    inspectedObject isNil ifTrue:[
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1164
        ^ self hasSelfEntry ifFalse:[ #() ] ifTrue:[ #('-self') ]
3338
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1165
    ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1166
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1167
    cls := inspectedObject class.
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1168
2275
b402f5173c79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
  1169
    self topView withWaitCursorDo:[
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1170
        namedFieldList := self namedFieldList.
3868
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1171
        indexedList := self indexedFieldList.
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1172
        extraNamedFieldList := OrderedCollection new.
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1173
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1174
        self hasSelfEntry ifTrue:[
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1175
            self suppressPseudoSlots ifFalse:[
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1176
                derivedFieldList := OrderedCollection new.
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1177
                derivedFieldList add:'-self'.
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1178
                derivedFieldList add:'-hash'.
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1179
                derivedFieldList add:'-identityHash'.
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1180
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1181
                cls hasImmediateInstances ifFalse:[
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1182
                    derivedFieldList add:'-dependents'.
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1183
                ].
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1184
                cls instSize > 0 ifTrue:[
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1185
                    derivedFieldList add:'-all inst vars'.
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1186
                ].
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1187
                (indexedList notNil and:[self showAllIndexedVarsInFieldList]) ifTrue:[
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1188
                    derivedFieldList add:'-all indexed vars'.
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1189
                ].
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1190
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1191
                derivedFieldList addAll:(self derivedFieldNames).
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1192
                extraNamedFieldList addAll:(self extraNamedFieldNames).
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1193
            ].
3525
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1194
        ].
531
4b079a4e85b4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
  1195
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1196
        fieldList := OrderedCollection new.
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1197
        derivedFieldList notNil ifTrue:[fieldList addAll:derivedFieldList].
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1198
        namedFieldList notNil ifTrue:[fieldList addAll:namedFieldList].
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1199
        extraNamedFieldList notNil ifTrue:[fieldList addAll:extraNamedFieldList].
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1200
        indexedList notNil ifTrue:[fieldList addAll:indexedList].
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1201
    ].
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1202
    ^ fieldList
531
4b079a4e85b4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
  1203
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1204
    "Modified: / 18-09-2006 / 21:16:03 / cg"
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1205
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1206
295
92bcaa9996ae minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents: 268
diff changeset
  1207
hasSelfEntry
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1208
    ^ hideReceiver not and:[self suppressPseudoSlots not]
295
92bcaa9996ae minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents: 268
diff changeset
  1209
92bcaa9996ae minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents: 268
diff changeset
  1210
    "Created: 14.12.1995 / 19:30:03 / cg"
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
  1211
    "Modified: 28.6.1996 / 15:13:41 / cg"
295
92bcaa9996ae minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents: 268
diff changeset
  1212
!
92bcaa9996ae minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents: 268
diff changeset
  1213
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1214
indexList 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1215
    "return a list of indexes to show in the selectionList.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1216
     Set hasMore to true, if a '...' entry should be added."
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1217
3526
d8f3082ea1d7 Remove unused vars
Stefan Vogel <sv@exept.de>
parents: 3525
diff changeset
  1218
    | n cls|
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1219
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1220
    cls := inspectedObject class.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1221
3868
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1222
    cls isVariable ifFalse:[^ nil ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1223
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1224
    n := inspectedObject basicSize.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1225
    (n > nShown) ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1226
        n := nShown.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1227
        hasMore := true.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1228
    ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1229
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1230
    ^ (1 to:n)
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1231
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1232
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1233
indexedFieldList 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1234
    "return a list of indexed-variable names to show in the selectionList.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1235
     Set hasMore to true, if a '...' entry should be added."
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1236
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1237
    |l|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1238
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1239
    l := self indexList.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1240
    l isNil ifTrue:[^ nil ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1241
    ^ l collect:[:i | i printString].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1242
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1243
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1244
indexedValueAtIndex:idx
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1245
    ^ inspectedObject basicAt:idx
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1246
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1247
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1248
indexedValueAtIndex:idx put:newValue
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1249
    inspectedObject basicAt:idx put:newValue
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1250
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1251
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1252
indexedValueAtKey:key
4314
7dbc212d0cd2 kludge to show Float bytes
Claus Gittinger <cg@exept.de>
parents: 4268
diff changeset
  1253
    "/ kludge
7dbc212d0cd2 kludge to show Float bytes
Claus Gittinger <cg@exept.de>
parents: 4268
diff changeset
  1254
    inspectedObject isLimitedPrecisionReal ifTrue:[
7dbc212d0cd2 kludge to show Float bytes
Claus Gittinger <cg@exept.de>
parents: 4268
diff changeset
  1255
        ^ inspectedObject basicAt:key
7dbc212d0cd2 kludge to show Float bytes
Claus Gittinger <cg@exept.de>
parents: 4268
diff changeset
  1256
    ].
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1257
    ^ inspectedObject at:key
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1258
!
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1259
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1260
instVarIndexForLine:lineNr
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1261
    "helper - return the index for a named instVar;
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1262
     nil, if self or a keyed instvar is selected."
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1263
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 5134
diff changeset
  1264
    |idx nNamedInstvarsShown cls baseCls firstRealIndex line|
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1265
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1266
    lineNr isNil ifTrue:[^ nil].
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1267
    firstRealIndex := 1.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1268
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1269
    idx := lineNr.
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1270
    self hasSelfEntry ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1271
        (lineNr == 1 or:[lineNr isNil]) ifTrue:[
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1272
            ^ nil "/ self selected
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1273
        ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1274
        idx := idx - 1.
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1275
        firstRealIndex := 2.
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1276
    ].
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1277
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 5134
diff changeset
  1278
    [line := listView at:firstRealIndex. 
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 5134
diff changeset
  1279
     (line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1280
        firstRealIndex := firstRealIndex + 1.
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1281
        idx := idx - 1.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1282
    ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1283
2447
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1284
    cls := inspectedObject class.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1285
    baseCls := self baseInspectedObjectClass.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1286
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1287
    nNamedInstvarsShown := cls instSize.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1288
    "/ only the namedInstvars below baseInspectedObjectClass
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1289
    "/ are shown ...
2447
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1290
    (cls == baseCls or:[cls isSubclassOf:baseCls]) ifTrue:[
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1291
        nNamedInstvarsShown := nNamedInstvarsShown - baseCls instSize.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1292
    ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1293
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1294
    idx <= nNamedInstvarsShown ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1295
        ^ idx + self baseInspectedObjectClass instSize.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1296
    ].
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1297
    ^ nil "/ indexed instvar or other selected
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1298
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1299
    "Modified: / 31.10.2001 / 09:20:20 / cg"
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1300
!
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1301
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1302
keyIndexForLine:lineNr
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1303
    "helper - return the index of the key-list;
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1304
     nil, if self or a namedInstVar is selected."
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1305
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1306
    |idx nNamedInstvarsShown nExtraNamedInstvarsShown cls baseCls firstRealIndex line|
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1307
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1308
    lineNr isNil ifTrue:[^ nil].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1309
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1310
    firstRealIndex := 1.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1311
    idx := lineNr.
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1312
    self hasSelfEntry ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1313
        (lineNr == 1 or:[lineNr isNil]) ifTrue:[
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1314
            ^ nil "/ self selected
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1315
        ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1316
        idx := idx - 1.
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1317
        firstRealIndex := firstRealIndex + 1.
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1318
    ].
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1319
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 5134
diff changeset
  1320
    [line := listView at:firstRealIndex. 
5881
ef6791c315ab oops - out of bounds error fixed
Claus Gittinger <cg@exept.de>
parents: 5845
diff changeset
  1321
     line notNil
ef6791c315ab oops - out of bounds error fixed
Claus Gittinger <cg@exept.de>
parents: 5845
diff changeset
  1322
     and:[(line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]]
ef6791c315ab oops - out of bounds error fixed
Claus Gittinger <cg@exept.de>
parents: 5845
diff changeset
  1323
    ] whileTrue:[
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1324
        firstRealIndex := firstRealIndex + 1.
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1325
        idx := idx - 1.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1326
    ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1327
2447
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1328
    cls := inspectedObject class.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1329
    baseCls := self baseInspectedObjectClass.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1330
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1331
    nNamedInstvarsShown := cls instSize.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1332
    "/ only the namedInstvars below baseInspectedObjectClass
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1333
    "/ are shown ...
2447
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1334
    (cls == baseCls or:[cls isSubclassOf:baseCls]) ifTrue:[
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1335
        nNamedInstvarsShown := nNamedInstvarsShown - baseCls instSize.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1336
    ].
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1337
    nExtraNamedInstvarsShown := self extraNamedFields size.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1338
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1339
    idx <= (nNamedInstvarsShown+nExtraNamedInstvarsShown) ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1340
        ^ nil "/ named instVar selected.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1341
    ].
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1342
    ^ idx - (nNamedInstvarsShown+nExtraNamedInstvarsShown).
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1343
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1344
    "Modified: / 04-08-2006 / 11:45:42 / cg"
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1345
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1346
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1347
namedFieldList 
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1348
    "return a list of instVar names to show in the selectionList."
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1349
2447
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1350
    |aList cls baseCls|
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1351
2447
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1352
    cls := inspectedObject class.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1353
    baseCls := self baseInspectedObjectClass.
95055cf58b2e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2446
diff changeset
  1354
3351
64cdbec2dd8e text display
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  1355
    aList := OrderedCollection new.
3338
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1356
3351
64cdbec2dd8e text display
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  1357
    aList addAll:(cls allInstVarNames).
64cdbec2dd8e text display
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  1358
    (cls == baseCls or:[cls isSubclassOf:baseCls]) ifTrue:[
64cdbec2dd8e text display
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  1359
        "/ hide some stuff
64cdbec2dd8e text display
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  1360
        aList := aList copyFrom:(self baseInspectedObjectClass instSize + 1).
64cdbec2dd8e text display
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  1361
    ].
64cdbec2dd8e text display
Claus Gittinger <cg@exept.de>
parents: 3349
diff changeset
  1362
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1363
    ^ aList
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1364
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1365
    "Modified: / 18-09-2006 / 21:35:30 / cg"
6372
d59bab947578 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6283
diff changeset
  1366
!
d59bab947578 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6283
diff changeset
  1367
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1368
setAcceptAction
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1369
    "set the codeViews accept action"
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1370
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1371
    |acceptAction sel|
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1372
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1373
    acceptAction := [:theText | self doAccept:theText asString].
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1374
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1375
    (selectionIndex isNil 
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1376
    or:[ inspectedObject class hasImmediateInstances])
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1377
    ifTrue:[
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1378
        acceptAction := nil.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1379
    ] ifFalse:[
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1380
        sel := listView at:selectionIndex.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1381
3868
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1382
        (sel startsWith:'-all') ifTrue:[
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1383
            acceptAction := nil.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1384
        ].
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1385
        (sel startsWith:'-hash') ifTrue:[
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1386
            acceptAction := nil.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1387
        ].
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1388
        (sel startsWith:'-identityHash') ifTrue:[
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1389
            acceptAction := nil.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1390
        ].
3634
db094dd598f7 -dependents
Claus Gittinger <cg@exept.de>
parents: 3608
diff changeset
  1391
        (sel startsWith:'-dependents') ifTrue:[
db094dd598f7 -dependents
Claus Gittinger <cg@exept.de>
parents: 3608
diff changeset
  1392
            acceptAction := nil.
db094dd598f7 -dependents
Claus Gittinger <cg@exept.de>
parents: 3608
diff changeset
  1393
        ].
5134
536fbfead179 source field for methods
Claus Gittinger <cg@exept.de>
parents: 4999
diff changeset
  1394
        (sel startsWith:'-source') ifTrue:[
536fbfead179 source field for methods
Claus Gittinger <cg@exept.de>
parents: 4999
diff changeset
  1395
            acceptAction := nil.
536fbfead179 source field for methods
Claus Gittinger <cg@exept.de>
parents: 4999
diff changeset
  1396
        ].
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1397
    ].
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1398
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1399
    workspace acceptAction:acceptAction.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1400
!
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1401
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1402
setDoItAction
542
12d3bf714076 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
  1403
    "set the codeViews doit action"
12d3bf714076 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
  1404
12d3bf714076 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
  1405
    workspace 
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1406
	doItAction:[:theCode |
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1407
	    |evaluator|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1408
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1409
	    (evaluator := inspectedObject class evaluatorClass)
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1410
	    notNil ifTrue:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1411
		evaluator
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1412
		    evaluate:theCode 
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1413
		    in:nil 
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1414
		    receiver:inspectedObject 
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1415
		    notifying:workspace 
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1416
		    logged:true 
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1417
		    ifFail:nil
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1418
	    ] ifFalse:[
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1419
		'objects class provides no evaluator'
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1420
	    ]
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1421
	].
542
12d3bf714076 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 531
diff changeset
  1422
1270
3dc841708edd disable accept/doIt, if instances class provides no evaluator
Claus Gittinger <cg@exept.de>
parents: 1235
diff changeset
  1423
    inspectedObject class evaluatorClass isNil ifTrue:[
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1424
	workspace doItAction:nil.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1425
	workspace acceptAction:nil.
1270
3dc841708edd disable accept/doIt, if instances class provides no evaluator
Claus Gittinger <cg@exept.de>
parents: 1235
diff changeset
  1426
    ]
3dc841708edd disable accept/doIt, if instances class provides no evaluator
Claus Gittinger <cg@exept.de>
parents: 1235
diff changeset
  1427
3dc841708edd disable accept/doIt, if instances class provides no evaluator
Claus Gittinger <cg@exept.de>
parents: 1235
diff changeset
  1428
    "Modified: 1.8.1997 / 21:47:09 / cg"
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1429
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1430
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1431
showAllIndexedVarsInFieldList
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1432
    ^ true
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1433
!
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3874
diff changeset
  1434
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1435
showMore
1855
24108d2b3374 oops - fixed showMore handling
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  1436
    |o|
24108d2b3374 oops - fixed showMore handling
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  1437
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1438
    hasMore ifTrue:[
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1439
        nShown := nShown * 2.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1440
        "/ force update (which is otherwise ignored)
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1441
        o := inspectedObject.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1442
        inspectedObject := object := nil.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1443
        self inspect:o
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1444
    ]
1855
24108d2b3374 oops - fixed showMore handling
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  1445
24108d2b3374 oops - fixed showMore handling
Claus Gittinger <cg@exept.de>
parents: 1770
diff changeset
  1446
    "Modified: / 26.8.1998 / 19:05:25 / cg"
1739
d98fa6eea4fc added show references
Claus Gittinger <cg@exept.de>
parents: 1634
diff changeset
  1447
!
d98fa6eea4fc added show references
Claus Gittinger <cg@exept.de>
parents: 1634
diff changeset
  1448
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1449
showSelection:lineNr
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1450
    "user clicked on an instvar - show value in workspace"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1451
3526
d8f3082ea1d7 Remove unused vars
Stefan Vogel <sv@exept.de>
parents: 3525
diff changeset
  1452
    |val|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1453
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1454
    (hasMore and:[lineNr == listView list size]) ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1455
        "clicked on the '...' entry"
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1456
        self showMore.
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1457
        listView setSelection:lineNr.
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1458
    ].
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1459
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1460
    self hasSelfEntry ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1461
        (self hasSelfEntry and:[lineNr == 1]) ifTrue:[
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1462
            "selecting self also does a re-set, this allows updating the list"
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1463
            self reinspect.
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2188
diff changeset
  1464
        ].
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1465
    ].
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1466
    selectionIndex := selectedLine := lineNr.
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1467
    val := self selection.
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1468
    self showValue:val.
295
92bcaa9996ae minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents: 268
diff changeset
  1469
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1470
    self setAcceptAction.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1471
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1472
    "Modified: / 03-08-2006 / 14:26:22 / cg"
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1473
!
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1474
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1475
showValue:someValue 
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1476
    "user clicked on an entry - show value in workspace"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1477
3338
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1478
    |s|
1634
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1479
3338
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1480
    self topView withWaitCursorDo:[
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1481
        s := self displayStringForValue:someValue.
7626
9a2b4d6855a2 avoid flicker when monitoring
Claus Gittinger <cg@exept.de>
parents: 7297
diff changeset
  1482
        s = workspace selectionAsString ifFalse:[
9a2b4d6855a2 avoid flicker when monitoring
Claus Gittinger <cg@exept.de>
parents: 7297
diff changeset
  1483
            workspace replace:s.
9a2b4d6855a2 avoid flicker when monitoring
Claus Gittinger <cg@exept.de>
parents: 7297
diff changeset
  1484
        ].
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1485
    ].
7626
9a2b4d6855a2 avoid flicker when monitoring
Claus Gittinger <cg@exept.de>
parents: 7297
diff changeset
  1486
9a2b4d6855a2 avoid flicker when monitoring
Claus Gittinger <cg@exept.de>
parents: 7297
diff changeset
  1487
    "Modified: / 06-02-2007 / 14:26:47 / cg"
1634
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1488
!
216a4254e634 added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents: 1597
diff changeset
  1489
3868
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1490
stringWithAllIndexedVarValues
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1491
    |nIdx s names maxLen varString padLeft|
3868
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1492
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1493
    nIdx := inspectedObject size.
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1494
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1495
    s := '' writeStream.
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1496
    names := self indexList.
4999
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1497
    names size > 0 ifTrue:[
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1498
        maxLen := (names collect:[:eachName | eachName printString size]) max.
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1499
        padLeft := names conform:[:eachIdx | eachIdx isInteger].
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1500
        
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1501
        names do:[:eachIdx |
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1502
            |val|
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1503
4999
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1504
            padLeft ifTrue:[
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1505
                s nextPutAll:(eachIdx printStringLeftPaddedTo:maxLen).
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1506
            ] ifFalse:[
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1507
                s nextPutAll:((eachIdx printString , ' ') paddedTo:maxLen+1 with:$.).
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1508
            ].
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1509
4999
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1510
            s nextPutAll:' : '.
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1511
            val := self indexedValueAtKey:eachIdx.
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1512
4999
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1513
            varString := self basicDisplayStringForValue:val.
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1514
            (varString includes:Character cr) ifTrue:[
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1515
                varString := varString copyTo:(varString indexOf:Character cr)-1.
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1516
                varString := varString , '...'.
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1517
            ].
16a311e32900 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4984
diff changeset
  1518
            s nextPutLine:varString.
3868
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1519
        ].
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1520
    ].
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1521
    nShown < nIdx ifTrue:[
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1522
        s nextPutLine:' ...'.
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1523
    ].
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1524
    ^ s contents
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1525
!
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1526
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1527
stringWithAllInstVarValues
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1528
    |s names maxLen varString|
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1529
5669
10e2da1659cf care for non-8bit strings in instvars (when printing)
Claus Gittinger <cg@exept.de>
parents: 5648
diff changeset
  1530
    s := WriteStream on:Unicode32String new.
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1531
    names := inspectedObject class allInstVarNames.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1532
    maxLen := (names collect:[:eachName | eachName size]) max.
5498
d744ff2c39f0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5492
diff changeset
  1533
    names keysAndValuesDo:[:eachInstVarIndex :eachInstVarName |
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1534
        s nextPutAll:((eachInstVarName , ' ') paddedTo:maxLen+1 with:$.).
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1535
        s nextPutAll:' : '.
5498
d744ff2c39f0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5492
diff changeset
  1536
        varString := self basicDisplayStringForValue:(inspectedObject instVarAt:eachInstVarIndex).
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1537
        (varString includes:Character cr) ifTrue:[
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1538
            varString := varString copyTo:(varString indexOf:Character cr)-1.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1539
            varString := varString , '...'.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1540
        ].
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1541
        s nextPutAll:varString.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1542
        s cr.
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1543
    ].
5669
10e2da1659cf care for non-8bit strings in instvars (when printing)
Claus Gittinger <cg@exept.de>
parents: 5648
diff changeset
  1544
    ^ s contents asSingleByteStringIfPossible
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1545
!
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1546
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1547
valueAtLine:lineNr
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1548
    "helper - return the value of the selected entry"
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1549
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1550
    |idx l val|
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1551
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1552
    (self hasSelfEntry
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1553
    and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1554
        ^ inspectedObject
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1555
    ].
2235
ce49947e61f7 migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  1556
3645
d88ce5dea1ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3639
diff changeset
  1557
    ((l := listView at:lineNr) startsWith:$-) ifTrue:[
5421
86a6077b131d Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents: 5134
diff changeset
  1558
        (l ~= '-' and:[(l at:2) isDigit not "negative number"]) ifTrue:[
3645
d88ce5dea1ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3639
diff changeset
  1559
            ^ self valueForSpecialLine:(listView at:lineNr)
d88ce5dea1ce *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3639
diff changeset
  1560
        ].
3338
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1561
    ].
c2691e356f51 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3318
diff changeset
  1562
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1563
    "/ a named instVar ?
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1564
    idx := self instVarIndexForLine:lineNr.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1565
    idx notNil ifTrue:[
3432
087493c18c74 class based exceptions - no longer need to send #breakPointSígnal
Claus Gittinger <cg@exept.de>
parents: 3428
diff changeset
  1566
        BreakPointInterrupt catch:[
2800
4e5792ade7aa menu fix
Claus Gittinger <cg@exept.de>
parents: 2724
diff changeset
  1567
            ^ inspectedObject instVarAt:idx
4e5792ade7aa menu fix
Claus Gittinger <cg@exept.de>
parents: 2724
diff changeset
  1568
        ]
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1569
    ].
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1570
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1571
    "/ an extra named field ?
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1572
    idx := self extraNamedVarIndexForLine:lineNr.
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1573
    idx notNil ifTrue:[
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1574
        BreakPointInterrupt catch:[
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1575
            val := ((self extraNamedFields) at:idx) value.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1576
            val isBlock ifTrue:[ val := val value ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1577
            ^ val
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1578
        ]
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1579
    ].
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1580
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1581
    "/ an indexed instVar ?
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1582
    idx := self keyIndexForLine:lineNr.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1583
    idx notNil ifTrue:[
3432
087493c18c74 class based exceptions - no longer need to send #breakPointSígnal
Claus Gittinger <cg@exept.de>
parents: 3428
diff changeset
  1584
        BreakPointInterrupt catch:[
2800
4e5792ade7aa menu fix
Claus Gittinger <cg@exept.de>
parents: 2724
diff changeset
  1585
            ^ self indexedValueAtIndex:idx.
4e5792ade7aa menu fix
Claus Gittinger <cg@exept.de>
parents: 2724
diff changeset
  1586
        ]
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1587
    ].
644
aab7d4f7c8c3 allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents: 621
diff changeset
  1588
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1589
    "/ nope
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1590
    ^ nil
613
048942111c7b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1591
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1592
    "Modified: / 03-08-2006 / 14:05:30 / cg"
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1593
!
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1594
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1595
valueAtLine:lineNr put:newValue
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1596
    |idx|
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1597
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1598
    idx := self instVarIndexForLine:selectionIndex.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1599
    idx notNil ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1600
        inspectedObject instVarAt:idx put:newValue.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1601
    ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1602
        idx := self keyIndexForLine:selectionIndex.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1603
        idx notNil ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1604
            self indexedValueAtIndex:idx put:newValue.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1605
        ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1606
            ^ self "/ self selected - dont store
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1607
        ]
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2235
diff changeset
  1608
    ].
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1609
!
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1610
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1611
valueForSpecialLine:line
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1612
    |idx fieldEntry val extraAttributes|
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1613
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1614
    extraAttributes := inspectedObject inspectorExtraAttributes.
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1615
    (extraAttributes includesKey:line) ifTrue:[
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1616
        ^ (extraAttributes at:line) value 
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1617
    ].
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1618
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1619
    idx := self derivedFieldNames indexOf:line.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1620
    idx ~~ 0 ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1621
        fieldEntry := self derivedFields at:idx.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1622
    ] ifFalse:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1623
        idx := self extraNamedFieldNames indexOf:line.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1624
        idx ~~ 0 ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1625
            fieldEntry := self extraNamedFields at:idx.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1626
        ].
6840
52d3f2cbf130 extraNamedField support
Claus Gittinger <cg@exept.de>
parents: 6823
diff changeset
  1627
    ].
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1628
    fieldEntry notNil ifTrue:[
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1629
        fieldEntry isAssociation ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1630
            ^ fieldEntry value
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1631
        ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1632
        ^ fieldEntry at:2.
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1633
    ].
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1634
3525
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1635
    (line startsWith:'-self') ifTrue:[
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1636
        ^ inspectedObject
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1637
    ].
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1638
    (line startsWith:'-hash') ifTrue:[
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1639
        ^ inspectedObject hash
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1640
    ].
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1641
    (line startsWith:'-identityHash') ifTrue:[
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1642
        ^ inspectedObject identityHash
761785907491 checkin from browser
martin
parents: 3432
diff changeset
  1643
    ].
3634
db094dd598f7 -dependents
Claus Gittinger <cg@exept.de>
parents: 3608
diff changeset
  1644
    (line startsWith:'-dependents') ifTrue:[
db094dd598f7 -dependents
Claus Gittinger <cg@exept.de>
parents: 3608
diff changeset
  1645
        ^ inspectedObject dependents
db094dd598f7 -dependents
Claus Gittinger <cg@exept.de>
parents: 3608
diff changeset
  1646
    ].
3868
77040d8d3526 all indexed vars
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  1647
    (line startsWith:'-all') ifTrue:[
3608
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1648
        ^ inspectedObject
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1649
    ].
aebf9f1eb30e all inst vars
Claus Gittinger <cg@exept.de>
parents: 3567
diff changeset
  1650
3526
d8f3082ea1d7 Remove unused vars
Stefan Vogel <sv@exept.de>
parents: 3525
diff changeset
  1651
    self error:'unknown special line'.
3349
b9a9138f8017 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3338
diff changeset
  1652
6823
40d460dee8df *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
  1653
    "Created: / 31-10-2001 / 09:17:45 / cg"
7297
ea3614b585e4 drag & drop;
Claus Gittinger <cg@exept.de>
parents: 7054
diff changeset
  1654
    "Modified: / 18-09-2006 / 21:34:54 / cg"
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1655
! !
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1656
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1657
!InspectorView methodsFor:'queries'!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1658
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1659
canInspect:anObject
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1660
    ^ anObject inspectorClass == self class
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1661
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1662
5925
6502b73091ab *** empty log message ***
ca
parents: 5913
diff changeset
  1663
compilerClass
6502b73091ab *** empty log message ***
ca
parents: 5913
diff changeset
  1664
    ^ inspectedObject class compilerClass
6502b73091ab *** empty log message ***
ca
parents: 5913
diff changeset
  1665
!
6502b73091ab *** empty log message ***
ca
parents: 5913
diff changeset
  1666
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1667
dereferenceValueHolders
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1668
    ^ dereferenceValueHolders ? false
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1669
!
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1670
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1671
labelFor:anObject
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1672
    "return the windowLabel to use in my topView, when inspecting anObject."
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1673
5913
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1674
    |lbl id|
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1675
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1676
    (self class == InspectorView
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1677
    and:[anObject inspectorClass ~~ InspectorView]) ifTrue:[
6130
8f6c6203e608 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
  1678
        lbl := 'BasicInspector on: '
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1679
    ] ifFalse:[
6130
8f6c6203e608 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
  1680
        lbl := 'Inspector on: '
5958
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1681
    ].
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1682
    (anObject isImmediate
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1683
    or:[anObject isBoolean]) ifFalse:[
6130
8f6c6203e608 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
  1684
        lbl := lbl , '<%2> ' 
5913
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1685
    ].
6130
8f6c6203e608 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6034
diff changeset
  1686
    lbl := lbl , '%1'.
5913
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1687
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1688
    IdDictionary isNil ifTrue:[
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1689
        IdDictionary := WeakIdentityDictionary new.
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1690
    ].
5913
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1691
    [    
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1692
        id := IdDictionary 
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1693
                    at:anObject 
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1694
                    ifAbsentPut:[ 
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1695
                        |nextID|
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1696
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1697
                        nextID := NextSequentialID ? 0.
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1698
                        NextSequentialID := nextID + 1.
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1699
                        nextID
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1700
                    ].
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1701
    ] valueUninterruptably.
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1702
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1703
    ^ self class classResources 
5913
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1704
        string:lbl 
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1705
        with:(self labelNameFor:anObject)
fb86b3bd76db identity id's in label
ca
parents: 5881
diff changeset
  1706
        with:id
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1707
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1708
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1709
labelNameFor:anObject
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1710
    "return the iconLabel to use in my topView, when inspecting anObject.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1711
     Simply returns the className or name of anObjects class"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1712
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1713
    |s|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1714
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1715
    anObject isClass ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1716
        s := anObject displayString
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1717
    ] ifFalse:[
5958
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1718
        ((anObject class == SmallInteger)
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1719
        or:[anObject isBoolean]) ifTrue:[
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1720
            s := anObject printString , ', ' , anObject classNameWithArticle
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1721
        ] ifFalse:[
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1722
            s := anObject classNameWithArticle
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1723
        ].
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1724
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1725
    s isNil ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1726
        anObject isBehavior ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1727
            ^ 'someBehavior'
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1728
        ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1729
        ^ 'something'
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1730
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1731
    ^ s
5958
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1732
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1733
    "
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1734
     1234 inspect
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1735
     true inspect
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1736
     $a inspect
751d314f92c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5925
diff changeset
  1737
    "
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1738
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1739
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1740
selectedKeyName
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1741
    selectionIndex notNil ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1742
        ^ listView listAt:selectionIndex.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1743
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1744
    ^ nil
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1745
!
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1746
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1747
suppressPseudoSlots
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1748
    ^ suppressPseudoSlots ? false
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1749
! !
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1750
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1751
!InspectorView methodsFor:'user interaction'!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1752
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1753
doAccept:theText
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1754
    |sel newValue|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1755
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1756
    sel := listView at:selectionIndex.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1757
    (sel startsWith:'-all') ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1758
        workspace flash.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1759
        ^ self.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1760
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1761
4642
ee63c37d9d3c Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 4314
diff changeset
  1762
    Error handle:[:ex |
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1763
        workspace flash
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1764
    ] do:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1765
        newValue := inspectedObject class evaluatorClass 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1766
                       evaluate:theText
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1767
                       receiver:inspectedObject 
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1768
                       notifying:workspace.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1769
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1770
        self dereferenceValueHolders ifTrue:[
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1771
            (self valueAtLine:selectionIndex) value:newValue
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1772
        ] ifFalse:[
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1773
            self valueAtLine:selectionIndex put:newValue.
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
  1774
        ]
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1775
    ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1776
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1777
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1778
doCopyKey
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1779
    "put the instVar-name into the text-copy-buffer"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1780
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1781
    |nm|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1782
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1783
    selectionIndex notNil ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1784
        nm := listView listAt:selectionIndex.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1785
        nm notNil ifTrue:[
6034
7f7d4b7362dd set selection interface changed
ca
parents: 5958
diff changeset
  1786
            self setClipboardText:(nm asString)
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1787
        ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1788
    ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1789
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1790
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1791
doInspect:basic
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1792
    "user selected inspect-menu entry"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1793
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1794
    |objectToInspect|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1795
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1796
    selectionIndex notNil ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1797
        objectToInspect := self selection.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1798
        basic == #new ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1799
            NewInspector::NewInspectorView inspect:objectToInspect
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1800
        ] ifFalse:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1801
            basic ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1802
                objectToInspect basicInspect
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1803
            ] ifFalse:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1804
                objectToInspect inspect
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1805
            ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1806
        ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1807
    ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1808
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1809
    "Modified: / 31.10.1997 / 12:46:53 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1810
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1811
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1812
doUpdate
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1813
    self reinspect
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1814
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1815
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1816
keyPress:aKey x:x y:y
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1817
    "all my input is passed on to the workspace-field"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1818
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1819
    x notNil ifTrue:[
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1820
	"/ not already delegated
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1821
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1822
	workspace keyPress:aKey x:-1 y:-1
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1823
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1824
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1825
    "Modified: 4.3.1996 / 22:21:37 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1826
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1827
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1828
monitor:anInstVarName
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1829
    "start a monitoring process, showing the given instVar
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1830
     in regular intervals."
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1831
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1832
    |ivName|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1833
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1834
    (ivName := anInstVarName) isInteger ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1835
        ivName := anInstVarName printString
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1836
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1837
    listView selectElement:ivName.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1838
    self doStartMonitor
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1839
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1840
    "Created: / 1.3.1996 / 19:31:45 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1841
    "Modified: / 12.2.1999 / 16:05:47 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1842
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1843
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1844
selection
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1845
    "helper - return the value of the selected entry"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1846
6850
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1847
    |val|
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1848
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1849
    val := self valueAtLine:selectionIndex.
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1850
    self dereferenceValueHolders ifTrue:[
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1851
        "workspace-variable-inspection"
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1852
        val := val value
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1853
    ].
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1854
    ^ val
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1855
1dd4d6518d91 extra field support
Claus Gittinger <cg@exept.de>
parents: 6840
diff changeset
  1856
    "Modified: / 03-08-2006 / 14:27:02 / cg"
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1857
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1858
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1859
showLast
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1860
    "user clicked on an instvar - show value in workspace"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1861
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1862
    |lastIdx|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1863
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1864
    lastIdx := listView list size.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1865
    lastIdx ~~ 0 ifTrue:[
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1866
	self showSelection:lastIdx.
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1867
	listView selection:lastIdx.
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1868
    ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1869
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1870
    "Created: 28.6.1996 / 15:06:38 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1871
    "Modified: 18.3.1997 / 18:22:54 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1872
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1873
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1874
showReferences
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1875
    "user selected references-menu entry"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1876
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1877
    self selection class hasImmediateInstances ifTrue:[
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1878
        ^ self warn:'Sorry - cannot show references to immediate objects'
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1879
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1880
    ObjectMemory displayRefChainTo:(self selection)
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1881
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1882
    "Modified: / 30.7.1998 / 14:03:16 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1883
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1884
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1885
toggleHex
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1886
    |sel|
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1887
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1888
    showHex := showHex not.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1889
    sel := listView selection.
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1890
    sel notNil ifTrue:[
6851
e5d0beaa6e61 extra field support
Claus Gittinger <cg@exept.de>
parents: 6850
diff changeset
  1891
	self showSelection:sel
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1892
    ]
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1893
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1894
    "Created: / 7.5.1998 / 01:54:52 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1895
    "Modified: / 7.5.1998 / 02:00:10 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1896
!
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1897
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1898
tryToSelectKeyNamed:aString
5558
8b9d99f714d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5498
diff changeset
  1899
    |list idx|
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1900
5558
8b9d99f714d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5498
diff changeset
  1901
    list := listView list.
8b9d99f714d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5498
diff changeset
  1902
    list notNil ifTrue:[
8b9d99f714d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5498
diff changeset
  1903
        (idx := list indexOf:aString) ~= 0 ifTrue:[
8b9d99f714d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5498
diff changeset
  1904
            listView selection:idx
8b9d99f714d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5498
diff changeset
  1905
        ].
3874
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1906
    ].
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1907
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1908
    "Created: / 16.11.2001 / 13:48:51 / cg"
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1909
! !
ed3a652e5ce0 all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents: 3869
diff changeset
  1910
4268
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1911
!InspectorView methodsFor:'workspace protocol'!
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1912
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1913
modified:aBoolean
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1914
    ^ workspace modified:aBoolean
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1915
!
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1916
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1917
saveAs:file doAppend:doAppend
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1918
    workspace saveAs:file doAppend:doAppend
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1919
! !
0fe3e4a82ddf more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
  1920
871
a29021918ec5 fixed openOn:monitor:
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1921
!InspectorView class methodsFor:'documentation'!
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1922
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1923
version
7626
9a2b4d6855a2 avoid flicker when monitoring
Claus Gittinger <cg@exept.de>
parents: 7297
diff changeset
  1924
    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.168 2007-02-06 13:27:29 cg Exp $'
200
01ce3d3636d5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 188
diff changeset
  1925
! !