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